[vlc-devel] [PATCH v3 09/14] libvlc: allow selecting the video hardware acceleration
Rémi Denis-Courmont
remi at remlab.net
Thu Feb 13 18:56:05 CET 2020
Le torstaina 13. helmikuuta 2020, 17.44.50 EET Steve Lhomme a écrit :
> The values in the enum reflect the currently available decoder devices.
> ---
> include/vlc/libvlc_media_player.h | 53 +++++++++++++++++++++++++++++++
> lib/libvlc.sym | 1 +
> lib/media_player.c | 22 +++++++++++++
> 3 files changed, 76 insertions(+)
>
> diff --git a/include/vlc/libvlc_media_player.h
> b/include/vlc/libvlc_media_player.h index 5e0255a10ac..ad19c383a0c 100644
> --- a/include/vlc/libvlc_media_player.h
> +++ b/include/vlc/libvlc_media_player.h
> @@ -503,6 +503,59 @@ void libvlc_video_set_format_callbacks(
> libvlc_media_player_t *mp, libvlc_video_cleanup_cb cleanup );
>
>
> +/**
> + * Enumeration of the Video hardware processing acceleration to be used.
> + * can be passed to @a libvlc_video_set_video_acceleration
> + */
> +typedef enum libvlc_video_acceleration_t {
No way.
Plugins come and go. They can be added externally, or with new versions, they
can be removed, and of course, they depend on the platform and build options.
They cannot be described with an enum.
We've already been through this mess in the past, e.g., with the audio
"devices" (which really were audio channel maps). Not again.
Besides the application has no interactions with the hardware acceleration: it
provides a window (or render callbacks) and LibVLC is supposed to find the best
way to decode accordingly. In fact, VLC's understanding of hardware
acceleration is really an implementation detail that does not even make much
sense externally - SIMD is also hardware acceleration, and yet it's not
exposed. And you might need a combination of hardware acceleration depending
on, say, the codec.
--
Реми Дёни-Курмон
http://www.remlab.net/
More information about the vlc-devel
mailing list