Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main(string[] args){
- Gtk.init(ref args);
- Gst.init(ref args);
- var win = new Gtk.Window();
- uint val = 0;
- uint *handle = &val;
- win.realize.connect(() => {
- handle = (uint*)Gdk.X11Window.get_xid(win.get_window());
- });
- var e = Gst.ElementFactory.make("playbin","playbin");
- e.bus.add_watch(0,(bus,message) => {
- if(Gst.Video.is_video_overlay_prepare_window_handle_message(message))
- (message.src as Gst.Video.Overlay).set_window_handle(handle);
- return true;
- });
- e["uri"] = args[1];
- e.set_state(Gst.State.PLAYING);
- win.destroy.connect(Gtk.main_quit);
- win.show_all();
- Gtk.main();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement