[Bug 733532] tsdemux: implement convert queries on the sinkpad

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Sep 16 07:45:18 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=733532
  GStreamer | gst-plugins-bad | git

Nicolas Dufresne (stormer) <nicolas.dufresne> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #284173|none                        |needs-work
             status|                            |

--- Comment #6 from Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> 2014-09-16 14:45:13 UTC ---
Review of attachment 284173:
 --> (https://bugzilla.gnome.org/review?bug=733532&attachment=284173)

Except for the locking, this looks good to me, the existing code already do
most of the job. As dlansrc is probably the only user, to keep this working in
the long term, it would be nice to have a light unit test.

e.g. filesrc ! tsdemux ! fakesink

Seek somewhere in time, convert to bytes, then seek there in bytes, check the
time matches. Or something along these lines. Not need for anything super
complex, just so make check triggers this code.

About the locking, you might only have to care about "reffing" and copying
point to what you need during the operation (using OBJECT_LOCK), unless all
these object are guarantied to stay around while you old a ref on the element
itself. I would also like if you check if mpegts_packetizer is thread safe.

::: gst/mpegtsdemux/tsdemux.c
@@ +586,3 @@
+
+      if (G_UNLIKELY (demux->program == NULL))
+        return FALSE;

Should you also check base->packetizer, or is this one refcount "protected" ?
(just to double check). You need some locking/refcount, as this may be called
from any thread.

@@ +592,3 @@
+      if (src_fmt == GST_FORMAT_BYTES && dest_fmt == GST_FORMAT_TIME) {
+        dest_val = mpegts_packetizer_offset_to_ts (base->packetizer, src_val,
+            demux->program->pcr_pid);

Is this call thread safe ?

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