Buffer_replace
Ashok Tiwari
ashok.tiwari at serobit.com
Thu Jun 17 08:17:44 UTC 2021
I have developed application in which we are trying to add header
extension in the Probed buffer which have RTP Packet .
>> We are using the API "gst_pad_add_buffer_probe ( )" to get the probed
buffer .
>> Inside the callback function , we are creating own buffer which will
have RTP Header
extension with payload.
>> Now we are replacing probed buffer with the created buffer by using the
API
"gst_buffer_replace" but not able to replace the probed buffer .
>> I checked data pointer & malloc pointer of probed buffer , it is
changed to
data pointer & malloc pointer of created buffer .
>> It is changing locally not in the memory level.
>> I was observing the value of refcount , it is 2 for probed buffer , when
ever probed buffer
is getting unref it is losing it RTP Packet .
>> It is giving error that :
GStreamer-CRITICAL **: gst_mini_object_ref: assertion
'GST_IS_MINI_OBJECT (mini_object)' failed.
GStreamer-CRITICAL **: gst_mini_object_unref: assertion 'GST_IS_MINI_OBJECT
(mini_object)' failed.
>> I used the API "gst_buffer_make_writable()" to make the probed buffer
writable but
it is doing unref to make the refcount 1 once it changed we are losing
our RTP packet
>> What is way to solve this Issue & why this API is not changing in memory
level .
>> Any other way to replace probed buffer with created buffer.
>> How we can change the size of probed buffer without any memory leakage .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210617/28bab29c/attachment.htm>
More information about the gstreamer-devel
mailing list