Hi,
I'm currently using ClutterGLXTexturePixmap to redirect video. Rather
than having updates from the redirected window be rendered immediately,
I'd like to instead buffer 4 or 5 frames into separate COGL textures,
and then replace the underlying COGL texture of a ClutterTexture using
my own timing mechanism.
>From what I can see, in order to accomplish this, it looks like I'm
going to be reimplementing most of the tfp code inside clutter in my
application. I think the basic recipe would look like:
1. Create a ClutterTexture to hold the video contents and add it to
the stage.
2. XCompositeRedirectWindow() and XCompositeNameWindowPixmap() to
fetch the pixmap.
3. glXCreatePixmap() on the above pixmap to fetch glx_pixmap.
4. Create the desired number of buffered frames with
cogl_texture_new_with_size().
5. Upon a damage event, grab an available COGL texture created in
#4 and glBindTexture(), then glXBindTexImageEXT() on the
glx_pixmap.
6. A separate pipeline responsible for timing the buffered frames
takes the oldest updated texture from #5 call
clutter_texture_set_cogl_texture() on the ClutterTexture from
#1.
Before falling too far down the rabbit hole, I wanted to ask those
better informed:
1. Is the above approach at all tenable?
2. Is there any way I can still make use ClutterGLXTexturePixmap
but extend it in some way to accomplish the same goal?
Thanks,
Jason.
--
To unsubscribe send a mail to [email protected]