GNOME Bugzilla – Bug 683580
Change Gst::QueryDuration::create() return value
Last modified: 2012-09-13 04:14:41 UTC
Gst::QueryDuration::create() returns a Glib::RefPtr<Gst::Query> object instead of Glib::RefPtr<Gst::QueryDuration> which requires a dynamic cast for each call to the methods of Gst::QueryDuration, like this: Glib::RefPtr<Gst::Query> query = Gst::QueryDuration::create(GST_FORMAT_TIME); dynamic casting: gint64 duration = Glib::RefPtr<Gst::QueryDuration>::cast_dynamic(query)->parse(); the "right" approach: return a Gst::QueryDuration object and just do this: gint64 duration = query->parse(); So, please change the create() constructor of Gst::QueryDuration so that it returns a Gst::QueryDuration object (as expected) instead of Gst::Query.
This has been fixed not for Gst::Qery derived classes, but also for the Gst::Event and the Gst::Message derived classes by this commit: http://git.gnome.org/browse/gstreamermm/commit/?id=dda1548634dc4bbc0d9fdb8a0fdc68f3371d86c5 Thanks.