GNOME Bugzilla – Bug 794545
baseaudiopayload: refactor to let subclasses prepare the output buffer
Last modified: 2018-11-03 12:04:31 UTC
The default implementation wraps the payload in a newly-allocated RTP buffer. Subclasses may want to use alternative methods.
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.
Created attachment 369935 [details] [review] baseaudiopayload: refactor to use a single push function
Created attachment 369936 [details] [review] baseaudiopayload: expose a prepare_output_buffer virtual method
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
Do you have a subclass that uses this? I'm not sure I understand why you want to do this?
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.
(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.
I wonder if this shouldn'T be all done in the base class? The same thing applies to all of the other subclasses potentially.
-- 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.