[Bug 744442] Unable to obtain GstClock from GstElement (Android)

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Feb 12 15:47:29 PST 2015


Olivier CrĂȘte <olivier.crete at ocrete.ca> changed:

           What    |Removed                     |Added
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |olivier.crete at ocrete.ca
         Resolution|---                         |NOTABUG

--- Comment #1 from Olivier CrĂȘte <olivier.crete at ocrete.ca> ---
You are only guaranteed to get a clock when you reach the playing state as the
selection of the clock is done during the paused->playing transition.

So you want to do something like:
gst_element_set_state(data->pipeline, GST_STATE_PLAYING);
gst_element_get_state(data->pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);
GstClock* clock = gst_element_get_clock(data->pipeline);

Note that the get_state() may block for some time, so you may want to instead
way for the state change GstMessage on the bus if you don't want to block.

To use with the net clock provider, the most common case is just to use the
system clock that you can get with gst_system_clock_obtain().

You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.

More information about the gstreamer-bugs mailing list