does the last element unref the data buffer went it is done with it?
Andres Gonzalez
andres.agoralabs at gmail.com
Thu Feb 11 03:55:17 UTC 2016
Hi,
I am using the following to create a GstBuffer to use for an appsrc. I have
a pre-allocated system buffer (pBuffer) that has video data that I pass to
the appsrc in a typical RTP/RTCP pipeline using rtpbin.
GstBuffer *pVideoBuffer = gst_buffer_new_wrapped_full
(GST_MEMORY_FLAG_READONLY,
pBuffer, m_nSize, 0, m_nSize,
m_pGstStreamBuffers, freeVideoBufferCB);
In the GStreamer Application Development Manual (1.7.0.1), chapter 9 on
Buffers, the next to last paragraph seems to imply that typically an element
will unref the buffer when it has passed it on to the next element in the
pipeline. So I thought the last element in my pipeline would unref the
buffer and then it would call the GDestroyNotify routine.
Obviously I have it totally wrong because, using the above buffer with its
GDestroyNotify routine (freeVideoBufferCB), it does not get called after
each buffer is used, but instead, is called when the application exits,
which by then has accumulated many, many references.
So my question is how does the application know when the last element in the
pipeline is finished with the data buffer so it can be unreffed? My
application is not getting any GST_MESSAGE_BUFFERING events and I cannot
find any signals that appear appropriate.
Thanks,
-Andres
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/does-the-last-element-unref-the-data-buffer-went-it-is-done-with-it-tp4675785.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list