[gstreamer-bugs] [Bug 635001] basesink: fix position reporting in PAUSED
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Tue Nov 16 09:58:13 PST 2010
https://bugzilla.gnome.org/show_bug.cgi?id=635001
GStreamer | gstreamer (core) | git
Wim Taymans <wim.taymans> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wim.taymans at gmail.com
--- Comment #3 from Wim Taymans <wim.taymans at gmail.com> 2010-11-16 17:58:09 UTC ---
+ if (oformat == tformat)
+ running_time = GST_ELEMENT_START_TIME (basesink);
+ else {
+ gint64 rt;
+
+ rt = gst_segment_to_running_time (segment, oformat, segment->last_stop);
+
+ /* convert values from segment to time */
+ if (!gst_pad_query_convert (basesink->sinkpad, oformat, accum, &tformat,
+ &accum))
+ goto convert_failed;
+ if (!gst_pad_query_convert (basesink->sinkpad, oformat, duration,
&tformat,
+ &duration))
+ goto convert_failed;
+ if (!gst_pad_query_convert (basesink->sinkpad, oformat, time, &tformat,
+ &time))
+ goto convert_failed;
+ if (!gst_pad_query_convert (basesink->sinkpad, oformat, rt, &tformat,
&rt))
+ goto convert_failed;
+
+ running_time = (rt < 0) ? 0 : rt;
}
Even if the segment format is not in time, we can use the START_TIME of the
element. The only reason you need to use the last_stop is when you don't have a
valid start_time.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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