[Readding the clutter mailing list in case others might find the code
snippet helpful.]

On Wed, 2009-11-11 at 09:55 -0700, Kevin DeKorte wrote:
> Do you have an example for this?

Nothing really self contained.  I have a vast glob of horrid prototype
code for a clutter-based video renderer which does retrace level frame
timing and accepts frames by one of two paths:

     1. YV12 over shared memory (requires a custom VO)
     2. Redirecting MPlayer/Xine/whatever to a texture via
        ClutterGLXTexturePixmap

Currently the prototype just lets clutter do all the work of receiving
damage notifications and updating the texture, which Clutter does
natively.  Eventually I'll do that myself so that I can create a frame
queue.  But the basic approach looks like:

        ClutterTexture *vid;
        vid = clutter_glx_texture_pixmap_new_with_window(winid);
        g_object_set(vid, "window-redirect-automatic", FALSE, NULL);
        
clutter_x11_texture_pixmap_set_automatic(CLUTTER_X11_TEXTURE_PIXMAP(vid), TRUE);

Where winid is the window id of the (currently mapped) MPlayer window.

The TFP approach is probably the only viable solution for VDPAU.  One of
our (Freevo's) design requirements is to not have the video player as
part of the core process, given the propensity of such processes to
crash.

Cheers,
Jason.

-- 
To unsubscribe send a mail to [email protected]

Reply via email to