Problem by connecting a signal to a dynamic object
@tintou
Submitted by Corentin Noël Link to original bug (#690907)
Description
I have a class wich has a public dynamic Gst.Element. when in my main programm, I try to connect to a signal (source_setup for example), the compiler says that Gst.Element doesn't have the source_setup signal. As the object is dynamic, it should work.
Maybe this code example would be better:
// In a first file
public class MyObject : GLib.Object {
public dynamic Gst.Element playbin;
public MyObject () {
playbin = Gst.ElementFactory.make("playbin2", "play");
}
}
// In a second file
public dynamic Gst.Element playbin2;
int main (string[] args) {
try {
Gst.init_check (ref args);
} catch (Error err) {
error ("Could not init GStreamer: %s", err.message);
}
pipe = new MyObject ();
pipe.playbin.source_setup.connect (pipe_source_setup); // It doesn't work
playbin2 = pipe.playbin;
playbin2.source_setup.connect (pipe_source_setup); // It woks
}
Edited by Rico Tzschichholz