Applications depend on Gstreamer fails to decode video when gstreamer1-vaapi is install on wayland
Hardware
- GPU: amdgpu
- OS: Fedora 29
- DESKTOP Environtment: Gnome
- Session: Wayland
VAINFO
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'radeonsi'
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_3
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Mesa Gallium driver 18.2.8 for AMD STONEY (DRM 3.27.0, 4.20.8-200.fc29.x86_64, LLVM 7.0.0)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
Steps to reproduce
Play any video on totem with gstreamer vaapi installed.
Expected result
Totem should play as non gstreamer applications plays/decodes using vaapi.
Actual Result
It shows a black window, and frozen.
gst-launch1 playbin plays just fine.
gst-launch1 logs
gst-launch-log.log <- this log is wrong, look for the other log in this issue.
Update
The issue is due to mesa-vaapi+wayland+GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META gstreamer-vaapi uses eglExportDRMImageMESA and mesa-vaapi does not support creating a surface from a gem buffer. But mesa-vaapi supports creating a surface from dmabuf so we need to make gstreamer-vaapi to use eglExportDMABUFImageMESA when gem is not supported.