Show video on Windows

narcisse doudieu siewe wambenarcisse at yahoo.fr
Fri Sep 26 12:16:31 PDT 2014



do the following in the "draw" signal because in that step, the "window" surface has already be attributed to the widget.
use the following function in GDK 

1) first step
windon = Gtk.get_window(widget)

2) second step
with the GdkWindow of the widget, create a cairo context "cairo_t" (to use cairo api and draw in it)


cairo_context_for_the_window = Gdk.cairo_create(window_of_the_widget)

with "cairo_context_for_window"  use the cairo api (a binding for python exists) to draw your picture in it.
A movie is a list of pictures so each time you have to draw these picture in the window surface of your widget
this is why we use cairo 


Le Vendredi 26 septembre 2014 17h48, Manuel <manuel at wenns-um-email-geht.de> a écrit :
 


Hi all,

in my program I use PyGObject/PyGI and GStreamer to show a video in my
GUI. The video is shown in a Gtk.DrawingArea and therefore I need to get
it's window-handle in the realize-signal-handler. On Linux I get that
handle using:

drawing_area.get_property('window').get_xid()
But how do I get the handle on Windows?

I searched on the internet but found only examples for PyGtk using
window.handle which does not work using PyGI.

The GStreamer documentation provides an example which uses the
GDK_WINDOW_HWND macro to get the handle. This macro uses AFAIK
gdk_win32_drawable_get_handle. But how to do it in Python using PyGI?

Best regards
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140926/3468e842/attachment.html>


More information about the gstreamer-devel mailing list