gtk4paintablesink usage in Vala
Hi,
I'm having problems with using gtk4paintablesink with Vala, here is my example code:
var pipeline = new Gst.Pipeline("test");
var src = Gst.ElementFactory.make("videotestsrc", "src");
var sink = Gst.ElementFactory.make("gtk4paintablesink", "sink");
pipeline.add_many(src, sink);
src.link(sink);
// Get the paintable from the sink
GLib.Value val = GLib.Value(typeof(Gdk.Paintable));
sink.get_property("paintable", ref val);
var paintable = val as Gdk.Paintable;
var image = new Gtk.Picture();
image.set_size_request(800, 600);
image.set_paintable (paintable);
pipeline.set_state(Gst.State.READY);
The problem I'm observing is that the Picture is completely black, nothing is displayed at all. When i remove set_paintable line the image is rendered white so something is happening but not much :/
I appreciate any kind of help here...
Many thanks in advance.