[Qt-interest] Intercepting Phonon VideoWidget frames as they are pushed

Trent Tuggle Trent at Tuggle.org
Sun Mar 22 04:49:46 CET 2009


Hey...

Thanks for the quick reply!

I have tried using ffmeg directly and am also considering using  
Quicktime directly but there are drawbacks to each approach. Phonon is  
so attractive because its a wrapper around what are arguably the best  
libraries on each platform.  Probably if i fail to capture a   
VideoWidget I will probably do just that.  My current goal just seems  
so close!

-Trent Tuggle



On Mar 21, 2009, at 11:46 AM, Pavel Koshevoy <pavel at aragog.com> wrote:

> Have you considered using ffmpeg directly, instead of going through  
> all
> the phonon/DirectShow/QuickTime/gstreamer/etc... layers and  
> implementing
> a workaround just so you can get the frames?
>
>    Pavel
>
>
> Trenton Tuggle wrote:
>> I have an interesting challenge I've been working on:
>>
>> I'm working on video processing, and am investigating using Phonon  
>> for
>> platform-independent back-ends.
>>
>> My interest is not the usual, though -- I have little interest in
>> showing the video on-screen (although that would be nice, also) but
>> primarily, I'm interested in obtaining the video frames.
>>
>> Now I know it's easy to render() a widget (such as VideoWidget)  
>> onto a
>> pixmap or other, but I'm really interested in obtaining the frames in
>> a more automated way -- such as getting a signal when the next frame
>> is ready, etc.  My thought is that since VideoWidget can be embedded
>> in a graphics scene, it must be possible to intercept its painting
>> events and redirect it to a qimage or something: but so far I've  
>> failed.
>>
>> So that's my question: how can I embed a VideoWidget in something  
>> that
>> can intercept paint events, redirect them to a QImage, then signal a
>> processor that a frame is ready for processing?
>>
>> I've tried stuff along these lines:
>>
>> http://www.kdedevelopers.org/node/3644
>>
>> The thought was that I'll create a Phonon path to play on a
>> VideoWidget embedded in something like that which would capture the
>> frame, then signal my processor....
>>
>> But so far, I've been unable to get the widget I create to receive  
>> any
>> paint events, or intercept anything at all -- it doesn't even get
>> resized properly when a video is loaded!
>>
>> If anyone has any advice or input on this, I'd really appreciate it!
>>
>> Thanks in advance!
>>
>> Trent Tuggle <Trent at Tuggle.Org>
>> _______________________________________________
>> 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