gst_video_overlay_set_window_handle from GTK#
yannick inizan
inizan.yannick at gmail.com
Fri Dec 25 20:21:13 PST 2015
why don't you use gtksink for video rendering ? gtksink have a Gtk.Widget
"widget" property. add this widget to your Gtk.Window
2015-12-26 4:53 GMT+01:00 doon <don-prog at mail.ru>:
> I trying to display video in GTK# using Gstreamer via P/Invoke(on Ubuntu).
> I
> tried to use many code samples but nothing is working. Here is one of them:
> GTK# code:
> [DllImport("libgstTestDLL.so", CharSet = CharSet.Ansi,
> CallingConvention =
> CallingConvention.Cdecl)]
> public extern static int play_file (StringBuilder path, IntPtr
> win);
> ...
> play_file (new StringBuilder ().Append
> ("file:///home/user/Downloads/test.mp4"), screen.GdkWindow.Handle);
>
> C code:
> void play_file(char* path, void* hwnd_ptr){
> GdkWindow* gdkWin = (GdkWindow*)hwnd_ptr;
> pipeline = gst_element_factory_make("playbin", "player");
> g_object_set (G_OBJECT (pipeline), "uri", path, NULL);
> gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(pipeline),
> GDK_WINDOW_XID(gdkWin));
> gst_element_set_state(pipeline, GST_STATE_PLAYING);
> }
> After executing play_file function my GTK# app just closes.
> How can I correctly use play_file in GTK# and what I need to execute from
> play_file function in C to display video in GTK# application?
>
>
>
> --
> View this message in context:
> http://gstreamer-devel.966125.n4.nabble.com/gst-video-overlay-set-window-handle-from-GTK-tp4675032.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> 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/20151226/bb86fc9c/attachment.html>
More information about the gstreamer-devel
mailing list