<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le dim. 5 juill. 2020 14 h 45, Mandar Joshi <<a href="mailto:emailmandar@gmail.com">emailmandar@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>Hello,</div><div>I have the task of developing a GStreamer source element for a proprietary security device. The SDK is Linux based and I have the SDK linked with the GStreamer element. Currently, the element is GstPushSrc based, and in its very basic form can write data received from the security device to a FILE using fwrite and this file is playable using mpv. No GstBuffers or filesink yet.<br></div><div><br></div><div>Here's what I need/want to do and in the remainder of the email, it'll hopefully become clear on which areas I'm seeking inputs.</div><div><br></div><div>The SDK has a callback that allows data from the security device to be retrieved in a callback. It's not pull-based or something I can read some 1000 bytes at a time and then fill into a GstBuffer in the _fill function of a GstPushSrc based element. Now, I need to push it out of the source element and have to processed/dumped to file by various GStreamer elements. I'm seeking some assistance on this.</div><div><br></div><div>Is it possible to store whatever is read in the proprietary SDK callback in say a buffer and then fill it into the GstBuffer in the _fill function?</div><div><br></div><div>I've attached the progress I've made with this email. Names changed for obvious reasons as there is an NDA involved. <br></div><div><br></div><div>Given the problems I'm facing, I'm even considering if an appsrc based solution would better. I would prefer a source element as the solution becomes elegant this way but I'm still open to suggestions.</div><div><br></div><div>Guys, any suggestions appreciated. <br></div></div></blockquote></div></div><div dir="auto"><br></div><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><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>Being under an NDA, I'm not allowed to disclose all the details but I'll reveal as much as I can. Could you guys have a look at sourcelement.cpp and sourcelement.h to see what I'm trying to achieve?</div><div><br></div><div>Regards,</div><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div>Mandar Joshi</div><div>Czar Softech</div><div><i><a href="https://www.czarsoftech.com" target="_blank" rel="noreferrer">https://www.czarsoftech.com</a></i><br></div></div></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><br>
</blockquote></div></div></div>