gtk2/gdk
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
..
broadway broadway: Add a setter for display scale 2021-05-10 07:19:26 -04:00
macos gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
resources/glsl Use GLSL version 110 for OpenGL 2 shaders. 2016-11-01 15:42:46 -03:00
wayland docs: More syntax fixes 2021-05-22 21:21:10 -04:00
win32 media/gstreamer: Support using GL for video for Windows 2021-05-24 16:36:40 +08:00
x11 gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
COPYING
default_cursor.png gdk: Include a default cursor as resource 2020-04-26 14:41:52 -04:00
filetransferportal.c filechooser portal: Free portal proxy when bus connection closes 2020-02-04 14:08:10 +01:00
filetransferportalprivate.h Tweak the file transfer portal _again_ 2020-01-17 23:46:37 -05:00
gdk-autocleanup.h gdk: Make GdkKeymap a private api 2020-04-06 16:32:03 -04:00
gdk-private.h Add compatibility shim for g_memdup2() 2021-02-11 12:57:38 +00:00
gdk.c gdk: Cosmetic docs changes 2021-05-22 17:25:26 -04:00
gdk.h gdk/toplevel: Negotiate surface size via a compute-size signal 2020-08-05 15:49:00 +02:00
gdkapplaunchcontext.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkapplaunchcontext.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkapplaunchcontextprivate.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkarrayimpl.c gdkarray: Add a "stolen" boolean to splice() 2020-12-24 06:38:45 +01:00
gdkcairo.c gdk: Cosmetic docs changes 2021-05-22 17:25:26 -04:00
gdkcairo.h Drop gdk_cairo_surface_upload_to_gl() helper 2020-09-25 15:00:07 +02:00
gdkcairocontext.c gdk: Cosmetic docs changes 2021-05-22 17:25:26 -04:00
gdkcairocontext.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkcairocontextprivate.h gdkcairocontext*.h: Include cairo.h consistently 2018-05-15 13:49:45 +08:00
gdkcairoprivate.h gdkcairoprivate: Fix header guard 2020-08-29 11:11:29 +02:00
gdkclipboard.c gdk: Cosmetic docs changes 2021-05-22 17:25:26 -04:00
gdkclipboard.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkclipboardprivate.h gdk: Change some async clipboard api 2019-04-02 15:10:53 +00:00
gdkconfig.h.meson macos: prototype new GDK backend for macOS 2020-07-21 14:45:12 -07:00
gdkconfig.h.win32 Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkconfig.h.win32_vulkan Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkconstructor.h gdk: Include copy of glib/gconstructor.h 2019-03-17 21:29:59 +01:00
gdkcontentdeserializer.c gdk: Cosmetic docs changes 2021-05-22 17:25:26 -04:00
gdkcontentdeserializer.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkcontentformats.c docs: More syntax fixes 2021-05-22 21:20:10 -04:00
gdkcontentformats.h contentformats: Constify some functions 2020-03-02 04:43:56 +01:00
gdkcontentformatsprivate.h gdk: Sanitize GdkContentFormats API 2017-11-20 23:15:11 +01:00
gdkcontentprovider.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkcontentprovider.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkcontentproviderimpl.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkcontentproviderimpl.h Remove gdk_content_provider_new_with_formats() 2020-02-18 02:40:00 +01:00
gdkcontentproviderprivate.h clipboard: Introduce GdkContentProvider 2017-12-03 05:46:47 +01:00
gdkcontentserializer.c gdk: Cosmetic docs changes 2021-05-22 17:25:26 -04:00
gdkcontentserializer.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkcursor.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkcursor.h Cosmetics 2020-10-29 07:40:30 -04:00
gdkcursorprivate.h gdk: Add gdk_cursor_hash() and gdk_cursor_equal() 2017-11-04 00:07:13 +01:00
gdkdebug.h x11: Add debug toggle for preferring GLX 2021-05-10 20:44:35 +01:00
gdkdevice.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkdevice.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkdevicepad.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkdevicepad.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkdevicepadprivate.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkdeviceprivate.h gdk: Add gdk_device_get_timestamp 2021-03-26 10:30:33 -04:00
gdkdevicetool.c devicetool: Add property annotations 2021-03-11 16:37:32 +00:00
gdkdevicetool.h docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkdevicetoolprivate.h gdk: Pass hardware ID on gdk_device_tool_new() 2016-08-23 21:01:44 +02:00
gdkdisplay.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkdisplay.h gdk: Move default group api to the X11 backend 2020-07-29 22:58:37 -04:00
gdkdisplaymanager.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkdisplaymanager.h Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdkdisplaymanagerprivate.h
gdkdisplayprivate.h gdk: Drop some unused private api 2020-10-07 21:02:22 -04:00
gdkdrag.c docs: Reduce redundancy 2021-05-20 20:45:06 -04:00
gdkdrag.h docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkdragprivate.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkdragsurface.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkdragsurface.h Annotation fixes 2020-04-03 15:30:56 +01:00
gdkdragsurfaceprivate.h Add a GdkDragSurface interface 2020-03-12 14:56:21 -04:00
gdkdrawcontext.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkdrawcontext.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkdrawcontextprivate.h drawcontext: Only pass the region that matters 2018-04-24 23:16:58 +02:00
gdkdrop.c docs: Reduce redundancy 2021-05-20 20:45:06 -04:00
gdkdrop.h drop: Remove unused convenience APIs 2020-03-02 04:43:56 +01:00
gdkdropprivate.h gdk: Make gdk_drop_status() take preferred action 2020-03-02 04:43:56 +01:00
gdkenumtypes.c.template types: fix various use of volatile in type registration 2020-11-18 20:21:33 -08:00
gdkenumtypes.h.template Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkevents.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkevents.h Documentation fixes 2021-05-20 19:17:49 -04:00
gdkeventsprivate.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkframeclock.c docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkframeclock.h docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkframeclockidle.c gdk/frame-clock: Remove the newly added 'compute-size' phase 2020-12-07 09:46:39 +01:00
gdkframeclockidleprivate.h frameclockidle: Rename header so it's private now 2018-03-29 05:02:15 +02:00
gdkframeclockprivate.h gdk/frame-clock: Remove the newly added 'compute-size' phase 2020-12-07 09:46:39 +01:00
gdkframetimings.c docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkframetimings.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkgl.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkglcontext.c docs: Reduce redundancy 2021-05-20 20:45:06 -04:00
gdkglcontext.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkglcontextprivate.h gl: remove unused texture_from_surface API 2020-10-29 08:26:27 -07:00
gdkglobals.c gdk: Remove an unused variable 2020-10-01 19:33:43 -04:00
gdkgltexture.c docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkgltexture.h docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkgltextureprivate.h texture: Expose subclasses as subclasses 2018-03-18 05:57:07 +01:00
gdkinternals.h gdk: Slim down gdkinternals.h more 2020-08-14 07:45:53 -04:00
gdkintl.h
gdkkeynames.c Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdkkeys.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkkeys.h Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdkkeysprivate.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkkeysyms-update.pl docs: Fix GTK links and locations 2019-02-06 10:39:27 +01:00
gdkkeysyms.h gdk: Update gdkkeysyms.h 2020-07-21 16:55:28 -04:00
gdkkeyuni.c gdk: Some more tweaks of the docs 2021-03-11 16:37:31 +00:00
gdkmarshalers.list surface: Add marshallers for new events 2019-05-28 19:19:24 +02:00
gdkmemorytexture.c docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkmemorytexture.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkmemorytextureprivate.h gl backend: Avoid roundtripping via surface when updloading 2020-09-25 10:04:48 +02:00
gdkmonitor.c docs: Reduce redundancy 2021-05-20 20:45:06 -04:00
gdkmonitor.h gdk/monitor: Remove gdk_monitor_work_area and GdkMonitor::work-area 2020-07-29 17:57:30 +02:00
gdkmonitorprivate.h gdk/monitor: Remove gdk_monitor_work_area and GdkMonitor::work-area 2020-07-29 17:57:30 +02:00
gdkpaintable.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkpaintable.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkpango.c Documentation fixes 2021-05-20 19:17:49 -04:00
gdkpango.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkpipeiostream.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkpipeiostreamprivate.h clipboard: Implement local fallback clipboard transfers 2017-12-03 05:46:47 +01:00
gdkpixbuf-drawable.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkpixbuf.h Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
gdkpopup.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkpopup.h docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdkpopuplayout.c docs: More syntax fixes 2021-05-22 21:21:10 -04:00
gdkpopuplayout.h docs: Remove duplicate documentation stanzas 2021-03-11 16:37:31 +00:00
gdkpopupprivate.h Introduce GdkPopup 2020-03-11 19:35:55 -04:00
gdkprofiler.c Port tracing to the sysprof collector api 2020-08-21 10:55:01 -04:00
gdkprofilerprivate.h profiler: allow using gdk profiler functions without braces 2021-02-08 11:29:32 -08:00
gdkrectangle.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkrectangle.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkrgba.c Documentation fixes 2021-05-20 19:17:49 -04:00
gdkrgba.h Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
gdkrgbaprivate.h build: Add more useful warning flags 2020-03-05 07:56:28 +01:00
gdkseat.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkseat.h gdkseat: Make gdk_seat_get_tools() public 2020-10-08 16:22:05 +02:00
gdkseatdefault.c seatdefault: use g_clear_pointer to unref the tools 2021-01-08 13:11:56 +01:00
gdkseatdefaultprivate.h Rename master and slave device 2020-06-18 19:22:20 +01:00
gdkseatprivate.h seat: improve api to take into account the tool type 2021-01-07 12:50:48 +01:00
gdksnapshot.c docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdksnapshot.h docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdksnapshotprivate.h snapshot: Turn into GObject 2018-03-18 19:21:33 +01:00
gdksurface.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdksurface.h gdk: Always get shadow width via GdkToplevelSize 2020-12-07 09:46:39 +01:00
gdksurfaceprivate.h surface: Remove unused gdk_surface_get_unscaled_size() 2021-03-15 02:56:28 +01:00
gdktexture.c docs: Reduce redundancy 2021-05-20 20:45:06 -04:00
gdktexture.h Add pure and const annotations to various functions 2020-01-26 18:21:07 +01:00
gdktextureprivate.h texture: Unvirtualize download_surface 2020-09-25 09:31:43 +02:00
gdktoplevel.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdktoplevel.h docs: Rework the gdk docs 2021-03-11 16:37:31 +00:00
gdktoplevellayout.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdktoplevellayout.h docs: Remove duplicate documentation stanzas 2021-03-11 16:37:31 +00:00
gdktoplevelprivate.h gdk/toplevel: Make gdk_toplevel_present() async 2020-12-07 09:46:39 +01:00
gdktoplevelsize.c gdktoplevelsize: Comment out some unused code 2021-05-03 07:44:38 -04:00
gdktoplevelsize.h docs: Remove duplicate documentation stanzas 2021-03-11 16:37:31 +00:00
gdktoplevelsizeprivate.h gdk/toplevelsize: Rename 'margin' to 'shadow' and 'shadow_width' 2020-12-07 20:37:29 +01:00
gdktypes.h gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkversionmacros.h.in Add 4.4 version macros 2021-05-02 21:02:09 -04:00
gdkvulkancontext.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkvulkancontext.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkvulkancontextprivate.h vulkan: Fix release builds 2018-01-21 15:23:17 +01:00
gen-gdk-gresources-xml.py gdk: Include a default cursor as resource 2020-04-26 14:41:52 -04:00
gen-keyname-table.pl
keyname-table.h gdk: Translate some more key names 2017-10-09 20:33:14 +02:00
keynames-translate.txt gdk: Translate some more key names 2017-10-09 20:33:14 +02:00
keynames.txt
meson.build build: Use a consistent style for Meson files 2020-12-15 12:46:59 +00:00