Overlay


Object Hierarchy:

Gst.Video.Overlay Gst.Video.Overlay Gst.Video.Overlay GLib.Object GLib.Object GLib.Object->Gst.Video.Overlay

Description:

[ CCode ( type_cname = "GstVideoOverlayInterface" , type_id = "gst_video_overlay_get_type ()" ) ]
[ GIR ( name = "VideoOverlay" ) ]
public interface Overlay : Object

Example: GTK-Integration:

public int main (string[] args) {
Gtk.init (ref args);
Gst.init (ref args);

if (args.length != 2) {
print ("% [VIDEO]\n", args[0]);
return 0;
}

var win = new Gtk.Window ();
uint val = 0;
uint *handle = &val;
win.realize.connect (() => {
handle = (uint*) ((Gdk.X11.Window) win.get_window ()).get_xid ();
});
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)) {
Gst.Video.Overlay overlay = message.src as Gst.Video.Overlay;
assert (overlay != null);

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 ();
return 0;
}

valac --pkg gstreamer-video-1.0 --pkg gtk+-3.0 --pkg gdk-x11-3.0 gtk-integration.vala


Namespace: Gst.Video

Content:

Static methods:

Methods:

Inherited Members: