How can I set the "caps" property of an element? I'm tried the following ways but until now I had no luck.
Glib::RefPtr<Gst::Element> source = Gst::ElementFactory::create("multifilesrc", "source");
Glib::RefPtr<Gst::Caps> caps = Gst::Caps::from_string("image/jpeg,framerate=2/1");
source->set_property("caps", caps); // This gives me a compilation error.
source->set_property("caps", caps->gobj()); // This gives me a runtime warning and the pipeline does not work.
//(teste:20546): GLib-GObject-WARNING **: unable to set property `caps' of type `GstCaps' from value of type `glibmm__CustomPointer_P8_GstCaps'
I also tried to create a c caps object using the gstreamer C syntax instead of a C++ object, but this gave a similar problem that the caps->gobj().