After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 774689 - audiobuffersplit: New element that splits raw audio buffers into equal-sized buffers
audiobuffersplit: New element that splits raw audio buffers into equal-sized ...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal enhancement
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-18 19:03 UTC by Sebastian Dröge (slomo)
Modified: 2016-11-23 16:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
audiobuffersplit: New element that splits raw audio buffers into equal-sized buffers (23.28 KB, patch)
2016-11-18 19:03 UTC, Sebastian Dröge (slomo)
none Details | Review
audiobuffersplit: New element that splits raw audio buffers into equal-sized buffers (24.24 KB, patch)
2016-11-18 19:27 UTC, Sebastian Dröge (slomo)
none Details | Review
audiobuffersplit: New element that splits raw audio buffers into equal-sized buffers (25.07 KB, patch)
2016-11-21 08:19 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2016-11-18 19:03:11 UTC
See commit message
Comment 1 Sebastian Dröge (slomo) 2016-11-18 19:03:15 UTC
Created attachment 340265 [details] [review]
audiobuffersplit: New element that splits raw audio buffers into equal-sized buffers

This is useful e.g. if audio buffers should be exactly the duration of a
video frame, or if a audio buffers should never be too large because of
latency constraints.

The element is taking a fractional buffer duration, to allow working
with e.g. 1001/30000 as output duration and it accumulates rounding
errors in the buffer durations and compensates for them by making some
buffers one sample larger than the others.
Comment 2 Sebastian Dröge (slomo) 2016-11-18 19:27:58 UTC
Created attachment 340267 [details] [review]
audiobuffersplit: New element that splits raw audio buffers into equal-sized buffers

This is useful e.g. if audio buffers should be exactly the duration of a
video frame, or if a audio buffers should never be too large because of
latency constraints.

The element is taking a fractional buffer duration, to allow working
with e.g. 1001/30000 as output duration and it accumulates rounding
errors in the buffer durations and compensates for them by making some
buffers one sample larger than the others.
Comment 3 Tim-Philipp Müller 2016-11-19 10:46:20 UTC
I'm guessing you already considered deriving this from audiorate or raw audioparse but decided against it? :)
Comment 4 Sebastian Dröge (slomo) 2016-11-19 11:33:00 UTC
Yes, changing those to work differently seemed more work than just writing this thing directly. Especially the timestamp handling here vs what baseparse does. audiorate might've been a possible choice but it already does a lot of different things and the code seems complicated enough, and we would have to add a mode to audiorate then also to not fill up gaps with silence.

Might make sense to add the discont-wait logic to audiorate though.
Comment 5 Sebastian Dröge (slomo) 2016-11-21 08:19:04 UTC
Created attachment 340398 [details] [review]
audiobuffersplit: New element that splits raw audio buffers into equal-sized buffers

This is useful e.g. if audio buffers should be exactly the duration of a
video frame, or if a audio buffers should never be too large because of
latency constraints.

The element is taking a fractional buffer duration, to allow working
with e.g. 1001/30000 as output duration and it accumulates rounding
errors in the buffer durations and compensates for them by making some
buffers one sample larger than the others.
Comment 6 Sebastian Dröge (slomo) 2016-11-23 16:18:56 UTC
Attachment 340398 [details] pushed as 0acb3d8 - audiobuffersplit: New element that splits raw audio buffers into equal-sized buffers