Phonon snapshot problems



  • Hello everybody,

    I am able to capture a frame using grabWindow method

    @QPixmap bilde = QPixmap::grabWindow(videoPlayer->videoWidget()->winId());@

    How can I use built in phonon snapshot function? All I get is that picture size is 0x0 px.

    @QImage bilde;
    bilde = videoPlayer->videoWidget()->snapshot();

    qDebug()<<"Bildes izmers:" << bilde.size();
    if (bilde.size().isEmpty())
    {
    

    qDebug()<<"Mainigaja bilde, nav datu!";
    }
    else
    {
    bool saved = bilde.save("snap.jpg", "JPG", 100);
    qDebug() << "Vai saglabaja?" << saved;
    }@

    I want to try VideoWidget::snapshot, because my video feed is 1080x720px, but my videoPlayer widget is 720x480px and I want to capture full sized video frame, with grabWindow method I only can save picture with the same size as the widget.

    Is there a method to capture full size video frame with grabWindow method?
    Why VideoWidget::snapshot function isn't working?

    I'm using kubuntu 11.04 with Qt 4.7.2 and C++

    Best Regards
    Raivis



  • I had the same problem and submitted a Nokia-Qt tech support query. I heard back today with the following response:

    I was able to reproduce your problem but unfortunately I cannot provide a workaround for this. I have reported a new Qt bug about this issue: QTBUG-21491. You can follow it via link:
    https://bugreports.qt.nokia.com/browse/QTBUG-21491
    <<<<<

    Looks like it cannot be done in Qt as of 4.7.4...



  • I would not expect it to be fixed by Nokia.

    Did you try with the phonon version inside KDE?



  • I am curious why you believe Nokia will not fix this?

    I have not built the Phonon KDE myself, but reading online threads on the issue includes comments from others that have tried, and say that it does not fix the problem.

    This is such a fundamental and "always used" feature that it amazes me that it could have been overlooked, or is not a high priority to fix. Have you ever seen a video library representation that did not include a thumbnail view of the clips (at least as an option)?



  • Because yes. Phonon in Qt is old and bugged, and won't be developed by Nokia any more. Use the one from KDE.

    References:

    1. http://labs.qt.nokia.com/2011/05/12/qt-modules-maturity-level-the-list/
    2. git log src/3rdparty/phonon
    3. https://bugreports.qt.nokia.com/secure/IssueNavigator.jspa?reset=true&jqlQuery=(summary+~+phonon+OR+description+~+phonon)+AND+status+in+(Open,+"In+Progress")


  • While I can write competent C++ and Qt front-end code, I am not really very skilled at playing around with compilers and libraries and making them jump through hoops.

    I am not able to find any direct instructions for how to take something from the KDE site and updating my Qt installation with it. I tried just installing the KDE Windows stuff, but the phonon stuff is then in dll/pdb files rather than the lib files that Qt expects (for the first level of problem anyway).

    Google is failing me (which is rare...). Do you happen to know of any source for such instructions? (the KDE user forum is pretty close to useless)


Log in to reply
 

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