Advertisement
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://hd2.lagrosseradio.info:8200";
- 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();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement