<div dir="ltr"><div dir="ltr">On Sun, Jul 5, 2020 at 10:58 PM Mandar Joshi <<a href="mailto:emailmandar@gmail.com">emailmandar@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><br><div dir="auto">This is quite common. What we usually do is queue the called back buffer, and send them using the create() virtual function. If the queue is empty, we wait.</div><br>
</div></blockquote><div>Thank You so much<span><span name="Nicolas Dufresne"> Nicolas for the input. I was overriding just the _fill virtual function and that was leading to unimaginably large files and unplayable files with filesink. </span></span></div></div></div></blockquote><div><br></div><div>I've done this several times in various ways, to share a buffer created in a callback with create() or fill(). For matroxsrc[0] I used a single mutex protected buffer, and for kayasrc[1] I've used GAsyncQueue.</div><div><br></div><div>[0]: <a href="https://github.com/joshdoe/gst-plugins-vision/blob/master/sys/matrox/gstmatroxsrc.c">https://github.com/joshdoe/gst-plugins-vision/blob/master/sys/matrox/gstmatroxsrc.c</a></div><div>[1]: <a href="https://github.com/joshdoe/gst-plugins-vision/blob/master/sys/kaya/gstkayasrc.c">https://github.com/joshdoe/gst-plugins-vision/blob/master/sys/kaya/gstkayasrc.c</a></div></div></div>