DMABUF with gstreamer elements?

Martin Maurer meinemailingliste2 at online.de
Wed Mar 14 21:00:01 UTC 2018


Hi,

can someone describe a bit the usage and details of DMABUFs with 
gstreamer elements.
Take e.g. a H.264 decoder pipeline (video only) like the following:

filesrc location=test.mp4 ! qtdemux ! h264parse ! v4l2h264dec ! v4l2sink

When I don't specify io-mode (also in various name variants like 
capture-io-mode and output-io-mode),
no DMABUFs are used at all?
Ok, so I can request DMABUF in v4l2sink, v4l2h264dec is automatically 
configured to generate DMABUFs, which v4l2sink consume.
Or must I tell both side to use DMABUFs?

What about the input side of v4l2h264dec? When I enable DMABUFs, how far 
away from decoder are they used?
Till "end" of pipeline, so filesrc is also using DMABUFs?
Or only 1 element away from decoder, because h264parse is taking buffers 
and converts them to new buffers?
Or does it not work at all, because next element is not able to work 
with DMABUFs?

There were recent changes for tee, so DMABUFs now goes over tee with 
up-to-date version of gstreamer.
queues seems to be also no problem.
Are they elements which should be avoided, because they are not ready 
and/or make problems with DMABUFs?

What about dynamic pipelines? When the first path not yet uses DMABUF 
and newly attached pipeline now uses DMABUFs.
Can this work? Vice versa?

What about an input selector? One pipeline with DMABUFs on sink_0, one 
on sink_1. Do they work equal?
Or can DMABUF only work on sink_0, because the pipeline is connected at 
startup and information is exchanged?
Or is the info re-exchanged on each switching from one sink to the other?
(example a live pipeline on sink_0 and video playback pipeline on 
sink_1, all using DMABUFs as much as possible,
connected together to a common v4l2sink, via Input-Selector. Can this 
work? Any pitfalls?)

What else important do I need to know, when wanting to use DMABUFs?

Many thanks!

Best regards,

Martin





More information about the gstreamer-devel mailing list