Results 1 to 2 of 2

Thread: Phonon VideoPlayer resize problem

  1. #1
    Join Date
    Aug 2011
    Qt products
    Qt4 Qt/Embedded
    Unix/X11 Windows

    Question Phonon VideoPlayer resize problem

    I'm having a very specific problem relating to resizing Phonon video playback on Linux using the GStreamer backend. I use one player to playback several videos of different sizes in my application. Video playback works fine most of the time without problem but occasionally when swicthing to another video although the widget resizes the video playing within it doesn't. This doesn't happen all the time and happens much less on my more powerful dev PC than my slower testing PC.

    I have tried resizing the video again at intervals using setGeometry but this has no effect. I suspect because the widget has already resized correctly but that Phonon/GStreamer hasn't picked up that change. So the video plays but at completely the wrong size. Once the video has signaled finshed() I then restart the video and it plays at the correct size.

    So my question is does anybody know of anyway I can 'nudge' Phonon to resize itself? I am starting to run out of ideas now and any help would be greatly appreciated.


    Code snippets in case they are relevant :
    Qt Code:
    1. video = new Phonon::VideoPlayer(Phonon::VideoCategory, this);
    3. void MainWindow::playContentVideo()
    4. {
    5. video->stop();
    6. video->hide();
    7. video->setGeometry(QRect(127,256,400,320));
    8. QString vidpath = QApplication::applicationDirPath();
    9. vidpath += "/content/";
    10. vidpath += QString::number(content);
    11. vidpath += ".ogv";
    12. video->play(Phonon::MediaSource(vidpath));
    13. video->show();
    14. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Aug 2011
    Qt products
    Qt4 Qt/Embedded
    Unix/X11 Windows

    Default Re: Phonon VideoPlayer resize problem

    Unlikely as this is, in case someone has the same problem as me. The only way I could fix this was to change to the xine backend for Phonon instead of GStreamer one. I should also mention that the videos I'm playing are OGV files encoded using the Theora video codec.

    So this isn't specifically a QT problem but more of an issue with the Phonon backends.

Similar Threads

  1. Phonon::VideoPlayer
    By dano_labrosse in forum Newbie
    Replies: 6
    Last Post: 1st February 2012, 06:33
  2. Problem in phonon videoplayer
    By vinayaka in forum Newbie
    Replies: 1
    Last Post: 20th January 2012, 11:55
  3. phonon videoplayer fullscreen
    By IGreench in forum Qt Programming
    Replies: 0
    Last Post: 6th August 2011, 09:52
  4. Phonon::videoplayer doubt
    By vishnu717 in forum Newbie
    Replies: 8
    Last Post: 23rd June 2011, 09:50
  5. phonon VideoPlayer seek
    By rbp in forum Qt Programming
    Replies: 4
    Last Post: 31st October 2008, 04:53

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.