GStreamer Source Element for Proprietary Security Device
Nicolas Dufresne
nicolas at ndufresne.ca
Mon Jul 6 16:22:41 UTC 2020
Le lundi 06 juillet 2020 à 08:13 -0400, Josh Doe a écrit :
> On Sun, Jul 5, 2020 at 10:58 PM Mandar Joshi <emailmandar at gmail.com> wrote:
> > > 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.
> > >
> > >
> >
> > Thank You so much 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.
> >
>
> 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.
>
> [0]: https://github.com/joshdoe/gst-plugins-vision/blob/master/sys/matrox/gstmatroxsrc.c
> [1]: https://github.com/joshdoe/gst-plugins-vision/blob/master/sys/kaya/gstkayasrc.c
And some more (they are a bit countless):
https://git.linuxtv.org/libcamera.git/tree/src/gstreamer/gstlibcamerasrc.cpp
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/blob/master/sys/v4l2/gstv4l2src.c
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/blob/master/sys/winks/gstksvideosrc.c
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list