GNOME Bugzilla – Bug 680694
sink: reply to "prepare-video-context" query
Last modified: 2013-01-03 17:41:09 UTC
Created attachment 219728 [details] [review] sink: reply to "prepare-video-context" query This is necessary for VA plugin elements that support multiple displayt ypes to ensure the VA element creates a VA display compatible with the cluttersink expectations. More specifically, say I have a "vaapidecode" element that supports Wayland, X11 and GLX displays, in video context sense. The element will ask for a display to its neighbours through gst_video_context_prepare(). If nobody replies, it will choose to allocate one. Now, in the situation where we support Wayland, X11 and GLX at the same time, within the same binary, we will select a Wayland display for auto allocation. Rationale (probably wrong?) is if someone runs Wayland over X11, he would prefer to run applications there. So, in this case, since Wayland is tried first, a GstVaapiDisplayWayland allocation is attempted first... and succeeds. Now comes the time to render the vaapidecode provided buffer into cluttersink. Since we allocated a GstVaapiDisplayWayland, there is no GLX capable GstSurfaceConverter attached to the buffer, so cluttersink fails to render anything. Note: cluttersink, if it is an X11/GLX only application, has to work in X11, not in the Wayland screen. So, one way to solve this problem is to use all the magical powers from GstVideoContext. :) In particular, we just reply to the "video-context-prepare" query in cluttersink and say "hey, get me an X11/GLX based video context please". Then, vaapidecode honours that and explcitly chooses a GstVaapiDisplayGLX instead of a Wayland one.
Pushed to the 1.6 branch (the gstreamer 0.10 one), thanks for the patch!