Gst::QueryDuration issue

Jiergir Ogoerg f35f22fan at gmail.com
Thu Sep 6 09:14:32 PDT 2012


Hi,
I'm using the C++ backend of gstreamer (0.10)

The problem is that Gst::QueryDuration::create(Format format) returns
Glib::RefPtr<Gst::Query> instead of Glib::RefPtr<Gst::QueryDuration> which
makes it impossible to use the parse() method of the returned object since
parse() only exists in Gst::QueryDuration.

As a workaround I thought I'd cast the returned value to
Glib::RefPtr<Gst::QueryDuration> but the compiler refuses to do so.

Using Ubuntu 12.04 amd64, the documentation (libgstreamermm-0.10-doc)
doesn't tell how to do it.

However, in Ubuntu 12.10 (yet to be released), the documentation is updated
with an example but it doesn't compile because the example calls parse() on
a Gst::Query object which doesn't have such a method.

So how do I create a Gst::QueryDuration object to be able to call parse()
to get the duration? Is it a broken C++ bindings design?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120906/3e6832b9/attachment.html>


More information about the gstreamer-devel mailing list