El lun, 29 jul 2024 a la(s) 1:55 a.m., Rafael Sadowski
(raf...@sizeofvoid.org) escribió:
>
> On Sun Jul 28, 2024 at 07:51:14PM GMT, José Maldonado wrote:
> > El dom, 28 jul 2024 a la(s) 4:09 p.m., Rafael Sadowski
> > (raf...@sizeofvoid.org) escribió:
> > >
> > > On Sun Jul 28, 2024 at 09:59:49AM GMT, Rafael Sadowski wrote:
> > > > OK to enable VA-API support in qt6multimedia?
> > > >
> > > > I've been using it for a few weeks and haven't noticed any problems so
> > > > far.
> > > >
> > > > Index: Makefile
> > > > ===================================================================
> > > > RCS file: /cvs/ports/x11/qt6/qtmultimedia/Makefile,v
> > > > diff -u -p -r1.13 Makefile
> > > > --- Makefile  17 Jul 2024 07:30:57 -0000      1.13
> > > > +++ Makefile  28 Jul 2024 07:58:12 -0000
> > > > @@ -1,7 +1,7 @@
> > > >  QT6NAME =    QtMultimedia
> > > >  COMMENT =    Qt6 multimedia components
> > > >  PKGSPEC =    qt6-qtmultimedia-${QT6_PKGSPEC}
> > > > -REVISION =   0
> > > > +REVISION =   1
> > > >
> > > >  SHARED_LIBS +=  Qt6Multimedia             6.0 # 6.6
> > > >  SHARED_LIBS +=  Qt6MultimediaQuick        4.0 # 6.6
> > > > @@ -16,7 +16,7 @@ WANTLIB += Xrandr avcodec avformat avuti
> > > >  WANTLIB += gstallocators-1.0 gstapp-1.0 gstaudio-1.0 gstbase-1.0
> > > >  WANTLIB += gstgl-1.0 gstpbutils-1.0 gstphotography-1.0 gstreamer-1.0
> > > >  WANTLIB += gstvideo-1.0 gthread-2.0 intl m pulse swresample swscale
> > > > -WANTLIB += xkbcommon
> > > > +WANTLIB += va va-drm xkbcommon
> >
> > Why only active va and va-drm in WANTLIB?
> >
> > Usually, VAAPI activation require va va-drm and va-x11
> >
>
> This is not my decision. This is generated on the basis of the libraries used
> by qtmultimedia.
>
> My workflow: remove WANTLIB entries in Makefile and regen it with:
> make port-lib-depends-check
>
> But there's even more fun to be found in the codebase:
>
> src/plugins/multimedia/ffmpeg/qffmpegvaapisymbols.cpp:
>   22 static Libs loadLibs()
>   23 {
>   24     Libs libs;
>   25     libs.push_back(std::make_unique<QLibrary>("va"));
>   26 #ifdef DYNAMIC_RESOLVE_VA_DRM_SYMBOLS
>   27     libs.push_back(std::make_unique<QLibrary>("va-drm"));
>   28 #endif
>   29
>   30 #ifdef DYNAMIC_RESOLVE_VA_X11_SYMBOLS
>   31     libs.push_back(std::make_unique<QLibrary>("va-x11"));
>   32 #endif
>   33
>   34     if (LibSymbolsResolver::tryLoad(libs))
>   35         return libs;
>   36
>   37     return {};
>   38 }
>

In short: it does a dynamic resolution of both libraries, va-drm and va-x11.

If you haven't had any problems with it, good, because at least in mpv
using DRM + VAAPI ends up like this:

[vo/drm/drm] VT_GETMODE failed: Inappropriate ioctl for device
[vo/drm/drm] Failed to set up VT switcher. Terminal switching will be
unavailable.
[vo/drm/drm] Failed to commit ModeSetting atomic request: Permission denied
[vo/drm] Failed to set CRTC for connector 93: Permission denied
[vo/drm/drm] Failed to commit ModeSetting atomic request: Permission denied
[vo/drm/drm] Failed to restore previous mode
Error opening/initializing the selected video_out (--vo) device.


-- 
"Dios en su Cielo, todo bien en la Tierra"
***********************************************

Reply via email to