Results 1 to 1 of 1

Thread: Phonon::VideoPlayer black widget

  1. #1
    Join Date
    Feb 2010
    Posts
    18
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Phonon::VideoPlayer black widget

    Hi,
    I'm using an Ubuntu VM and produced a very basic media player using Phonon::VideoPlayer. To get it working I had to install two libraries:

    sudo apt-get install libphonon-dev
    sudo apt-get install gstreamer0.10-ffmpeg

    This was working fine and the videos played. However, now I'm getting an empty black frame and I'm not sure what's changed. It doesn't look like the code has changed (I've checked SVN logs and looked at the revision graphs) and the movie files are in the same location (I have .avi, .flv and .mov files). I definitely haven't changed my VM setup or monkeyed about with system settings.

    I've reinstalled the above libraries but that didn't make any difference so I'm at a loose end.

    Does anyone have an idea what this could be? Usually the problems people have with Phonon is getting it working in the first place but that's not my issue.

    The code is straightforward taken from a class defined with
    Qt Code:
    1. MoviePlayer::MoviePlayer(QWidget *parent) : QWidget(parent)
    To copy to clipboard, switch view to plain text mode 
    which is just a QWidget on a .ui form.

    Qt Code:
    1. Phonon::VideoPlayer* vp = Phonon::VideoPlayer(Phonon::VideoCategory, this);
    2. vp->load("../UI/movies/pool.avi");
    3. vp->play();
    To copy to clipboard, switch view to plain text mode 

    Any help is appreciated, thanks


    Added after 1 15 minutes:


    Further to this, the qmediaplayer demo works fine using the same videos. This would indicate the problem isn't due to codecs not being installed.

    I'm currently going through the code in that project to see what is different. I'll post any findings here...

    Found the problem...

    QApplication::setColorSpec(QApplication::ManyColor );

    This was preventing the videos from being displayed so commenting that out work.

    Could someone explain this please?
    Last edited by JonnyJP; 7th September 2012 at 15:21.

Similar Threads

  1. Replies: 0
    Last Post: 15th April 2012, 15:20
  2. phonon videoplayer and frame
    By Kethan Kumar in forum Qt Programming
    Replies: 0
    Last Post: 17th February 2012, 05:09
  3. Phonon::VideoPlayer
    By dano_labrosse in forum Newbie
    Replies: 6
    Last Post: 1st February 2012, 06:33
  4. Phonon::VideoPlayer and widget reset
    By jwieland in forum Qt Programming
    Replies: 0
    Last Post: 16th September 2011, 13:41
  5. QGraphicsEffect on a Phonon::VideoPlayer
    By scary_jeff in forum Newbie
    Replies: 3
    Last Post: 20th January 2011, 01:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.