}
private void on_element_sync_message (Gst.Bus bus, Message message) {
- if (Gst.Video.is_video_overlay_prepare_window_handle_message (message)) {
+ if (Video.is_video_overlay_prepare_window_handle_message (message)) {
+ Gdk.Window window = preview.get_window ();
+ debug ("prepare overlay: %p", window);
overlay = message.src as Gst.Video.Overlay;
- overlay.set_window_handle ((uint *)Gdk.X11Window.get_xid (preview.get_window ()));
+ overlay.set_window_handle ((uint *)Gdk.X11Window.get_xid (window));
+ debug ("prepared overlay");
}
}
alloc.x, alloc.y, alloc_width, alloc_height);
}
+ public override void realize () {
+ base.realize();
+ debug ("realize");
+ if (!get_window ().ensure_native ())
+ error ("Couldn't create native window needed for GstVideoOverlay!");
+ }
+
public override bool draw (Cairo.Context cr) {
if (content != null) {
Gdk.Pixbuf pb = content.scale_simple (alloc_width, alloc_height, Gdk.InterpType.BILINEAR);