gstreamer1.0-vaapi 找不到驱动程序

gstreamer1.0-vaapi 找不到驱动程序

在 Ubuntu 16.04.3 Server 上,当我尝试在基于 Qt Quick 的图形应用程序(eglfs后端(EGL 全屏))中启动视频时,视频开始抽搐(变得断断续续、生涩,不知道该如何形容)。在之前的安装中,视频播放流畅。我*.so对新旧安装的视频播放过程中加载的树进行了比较。没有区别。我猜想问题可能出在硬件加速上。

安装gstreamer1.0-vaapi数据包并重新启动应用程序后,如果我按“播放”按钮,它就会挂起。日志包含以下消息:

error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so
libva info: va_openDriver() returns -1
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium
debug qml: Error: 1 (Could not initialize supporting library.) (qrc:///qml/imports/FileManager/components/VideoPlayer.qml:41)
warning default: Error: "Could not initialize supporting library." (unknown:0)
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium

error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so
libva info: va_openDriver() returns -1
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium
debug qml: Error: 1 (Could not initialize supporting library.) (qrc:///qml/imports/FileManager/components/VideoPlayer.qml:41)
warning default: Error: "Could not initialize supporting library." (unknown:0)
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium

然后我输入:

# apt-file search /usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so
mesa-va-drivers: /usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so
# apt install mesa-va-drivers
# ls /usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so
ls: cannot access '/usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so': No such file or directory

这怎么可能?有证据表明,该软件包mesa-va-drivers应该包含该*.so文件。其他软件包都没有。我应该自己构建 mesa va 驱动程序吗?

新旧系统均具有以下配置:AMD A10-7800 Radeon R7、12 个计算核心 4C+8G。

vainfo

error: can't connect to X server!
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

答案1

我实际上也遇到了同样的问题。是的,@RobertRiedl 评论说哪里是gallium_drv_video.so正确的。但是,它没有被列出,因为它只是指向另一个文件的链接。

为了修复它我做了以下事情:

cd /usr/lib/x86_64-linux-gnu/dri/
sudo rm gallium_drv_video.so
sudo apt install mesa_va_drivers
sudo ln -s radeonsi_drv_video.so gallium_drv_video.so

运行上述操作后,检查 vainfo 是否运行正常:

要纠正无法连接到 X 服务器,请运行:

export DISPLAY=:0
xhost +

运行vainfo以确保其正常工作:

:~$ vainfo
libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.39 (libva 1.7.1)
vainfo: Driver version: Mesa Gallium driver 18.1.0-devel for AMD RS880 (DRM 2.50.0 / 4.13.0-36-generic, LLVM 6.0.0)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

希望这可以帮助!

相关内容