[Bug 787560] audio: Add helper object for audio discontinuity detection

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Sep 27 15:21:55 UTC 2017


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

Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> changed:

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

--- Comment #21 from Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> ---
Review of attachment 359723:
 --> (https://bugzilla.gnome.org/review?bug=787560&attachment=359723)

::: gst/audiobuffersplit/gstaudiobuffersplit.c
@@ +154,3 @@
+  self->stream_align = gst_audio_stream_align_new (48000);
+  gst_audio_stream_align_set_alignment_threshold (self->stream_align,
+      DEFAULT_ALIGNMENT_THRESHOLD);

This is a good argument toward moving the alignment threshold as a paramter to
_new().

@@ +156,3 @@
+      DEFAULT_ALIGNMENT_THRESHOLD);
+  gst_audio_stream_align_set_discont_wait (self->stream_align,
+      DEFAULT_DISCONT_WAIT);

And maybe this one too then ?

@@ +389,3 @@
+      || GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_RESYNC),
+      GST_BUFFER_PTS (buffer), gst_buffer_get_size (buffer) / bpf, NULL, NULL,
+      NULL);

I would create couple of local variable to make this more readable.

::: gst/audiobuffersplit/gstaudiobuffersplit.h
@@ +53,3 @@
   GstAdapter *adapter;

+  GstAudioStreamAlign *stream_align;

The new API is not thread safe, and this is access through property. Maybe
document the locking ? OBJECT_LOCK ?

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