<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 30 avr. 2019 15 h 55, Peter Maersk-Moller <<a href="mailto:pmaersk@gmail.com">pmaersk@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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'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></blockquote></div></div><div dir="auto"><br></div><div dir="auto">If you don't free it in the destroy callback, nothing else will free it.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><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></blockquote></div></div><div dir="auto"><br></div><div dir="auto">In general starting at 0 matches the default segment. Though, if it's live, you likely want to pick time from a clock or use do-timestamp.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div><br></div><div>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?</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">It's fine to leave duration unset when unknown.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Thanks in advance.</div><div>Peter MM<br></div></div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote></div></div></div>