Troubleshooting Phonon::VideoPlayer



  • Hey there!

    I was hoping to get some additional help figuring out what I'm doing wrong using the Phonon::VideoPlayer widget. I've gone through the available documentation on the wiki and have even attempted to use the sample code from the class reference but I can't pinpoint my issue.

    I think my problem lies with my video not loading, but I'm not sure. I've checked that the video files I'm attempting to load actually play via Windows Media Player, and I've attempted to load them in the 3 different ways I know how.

    @
    //My Load Function that happens when we arrive on the page containing the widget
    {
    m_VideoPlayer = new Phonon::VideoPlayer(Phonon::VideoCategory, videoPlayer);
    m_VideoPlayer->setMinimumSize(videoPlayer->width(), videoPlayer->height());
    m_VideoPlayer->setMaximumSize(videoPlayer->width(), videoPlayer->height());

    //video_filename.c_str()
    m_VideoPlayer->load(Phonon::MediaSource("//Resources//videos//capture_old.wmv"));

    QObject::connect(m_VideoPlayer, SIGNAL(finished()), this, SLOT(slot_playerFinished()));
    QObject::connect(m_VideoPlayer, SIGNAL(finished()), m_VideoPlayer, SLOT(deleteLater()));
    }

    void VideoWidget::playVideo() {
    m_PlayerFinished = false;

    m_VideoPlayer->play();
    }@

    Tips and suggestions welcome as always!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.