vaapih264dec doesn't seem to support video/x-raw(meta:GstVideoGLTextureUploadMeta) video/x-raw(memory:DMABuf)
Based on the doc here which says the src pad supports video/x-raw(meta:GstVideoGLTextureUploadMeta) and video/x-raw(memory:DMABuf). I tried testing them using the following pipelines respectively:
sudo gst-launch-1.0 videotestsrc num-buffers=100 ! video/x-raw, format=I420 ! x264enc ! h264parse ! vaapih264dec ! video/x-raw\(meta:GstVideoGLTextureUploadMeta\) ! fakesink
sudo gst-launch-1.0 videotestsrc num-buffers=100 ! video/x-raw, format=I420 ! x264enc ! h264parse ! vaapih264dec ! video/x-raw\(memory:DMABuf\) ! fakesink
In the first one I get "Internal data stream error" and in the 2nd I get "vaapidecode_h264-0 can't handle caps video/x-raw(memory:DMA)". 'Full output at the end).
Is this a bug or am I missing something?
$ sudo gst-launch-1.0 videotestsrc num-buffers=100 ! video/x-raw, format=I420 ! x264enc ! h264parse ! vaapih264dec ! video/x-raw\(meta:GstVideoGLTextureUploadMeta\) ! fakesink
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
Setting pipeline to PAUSED ...
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
Pipeline is PREROLLING ...
Got context from element 'vaapidecode_h264-0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayGBM\)\ gldisplaygbm0";
Got context from element 'vaapidecode_h264-0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayDRM\)\ vaapidisplaydrm1", gst.vaapi.Display.GObject=(GstObject)"\(GstVaapiDisplayDRM\)\ vaapidisplaydrm1";
Redistribute latency...
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
sudo gst-launch-1.0 videotestsrc num-buffers=100 ! video/x-raw, format=I420 ! x264enc ! h264parse ! vaapih264dec ! video/x-raw\(memory:DMABuf\) ! fakesink
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
WARNING: erroneous pipeline: could not link vaapidecode_h264-0 to fakesink0, vaapidecode_h264-0 can't handle caps video/x-raw(memory:DMABuf)