set_window_handle / Windows / MSYS / GTK

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

set_window_handle / Windows / MSYS / GTK

RiccardoCagnasso
What is the equivalent of



on windows / gtk / MSYS?

In this case



is a GdkWin32Window



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: set_window_handle / Windows / MSYS / GTK

RiccardoCagnasso
This post was updated on .
Answering my own question, this seems to work



                if not video_window.ensure_native():
                    print("Error - video playback requires a native window")
                    return

                ctypes.pythonapi.PyCapsule_GetPointer.restype = ctypes.c_void_p
                ctypes.pythonapi.PyCapsule_GetPointer.argtypes = [ctypes.py_object]
                drawingarea_gpointer = ctypes.pythonapi.PyCapsule_GetPointer(video_window.__gpointer__, None)
                gdkdll = ctypes.CDLL ("libgdk-3-0.dll")

                gdkdll.gdk_win32_window_get_handle.restype = ctypes.c_void_p
                gdkdll.gdk_win32_window_get_handle.argtypes = [ctypes.c_void_p]
                handler = gdkdll.gdk_win32_window_get_handle(drawingarea_gpointer)
                videosink.set_window_handle(
                    handler
                )

--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel