[Bug 766647] adapter: Add a method to query current offset

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Jun 2 09:55:25 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=766647

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #328936|none                        |reviewed
             status|                            |

--- Comment #8 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 328936:
 --> (https://bugzilla.gnome.org/review?bug=766647&attachment=328936)

::: libs/gst/base/gstadapter.c
@@ +1363,3 @@
+ * The offset will be initially recorded for all buffers with
+ * %GST_BUFFER_FLAG_DISCONT on them, and then calculated for all other
following
+ * buffers based on their size.

I still don't like this very much as it's initialized with the initial offset
and then incremented with bytes. You might mix different units here.

What about having this function here always start at 0, and then adding a
gst_adapter_get_pts_dts_and_offset_at_discont(adapter, &pts, &dts, &offset) for
getting the timestamps and offsets at the discont? That way nothing would run
into the risk of mixing units in calculations and you still have all the
information that you need.

Of course instead of a big function for all 3 values, it might make more sense
to have 3 small functions :)

-- 
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