[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-devel
Subject:    Push a buffer to appsrc with private data.
From:       Peter Maersk-Moller <pmaersk () gmail ! com>
Date:       2019-04-30 19:53:02
Message-ID: CAGf_jGmcJD2MHYKzP30qQ-R_7=7WCS==HuM0JftVnXELJqyKJQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi.

I need to push a buffer with private data (otherwise allocated and later to
be reused) to appsrc and to be notified, when the buffer has been read and
not used by the pipeline that appsrc sources to.

Is the correct method to use gst_new_buffer_wrapped_full() to get the
buffer with the buffer's data pointer set to the private data and to get a
callback to the notify function I specify, when the buffer has been
read/used by the pipeline (and subsequently destroyed)?

Can I safely assume that the private data are I provided with the call is
NOT freed, when the buffer is destroyed by the pipeline (automatically)?

Since the private data is a video frame that needs to be encoded by the
pipeline (via the appsrc), is it thhen sufficiently to set the PTS for the
buffer to lets say 0 for the first frame (not setting the DTS) , and
something higher for next etc? The answer may be encoder specific, so
assume x264enc.

And is it okay to NOT set the duration for the buffer since I don't
necessarily know the duration when pushing the buffer to appsrc, since at
the time of pushing, I may not yet have the next frame and timestamp ready?

Thanks in advance.
Peter MM

[Attachment #5 (text/html)]

<div dir="ltr"><div>Hi.</div><div><br></div><div>I need to push a buffer with private \
data (otherwise allocated and later to be reused) to appsrc and to be notified, when \
the buffer has been read and not used by the pipeline that appsrc sources \
to.</div><div><br></div><div>Is the correct method to use \
gst_new_buffer_wrapped_full() to get the buffer with the buffer&#39;s data pointer \
set to the private data and to get a callback to the notify function I specify, when \
the buffer has been read/used by the pipeline (and subsequently \
destroyed)?</div><div><br></div><div>Can I safely assume that the private data are I \
provided with the call is NOT freed, when the buffer is destroyed by the pipeline \
(automatically)?</div><div><br></div><div>Since the private data is a video frame \
that needs to be encoded by the pipeline (via the appsrc), is it thhen sufficiently \
to set the PTS for the buffer to lets say 0 for the first frame (not setting the DTS) \
, and something higher for next etc? The answer may be encoder specific, so assume \
x264enc.<br></div><div><br></div><div>And is it okay to NOT set the duration for the \
buffer since I don&#39;t necessarily know the duration when pushing the buffer to \
appsrc, since at the time of pushing, I may not yet have the next frame and timestamp \
ready?</div><div><br></div><div>Thanks in advance.</div><div>Peter MM<br></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic