-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vo: hwdec: drmprime: add separate hwdecs for v4l2request #14690
base: master
Are you sure you want to change the base?
Conversation
Download the artifacts for this pull request: |
It's (very) likely just a dumb error on my part, but I'm getting an error when compiling it (on an arm64 device with Debian Trixie/Sid): /usr/bin/ld: libmpv.so.2.3.0.p/video_out_gpu_hwdec.c.o:(.data.rel.ro+0x20): undefined reference to `ra_hwdec_v4l2request'
/usr/bin/ld: libmpv.so.2.3.0.p/video_out_gpu_hwdec.c.o:(.data.rel.ro+0x28): undefined reference to `ra_hwdec_v4l2request_overlay' Parts of my build log (hopefully relevant): make[1]: Entering directory '/home/diederik/dev/debian/salsa/multimedia-team/mpv'
dh_auto_configure -- \
-Dlibmpv=true \
-Dbuild-date=false \
-Dcdda=enabled \
-Ddvdnav=enabled \
-Dsdl2=enabled \
-Dv4l2request=enabled \
-Davfoundation=disabled \
-Degl-angle-win32=disabled \
-Dgl-cocoa=disabled \
-Dgl-win32=disabled \
-Dios-gl=disabled \
-Duwp=disabled \
-Dvaapi-win32=disabled \
-Dwasapi=disabled \
-Dwin32-threads=disabled \
-Ddvbin=enabled
cd obj-aarch64-linux-gnu && DEB_PYTHON_INSTALL_LAYOUT=deb LC_ALL=C.UTF-8 meson setup .. --wrap-mode=nodownload --buildtype=plain --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=lib/aarch64-linux-gnu -Dpython.bytecompile=-1 -Dlibmpv=true -Dbuild-date=false -Dcdda=enabled -Ddvdnav=enabled -Dsdl2=enabled -Dv4l2request=enabled -Davfoundation=disabled -Degl-angle-win32=disabled -Dgl-cocoa=disabled -Dgl-win32=disabled -Dios-gl=disabled -Duwp=disabled -Dvaapi-win32=disabled -Dwasapi=disabled -Dwin32-threads=disabled -Ddvbin=enabled
The Meson build system
Version: 1.5.1
Source dir: /home/diederik/dev/debian/salsa/multimedia-team/mpv
Build dir: /home/diederik/dev/debian/salsa/multimedia-team/mpv/obj-aarch64-linux-gnu
Build type: native build
Project name: mpv
Project version: 0.38.0
C compiler for the host machine: cc (gcc 14.2.0 "cc (Debian 14.2.0-1) 14.2.0")
C linker for the host machine: cc ld.bfd 2.43
Host machine cpu family: aarch64
Host machine cpu: aarch64
...
Message: List of enabled features: alsa av-channel-layout avif-muxer caca cdda cplugins cuda-hwaccel cuda-interop dmabuf-interop-gl dmabuf-wayland drm dvbin dvdnav egl egl-drm egl-wayland egl-x11 ffmpeg ffnvcodec gbm gl glibc-thread-name glob glob-posix gpl iconv jack javascript jpeg jpegxl lavu-uuid lcms2 libarchive libass libavdevice libbluray libdl libplacebo linux-fstatfs lua52 memfd-create pipewire posix posix-shm ppoll pthread-condattr-setclock pulse rubberband rubberband-3 sdl2 sdl2-audio sdl2-gamepad sdl2-video sixel sndio sndio-1-9 uchardet v4l2request vaapi vaapi-drm vaapi-wayland vaapi-x11 vdpau vector vk-khr-display vt.h vulkan vulkan-interop wayland wayland-protocols-1-27 wayland-protocols-1-31 wayland-protocols-1-32 x11 xv zimg zimg-st428 zlib
Fetching value of define "MPV_CLIENT_API_VERSION" : (((2) << 16) | (3) | 0UL)
Compiler for C supports link arguments -Wl,-Bsymbolic: YES
Build targets in project: 46
mpv 0.38.0
d3d11 : NO
javascript : YES
libmpv : YES
lua : YES
opengl : YES
v4l2request : YES
vulkan : YES
wayland : YES
x11 : YES
User defined options
buildtype : plain
libdir : lib/aarch64-linux-gnu
localstatedir : /var
prefix : /usr
sysconfdir : /etc
wrap_mode : nodownload
python.bytecompile: -1
avfoundation : disabled
build-date : false
cdda : enabled
dvbin : enabled
dvdnav : enabled
egl-angle-win32 : disabled
gl-cocoa : disabled
gl-win32 : disabled
ios-gl : disabled
libmpv : true
sdl2 : enabled
uwp : disabled
v4l2request : enabled
vaapi-win32 : disabled
wasapi : disabled
win32-threads : disabled
Found ninja-1.12.1 at /usr/bin/ninja What am I missing? https://salsa.debian.org/diederik/mpv/-/commits/v4l2request-hwdevice is the source of my build |
@diederikdehaas yeah. I need to change how I did that conditional build logic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AV_HWDEVICE_TYPE_V4L2REQUEST
is a enum value so it cannot be used with #ifdef
, an #if
for HAVE_V4L2REQUEST
should work.
Should also be possible to change the v4l2request
feature to auto
as it check if the AV_HWDEVICE_TYPE_V4L2REQUEST
enum value exists.
We will probably adjust this to look for a specific libavutil version after v4l2request support is merged upstream, but this check is fine for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look ok, not tested though. I would wait for ffmpeg side of changes to be merged and after that we can retest and merge this guy.
FWIW: I've verified that on my amd64 PC, which does not have the ffmpeg changes, the build 'still' succeeds, but just without v4l2request support: Build targets in project: 46
mpv 0.38.0
d3d11 : NO
javascript : YES
libmpv : YES
lua : YES
opengl : YES
v4l2request : NO
vulkan : YES
wayland : YES
x11 : YES And that is confirmed by a successful CI build here: https://salsa.debian.org/diederik/mpv/-/pipelines/718879 Whereas on my arm64 device which does have ffmpeg changes, the build succeeds as well, but also has this line: v4l2request : YES You can still choose to wait ofc. Now on to runtime testing it... |
With my/Debian based 0.38 + this patch set I noticed the following on my PineTab2 with Sway:
This could ofc already be fixed in |
The second one has been reported in #13318. I was never personally able to reproduce but it's at least unrelated to the hwdec. |
With all the machinery in place, we can now add the v4l2request hwdecs with a different hw device type, and a different initialisation path. This applies to both the drmprime and drmprime_overlay hwdecs. At the moment, the device initialisation is done in the bare minimum way, but it can be extended to take a device path (for example) if that makes sense as we better understand what meaningful configuration will be. Co-authored-by: Jonas Karlman <jonas@kwiboo.se>
That's fine. I'll leave this here until it's in. |
With all the machinery in place, we can now add the v4l2request hwdecs with a different hw device type, and a different initialisation path. This applies to both the drmprime and drmprime_overlay hwdecs.
At the moment, the device initialisation is done in the bare minimum way, but it can be extended to take a device path (for example) if that makes sense as we better understand what meaningful configuration will be.
This change is based on the code proposed by Jonas Karlman jonas@kwiboo.se in #14511