View difference between Paste ID: gYmQBzSG and kStHDVrm
SHOW: | | - or go back to the newest paste.
1
public static void main (string[] args) {
2-
	X.init_threads();
2+
        X.init_threads();
3-
	Gst.init (ref args);
3+
        Gst.init (ref args);
4-
	Gtk.init (ref args);
4+
        Gtk.init (ref args);
5-
	
5+
       
6-
	var sink = Gst.ElementFactory.make ("gtksink", "sink");
6+
        var sink = Gst.ElementFactory.make ("gtksink", "sink");
7-
	var playbin = Gst.ElementFactory.make ("playbin", "bin");
7+
        var playbin = Gst.ElementFactory.make ("playbin", "bin");
8-
	playbin["video-sink"] = sink;
8+
        playbin["video-sink"] = sink;
9-
	playbin["uri"] = "http://www.nicolas-hoffmann.net/animations/Cavernae_Terragen2.mp4";
9+
        playbin["uri"] = "http://hd2.lagrosseradio.info:8200";
10-
	Gtk.Widget area;
10+
        Gtk.Widget area;
11-
	sink.get ("widget", out area);
11+
        sink.get ("widget", out area);
12-
	var win = new Gtk.Window();
12+
        var win = new Gtk.Window();
13-
	var bar = new Gtk.HeaderBar();
13+
        var bar = new Gtk.HeaderBar();
14-
	bar.title = "Test";
14+
        bar.title = "Test";
15-
	bar.show_close_button = true;
15+
        bar.show_close_button = true;
16-
	win.set_titlebar (bar);
16+
        win.set_titlebar (bar);
17-
	win.add (area);
17+
        win.add (area);
18-
	win.realize.connect (() => {
18+
        win.realize.connect (() => {
19-
		playbin.set_state (Gst.State.PLAYING);
19+
                playbin.set_state (Gst.State.PLAYING);
20-
	});
20+
        });
21-
	win.set_size_request (400, 300);
21+
        win.set_size_request (400, 300);
22-
	win.show_all();
22+
        win.show_all();
23-
	Gtk.main();
23+
        Gtk.main();
24
}