Passing DMA buffer fd

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

Passing DMA buffer fd

Gururaj
Hi All,
I have created a gstreamer plugin which acts as a source element for camera
data.
In that plugin i have started the camera device in DMA buf mode using v4l2
api and drm api's
I'm able to get the data using the drmfd with the below ioctl call:
ioctl(drmfd, DRM_IOCTL_MODE_MAP_DUMB, &arg);

But i want to pass the fd to downstream elements

Can someone please hekp on how can i pass this fd to downstream elements so
that they can use that fd for accessing the dma buffer

Thanks in advance



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

Re: Passing DMA buffer fd

Nicolas Dufresne-5


Le lun. 28 déc. 2020 12 h 45, Gururaj <[hidden email]> a écrit :
Hi All,
I have created a gstreamer plugin which acts as a source element for camera
data.
In that plugin i have started the camera device in DMA buf mode using v4l2
api and drm api's
I'm able to get the data using the drmfd with the below ioctl call:
ioctl(drmfd, DRM_IOCTL_MODE_MAP_DUMB, &arg);

But i want to pass the fd to downstream elements

Can someone please hekp on how can i pass this fd to downstream elements so
that they can use that fd for accessing

Have you looked at existing element, v4l2src already produce dmabuf by default. It uses the GstDMABufAllocator to wrap the FD, this is a common class that let downstream know the type of memory and retrieve the FD without mapping.

 the dma buffer

Thanks in advance



--
Sent from: http://gstreamer-devel.966125.n4.nabble.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