dmabuf from appsink
Lusine Hayrapetyan
lusinehayrapetyan1992 at gmail.com
Wed Sep 15 16:01:29 UTC 2021
Hi Nicolas,
Thank you for the information. Let me give more details. Basically I'm
looking for something like this:
*gst-launch-1.0 filesrc location=input.mp4 ! qtdemux ! h264parse !
nvh264dec ! gldownload ! appsink sync=false
caps=video/x-raw\(memory:DMABuf\)*
gldownload src pad has *memory:DMABuf *support so I expect this to work but
caps negotiation is failing. Am I missing something?
*Setting pipeline to PAUSED ...Pipeline is PREROLLING ...Got context from
element 'gldownloadelement0': gst.gl
<http://gst.gl/>.GLDisplay=context, gst.gl
<http://gst.gl/>.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\
gldisplayx11-0";Got context from element 'nvh264dec0':
gst.cuda.context=context,
gst.cuda.context=(GstCudaContext)"\(GstCudaContext\)\ cudacontext0",
cuda-device-id=(int)0;Redistribute latency...ERROR: from element
/GstPipeline:pipeline0/GstQTDemux:qtdemux0: Internal data stream
error.Additional debug
info:../subprojects/gst-plugins-good/gst/isomp4/qtdemux.c(6650):
gst_qtdemux_loop (): /GstPipeline:pipeline0/GstQTDemux:qtdemux0:streaming
stopped, reason not-negotiated (-4)ERROR: pipeline doesn't want to
preroll.Setting pipeline to NULL ...Freeing pipeline ...*
When I use memory:GLMemory instead of *memory:DMABuf the pipeline works.*
Is it possible to convert GLMemory to *DMABuf?*
Regards,
Lusine
On Wed, Sep 8, 2021 at 9:05 PM Nicolas Dufresne <nicolas at ndufresne.ca>
wrote:
> Le mercredi 08 septembre 2021 à 19:17 +0400, Lusine Hayrapetyan via
> gstreamer-
> devel a écrit :
> > Hi Folks,
> >
> > I have a pipeline which does gpu decoding and ends with appsink.
> > Is it possible to get dmabuf from appsink with zero-copy?
>
> Yes, though may require an extra step. Here's some example:
>
> Checking if you did receive dmabuf:
>
> https://gitlab.freedesktop.org/mesa/kmscube/-/blob/master/gst-decoder.c#L395
>
> Getting dmabuf FD (note that dup is optional, you can simply ref the
> gstmemory
> or the buffer for the needed amount of time):
>
> https://gitlab.freedesktop.org/mesa/kmscube/-/blob/master/gst-decoder.c#L412
>
> Telling upstream that you support GstVideoMeta can greatly help preventing
> upstream copies:
>
> https://gitlab.freedesktop.org/mesa/kmscube/-/blob/master/gst-decoder.c#L242
>
> >
> > Thanks,
> > Lusine
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210915/0a823727/attachment-0001.htm>
More information about the gstreamer-devel
mailing list