vaapi and x-forwarding

Marianna S. Buschle msb at qtec.com
Tue Jun 15 08:32:58 UTC 2021


I have managed to get somewhat the behavior I want by doing something like:

gst-launch-1.0 videotestsrc is-live=true pattern=ball !
video/x-raw,framerate=30/1,format=NV12 ! tee name=t ! queue ! vaapih264enc
rate-control=4 bitrate=5000 ! video/x-h264,profile=high ! queue ! h264parse
! queue ! vaapih264dec low-latency=1 ! queue !
video/x-raw,framerate=30/1,format=NV12 ! queue ! videoconvert ! queue !
ximagesink sync=0 fakesrc ! vaapisink display=drm --gst-debug=*:3

The 'fakesrc ! vaapisink display=drm' forces the VADisplay to DRM and that
gets shared on the bus and set automatically on the
vaapih264enc/vaapih264dec

This pipeline dies right away:

0:00:00.167233055  5878 0x564d0741e4f0 WARN               vaapisink
gstvaapipluginbase.c:1260:gst_vaapi_plugin_base_pad_get_input_buffer:<vaapisink0>
error: failed to validate source buffer
0:00:00.167252497  5878 0x564d0741e4f0 WARN               vaapisink
gstvaapipluginbase.c:1260:gst_vaapi_plugin_base_pad_get_input_buffer:<vaapisink0>
error: failed to validate source buffer
ERROR: from element /GstPipeline:pipeline0/GstVaapiSink:vaapisink0: failed
to validate source buffer
Additional debug info:
../gstreamer-vaapi-1.18.2/gst/vaapi/gstvaapipluginbase.c(1260):
gst_vaapi_plugin_base_pad_get_input_buffer ():
/GstPipeline:pipeline0/GstVaapiSink:vaapisink0:
failed to validate source buffer
ERROR: pipeline doesn't want to preroll.
0:00:00.167433979  5878 0x564d0741e4f0 WARN                 basesrc
gstbasesrc.c:3127:gst_base_src_loop:<fakesrc0> error: Internal data stream
error.
0:00:00.167453711  5878 0x564d0741e4f0 WARN                 basesrc
gstbasesrc.c:3127:gst_base_src_loop:<fakesrc0> error: streaming stopped,
reason error (-5)
ERROR: from element /GstPipeline:pipeline0/GstFakeSrc:fakesrc0: Internal
data stream error.

But the rest continues to play fine.

Now I would like a bit more elegant solution, since I need to handle anyway
the HAVE_CONTEXT and NEED_CONTEXT messages on the bus because I want to
decouple my pipelines.
So I would like to do something like
https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/blob/master/tests/examples/test-vaapicontext.c#L127
but with the 'vaGetDisplayDRM()'.
However I can't seem to find python bindings for the VAAPI API?

And if I end up sticking with the solution of having a "dummy" pipeline like
'fakesrc ! vaapisink display=drm' just to create the DRM VADisplay so I can
set it in the others is there any penalty on doing that?



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list