gtk2/modules/media
Chun-wei Fan 52d1c0c271 media/gstreamer: Support using GL for video for Windows
Add support to share the WGL context in GDK with the WGL context in GStreamer,
so that we can also use OpenGL in the gstreamer media backend to playback
videos.  For now OpenGL/ES is not supported for this under Windows.

The process of setting this up in Windows is a little bit more involved, as:

*  The OpenGL support in GstGL requires a GL 4.1 Core context, but we may just
   get the GL version from wglCreateContextAttribsARB() that we pass into the
   attributes, which is 3.2 by default.  So, try to ask for a 4.1 Core context
   first if we are asking for anything less.

*  There is only one GstDisplay available for Windows, so we just use
   gst_gl_display_new().

*  We must explicitly tell libepoxy that we are using wglMakeCurrent() outside
   of libepoxy that is being used in GdkGL, otherwise we would end up crashing
   as the GL/WGL function pointers would become invalid.

*  We must also deactivate temporarily the underlying WGL context that was made
   current by gdk_gl_context_make_current() so that when
   gst_gl_display_create_context() calls wglShareLists(), we won't get bitten
   by error 0xaa (resource busy), as some drivers don't handle this well when
   the GL context is current in another thread.

For the last two points we make use of macros defined by the platforms that the
build is done for to help us carry out the necessary tasks as needed.

Thanks to Matthew Waters for the info on integrating GstGL and windowing
toolkits on Windows.
2021-05-24 16:36:40 +08:00
..
gtkffmediafile.c gtkffmediafile.c: Use g_snprintf() 2021-01-08 22:24:42 -05:00
gtkffmediafileprivate.h
gtkgstmediafile.c gtkgstmediafile: Remove media-info-updated callback 2021-05-19 18:55:37 +03:00
gtkgstmediafileprivate.h gtk: Add a GStreamer implementation of GtkMediaFile 2018-03-18 21:01:23 +01:00
gtkgstpaintable.c media/gstreamer: Support using GL for video for Windows 2021-05-24 16:36:40 +08:00
gtkgstpaintableprivate.h media: Add support for OpenGL to GtkGstMediaFile 2021-01-04 15:00:36 -05:00
gtkgstsink.c media/gstreamer: Support using GL for video for Windows 2021-05-24 16:36:40 +08:00
gtkgstsinkprivate.h media: Add support for OpenGL to GtkGstMediaFile 2021-01-04 15:00:36 -05:00
meson.build meson: Do not enforce GStreamer EGL lib 2021-05-15 14:03:23 +02:00