Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main (string[] args) {
- X.init_threads();
- Gst.init (ref args);
- Gtk.init (ref args);
- var sink = Gst.ElementFactory.make ("gtksink", "sink");
- var playbin = Gst.ElementFactory.make ("playbin", "bin");
- playbin["video-sink"] = sink;
- playbin["uri"] = "http://www.nicolas-hoffmann.net/animations/Cavernae_Terragen2.mp4";
- Gtk.Widget area;
- sink.get ("widget", out area);
- var win = new Gtk.Window();
- var bar = new Gtk.HeaderBar();
- bar.title = "Test";
- bar.show_close_button = true;
- win.set_titlebar (bar);
- win.add (area);
- win.realize.connect (() => {
- playbin.set_state (Gst.State.PLAYING);
- });
- win.set_size_request (400, 300);
- win.show_all();
- Gtk.main();
- }
Add Comment
Please, Sign In to add comment