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 794545 - baseaudiopayload: refactor to let subclasses prepare the output buffer
baseaudiopayload: refactor to let subclasses prepare the output buffer
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-03-21 01:26 UTC by Mathieu Duponchelle
Modified: 2018-11-03 12:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
baseaudiopayload: remove unused buffer-list code (5.32 KB, patch)
2018-03-21 01:26 UTC, Mathieu Duponchelle
accepted-commit_now Details | Review
baseaudiopayload: refactor to use a single push function (4.83 KB, patch)
2018-03-21 01:26 UTC, Mathieu Duponchelle
accepted-commit_now Details | Review
baseaudiopayload: expose a prepare_output_buffer virtual method (5.25 KB, patch)
2018-03-21 01:26 UTC, Mathieu Duponchelle
needs-work Details | Review
rtpbaseaudiopayload: Copy metas in the prepare_output_buffer() implementation (1.89 KB, patch)
2018-03-28 16:48 UTC, Sebastian Dröge (slomo)
none Details | Review

Description Mathieu Duponchelle 2018-03-21 01:26:14 UTC
The default implementation wraps the payload in a newly-allocated RTP
buffer. Subclasses may want to use alternative methods.
Comment 1 Mathieu Duponchelle 2018-03-21 01:26:20 UTC
Created attachment 369934 [details] [review]
baseaudiopayload: remove unused buffer-list code

This property is disabled since 2012, if it is to be ever be
enabled again, this commit can serve as a reference, for now
remove that code to make maintaining and refactoring easier.
Comment 2 Mathieu Duponchelle 2018-03-21 01:26:26 UTC
Created attachment 369935 [details] [review]
baseaudiopayload: refactor to use a single push function
Comment 3 Mathieu Duponchelle 2018-03-21 01:26:32 UTC
Created attachment 369936 [details] [review]
baseaudiopayload: expose a prepare_output_buffer virtual method
Comment 4 Sebastian Dröge (slomo) 2018-03-21 07:19:58 UTC
Review of attachment 369936 [details] [review]:

The commit message could explain what this could be useful for :)

::: gst-libs/gst/rtp/gstrtpbaseaudiopayload.h
@@ +80,3 @@
+  gboolean (*prepare_output_buffer) (GstRTPBaseAudioPayload *payload,
+                                     GstBuffer *paybuf,
+                                     GstBuffer **outbuf);

You need to adjust the padding
Comment 5 Olivier Crête 2018-03-21 19:44:10 UTC
Do you have a subclass that uses this? I'm not sure I understand why you want to do this?
Comment 6 Sebastian Dröge (slomo) 2018-03-28 16:48:20 UTC
Created attachment 370251 [details] [review]
rtpbaseaudiopayload: Copy metas in the prepare_output_buffer() implementation

We can't do it outside because we either don't have the output buffer
yet, or we don't have the input buffer anymore.
Comment 7 Sebastian Dröge (slomo) 2018-04-03 07:13:16 UTC
(In reply to Olivier Crête from comment #5)
> Do you have a subclass that uses this? I'm not sure I understand why you
> want to do this?

Patches to follow. Mathieu has a patch to expose a buffer pool from rtppcmapay that returns a buffer to alawenc, and which has space before the beginning for the RTP header. So alawenc writes into the buffer, and rtppcmapay can directly write into the memory before that for the RTP header. Without any additional allocations or copying.
Comment 8 Olivier Crête 2018-04-03 14:43:55 UTC
I wonder if this shouldn'T be all done in the base class? The same thing applies to all of the other subclasses potentially.
Comment 9 GStreamer system administrator 2018-11-03 12:04:31 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/428.