static guintptr video_window_handle = 0;
...
if (video_window_handle != 0) {
GstVideoOverlay *overlay;
// GST_MESSAGE_SRC (message) will be the video sink element
overlay = GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (message));
gst_video_overlay_set_window_handle (overlay, video_window_handle);
} else {
g_warning ("Should have obtained video_window_handle by now!");
}
...
#ifdef GDK_WINDOWING_X11
{
gulong xid = GDK_WINDOW_XID (gtk_widget_get_window (video_window))
+;
video_window_handle = xid;
}
#endif
#ifdef GDK_WINDOWING_WIN32
{
HWND wnd = GDK_WINDOW_HWND (gtk_widget_get_window (video_window));
video_window_handle = (guintptr) wnd;
}
#endif
}
So the possibilities are, get newer version of gstreamer .... call set handle at different time (different signal ... do some "casting"
So I think you're calling set handle at the correct time ... so get latest gstreamer if not have it? call realize something? Or try "casting" result of GetHandle into whatever "guintptr" means to Glib::Object::Introspection (or Glib)
I'd also try this --sync backtrace debugging option mentioned in the error message ... could be Glib... is truncating this integer somehow or something stupid that... a better error message might be better :)
last thing thing I'd try is to do the call with Inline::C :)
If you didn't run the code, .... Yup, on win32, sorry :) |