GStreamer Source Element for Proprietary Security Device

Nicolas Dufresne nicolas at ndufresne.ca
Sun Jul 5 23:18:38 UTC 2020


Le dim. 5 juill. 2020 14 h 45, Mandar Joshi <emailmandar at gmail.com> a
écrit :

> Hello,
> 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.
>
> 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.
>
> 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.
>
> 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?
>
> I've attached the progress I've made with this email. Names changed for
> obvious reasons as there is an NDA involved.
>
> 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.
>
> Guys, any suggestions appreciated.
>

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.


> 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?
>
> Regards,
> Mandar Joshi
> Czar Softech
> *https://www.czarsoftech.com <https://www.czarsoftech.com>*
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200705/051414e3/attachment.htm>


More information about the gstreamer-devel mailing list