After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767699 - vaapisink: don't reply raw caps if no VA display
vaapisink: don't reply raw caps if no VA display
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
git master
Other Linux
: Normal normal
: 1.8.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-06-15 15:45 UTC by Víctor Manuel Jáquez Leal
Modified: 2016-06-16 11:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vaapisink: return caps template if no display (2.72 KB, patch)
2016-06-15 18:25 UTC, Víctor Manuel Jáquez Leal
committed Details | Review

Description Víctor Manuel Jáquez Leal 2016-06-15 15:45:27 UTC
This pipeline fails

$ gst-launch-1.0 filesrc location= ~/patterns/517748282_4.mp4 ! decodebin ! autovideosink

The output is:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns 0
libva info: Trying to open /opt/gnome/jh/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
Got context from element 'vaapidecode': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)NULL;
Redistribute latency...
WARNING: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0: Delayed linking failed.
Additional debug info:
./grammar.y(506): void gst_parse_no_more_pads(GstElement *, gpointer) (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0:
failed delayed linking some pad of GstDecodeBin named decodebin0 to some pad of GstAutoVideoSink named autovideosink0
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0: GStreamer encountered a general stream error.
Additional debug info:
qtdemux.c(5766): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:
streaming stopped, reason not-linked
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

Nonetheless, in branch 1.8 is working.
Comment 1 Víctor Manuel Jáquez Leal 2016-06-15 17:03:59 UTC
This is the result of my bisect:

* fd04a7c (refs/bisect/bad) gst/vaapi: keep precedence for NV12 over I420
* 75a20de (HEAD, refs/bisect/good-75a20deab46a40442b64d53218f37825647401fb) vaapidecode: Use video format derived from decoded surface as default src pad format
Comment 2 Víctor Manuel Jáquez Leal 2016-06-15 17:49:44 UTC
Two problems here:

1\ Autovideosink chooses first vaapisink, but it ditches it because the caps template of vaapisink doesn't match with video/x-raw (!!!!)

2\ Autovideosink then chooses, in my setup, ximagesink, but it cannot be linked because decodebin (with vaapi) set the src caps as video/x-raw(memory:VASurface), format=NV12 which is not handled by ximagesink

Workarounds:

gst-launch-1.0 filesrc location=example.mp4 ! decodebin ! {videoconvert,vaapipostproc} ! autovideosink

gst-launch-1.0 filesrc location=example.mp4 ! decodebin ! autovideosink filter-caps="video/x-raw\(memory:VASurface\)"

First we have to know why the vaapisink caps template doesn't match with video/x-raw
Comment 3 Víctor Manuel Jáquez Leal 2016-06-15 18:25:22 UTC
Created attachment 329871 [details] [review]
vaapisink: return caps template if no display

If vaapisink received a caps query before getting a VA display, it returned
only the surfaces related caps. This behavior broke the autovideosink
negotiation.

This patch returns the pad's template caps if no VA display, otherwise the
caps are crafted as before.
Comment 4 Víctor Manuel Jáquez Leal 2016-06-16 11:27:16 UTC
Attachment 329871 [details] pushed as aee9166 - vaapisink: return caps template if no display
Comment 5 Víctor Manuel Jáquez Leal 2016-06-16 11:35:29 UTC
also backported to branch 1.8