GStreamer Source Element for Proprietary Security Device

Mandar Joshi emailmandar at gmail.com
Sun Jul 5 17:40:55 UTC 2020


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.

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>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200705/e5cc2838/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sourceelement.h
Type: text/x-chdr
Size: 1311 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200705/e5cc2838/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sourceelement.cpp
Type: text/x-c++src
Size: 3878 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200705/e5cc2838/attachment.cpp>


More information about the gstreamer-devel mailing list