[Qt-interest] Phonon - access video frames
Martin Schröer
gordon at gordonswelt.de
Fri Mar 6 16:58:19 CET 2009
I just had a quick look at the 'videowall' example from
http://labs.trolltech.com/blogs/2008/11/28/videos-get-pimped
an it looks very promising.
Will give it a try for my needs and then report back.
Thanks for all the usefull advice and tips.
Martin
Richard schrieb:
> Some degradation of speed will occur, but it should'nt be that bad. If
> the viewport widget is set to QGLWidget, most platforms can use
> hardware acceleration directly without going through software. And
> even with software rendering, it will still be far better that trying
> to grab the frames yourself.
>
> -Richard
>
>
>
>
> Den Mar 6, 2009 kl. 3:43 PM skrev Martin Schröer:
>
>
>> What about speed ? Is this approach fast enough to do that real time
>> drawing on the vid frames,
>> like i described in the former posts ?
>>
>> Richard schrieb:
>>
>>> Hi!
>>> The "m_videoWidget->setAttribute(Qt::WA_DontShowOnScreen);" trick
>>> done
>>> for WebKit is is a "hidden" work around for Qt since Phonon is
>>> lacking
>>> an API for grabbing frames (at the moment). We don't recommend using
>>> the same work around for others, as support for this might change
>>> without notice in a future release.
>>>
>>> If what you need is to draw overlay, consider putting your video
>>> widget inside graphics view instead. It will then act as any other
>>> graphics item, and it should therefore be easy to add any overlay.
>>>
>>> -Richard
>>>
>>>
>>>
>>>
>>> Den Mar 5, 2009 kl. 8:09 PM skrev Martin Schröer:
>>>
>>>
>>>
>>>> Helder, thanks for your reply.
>>>>
>>>> Another suggestion made was:
>>>>
>>>> QPixmap::grabWidget(QWidget * widget, int x = 0, int y = 0, int
>>>> width
>>>> = -1, int height = -1)
>>>>
>>>>
>>>> VideoWidget* videoWidget = new VideoWidget(this);
>>>> QPixmap pixmap = QPixmap::grabWidget(videoWidget);
>>>>
>>>> I'm a bit unsure what to do.
>>>> What i want to do is to overlay video frames in realtime, with some
>>>> static contents
>>>> ( like text ) but also with some cursor.
>>>>
>>>> What approach would be the best to achieve that ?
>>>>
>>>>
>>>>
>>>> Helder Correia schrieb:
>>>> On Wed, Mar 4, 2009 at 2:11 PM, Martin Schröer <gordon at gordonswelt.de
>>>>
>>>> wrote:
>>>>
>>>>
>>>>>> I want to access the video frames of a media played back directly,
>>>>>> so i can
>>>>>> apply some manipulation to it before it goes to the screen.
>>>>>> May someone give me hints on this ?
>>>>>>
>>>>>>
>>>>>>
>>>>> Hi Martin. Take a look at
>>>>> src/3rdparty/webkit/WebCore/platform/graphics/qt/
>>>>> MediaPlayerPrivatePhonon.cpp
>>>>> Particularly these lines:
>>>>> m_videoWidget->setAttribute(Qt::WA_DontShowOnScreen);
>>>>> ...
>>>>> m_videoWidget->render(painter, QPoint(rect.x(), rect.y()),
>>>>> QRegion(0, 0, rect.width(), rect.height()));
>>>>>
>>>>> _______________________________________________
>>>>> Qt-interest mailing list
>>>>> Qt-interest at trolltech.com
>>>>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>>>
>>>>>
>>>>>
>>>> _______________________________________________
>>>> Qt-interest mailing list
>>>> Qt-interest at trolltech.com
>>>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>>
>>>>
>>> _______________________________________________
>>> Qt-interest mailing list
>>> Qt-interest at trolltech.com
>>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>
>>>
>>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
More information about the Qt-interest-old
mailing list