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

Trenton Tuggle Trent at Tuggle.org
Tue Mar 24 19:50:56 CET 2009


Interesting update...

I've been unable to "capture" VideoWidget paint events at all -- it  
appears as if it somehow gets drawn outside of a PaintEvent -- but how  
could it then be captured and redirected onto a  
QGraphicsViewProxyWidget?

What's the mechanism that QGraphicsViewProxyWidget uses to "capture"  
the paint events of its children and "redirect" them to be drawn on  
the appropriate Graphics View/Scene?

Thanks in advance for any pointers...

-Trent Tuggle <Trent at Tuggle.Org>


On Mar 21, 2009, at 11:39 AM, 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




More information about the Qt-interest-old mailing list