Hallo Community,
ich hoffe einer kennt sich hier in diesem Forum etwas mit gstreamer und Vala aus. Wenn nicht wäre ein Tipp, wo ich fragen könnte sehr nett.
Und zwar habe ich das Problem, dass ich die gstreamer Pipeline gerne in einem Window anzeigen will.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | using Gtk; using Gst; public class Thomas : Window { Pipeline pipeline; Window window; private Element src; private Element sink; public Thomas(){ setup(); } public void setup(){ this.pipeline = new Pipeline ("pipeline"); this.src = ElementFactory.make("videotestsrc" ,"video"); this.sink = ElementFactory.make("xvimagesink","sink"); this.pipeline.add_many(this.src,this.sink); this.src.link(this.sink); window = new Window(); window.title = "THOMAS"; window.set_default_size (500,400); window.show_all(); var video_window = new DrawingArea(); video_window.set_double_buffered(false); window.add(video_window); video_window.show_all(); video_window.realize(); ulong xid = (ulong)Gdk.X11Window.get_xid(video_window.get_window()); var xoverlay = this.sink as XOverlay; xoverlay.set_xwindow_id (xid); this.pipeline.set_state (State.PLAYING); } public static int main (string[] args) { Gtk.init (ref args); Gst.init (ref args); var thomas = new Thomas (); Gtk.main(); return 0; } } |
Leider bekomme ich nur ein schwarzes Bild bzw. ein verbuggtes von der aktuellen Bildschirm ausgabe.
Ich hoffe jemand kennt sich aus ☺