Best subclass for a source element

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Best subclass for a source element

Mandar Joshi
Hello,
I'm writing a source element for a device with a proprietary API. Now, this API generates audio and video data that I need to push out the source pad.
I have written an element using GstBin, something of a wrapper for youtube-dl. This is it on GitHub, https://github.com/mndar/gstyoutubebin/

Taking this approach will mean, I'll have to write a separate program for the proprietary API. Is this the only way?

I've looked at GstPushSrc. I really want to use it. What do you think?

If data to pushed out the src pad is generated in proprietary callback, what would be the best way to push it out the src pad?

The idea I have is to store it in memory and read that memory in _fill. Of course, I'll make sure that concurrent access does not happen.

Any inputs will help.

Thank You
Mandar Joshi
Czar Softech

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Best subclass for a source element

Nicolas Dufresne-5
Le vendredi 12 juin 2020 à 03:31 +0530, Mandar Joshi a écrit :

> Hello,
> I'm writing a source element for a device with a proprietary API.
> Now, this API generates audio and video data that I need to push out
> the source pad.
> I have written an element using GstBin, something of a wrapper for
> youtube-dl. This is it on GitHub,
> https://github.com/mndar/gstyoutubebin/
>
> Taking this approach will mean, I'll have to write a separate program
> for the proprietary API. Is this the only way?

Using proprietary API withing a GStreamer plugin is fine, as long as
it's somewhat C compatible API. Decklink Source/Sink elements could be
looked at as reference.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/tree/master/sys/decklink

>
> I've looked at GstPushSrc. I really want to use it. What do you
> think?
>
> If data to pushed out the src pad is generated in proprietary
> callback, what would be the best way to push it out the src pad?
>
> The idea I have is to store it in memory and read that memory in
> _fill. Of course, I'll make sure that concurrent access does not
> happen.
>
> Any inputs will help.
>
> Thank You
> Mandar Joshi
> Czar Softech
> https://www.czarsoftech.com
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel