After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 680694 - sink: reply to "prepare-video-context" query
sink: reply to "prepare-video-context" query
Status: RESOLVED FIXED
Product: clutter-gst
Classification: Other
Component: general
1.6.x
Other Linux
: Normal normal
: ---
Assigned To: clutter-gst-maint
clutter-gst-maint
Depends on:
Blocks:
 
 
Reported: 2012-07-27 09:34 UTC by Gwenole Beauchesne
Modified: 2013-01-03 17:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sink: reply to "prepare-video-context" query (2.78 KB, patch)
2012-07-27 09:34 UTC, Gwenole Beauchesne
none Details | Review

Description Gwenole Beauchesne 2012-07-27 09:34:37 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.
Comment 1 Damien Lespiau 2013-01-03 17:41:09 UTC
Pushed to the 1.6 branch (the gstreamer 0.10 one), thanks for the patch!