Guest User

Untitled

a guest
Mar 1st, 2021
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. video_window = self.gui.movie_window.get_property('window')
  2.  
  3. ctypes.pythonapi.PyCapsule_GetPointer.restype = ctypes.c_void_p
  4. ctypes.pythonapi.PyCapsule_GetPointer.argtypes = [ctypes.py_object]
  5. drawingarea_gpointer = ctypes.pythonapi.PyCapsule_GetPointer(
  6. video_window.__gpointer__,
  7. None
  8. )
  9. gdkdll = ctypes.CDLL ("libgdk-3-0.dll")
  10.  
  11. gdkdll.gdk_win32_window_get_handle.restype = ctypes.c_void_p
  12. gdkdll.gdk_win32_window_get_handle.argtypes = [ctypes.c_void_p]
  13. handler = gdkdll.gdk_win32_window_get_handle(drawingarea_gpointer)
  14.  
  15. self.videosink.set_window_handle(
  16. handler
  17. )
Advertisement
Add Comment
Please, Sign In to add comment