[vlc-devel] [PATCH 3/3] core: remove the avcodec-hw variable
Rémi Denis-Courmont
remi at remlab.net
Fri Oct 25 14:35:57 CEST 2019
This seems to miss setting the dec device instead of avcodec-hw
Le 25 octobre 2019 14:01:58 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>Now the modules only load if they are given a compatible decoder
>device.
>This decoder device is loaded with the --dec-dev option.
>---
> lib/media_player.c | 7 -------
> modules/codec/avcodec/avcodec.c | 1 -
> modules/codec/avcodec/avcodec.h | 3 ---
> modules/codec/avcodec/va.c | 4 +---
> 4 files changed, 1 insertion(+), 14 deletions(-)
>
>diff --git a/lib/media_player.c b/lib/media_player.c
>index 70b470b3b02..fa9dc307615 100644
>--- a/lib/media_player.c
>+++ b/lib/media_player.c
>@@ -604,7 +604,6 @@ libvlc_media_player_new( libvlc_instance_t
>*instance )
> var_Create( mp, "vout-cb-select-plane", VLC_VAR_ADDRESS );
>
> var_Create (mp, "dec-dev", VLC_VAR_STRING);
>- var_Create (mp, "avcodec-hw", VLC_VAR_STRING);
> var_Create (mp, "drawable-xid", VLC_VAR_INTEGER);
> #if defined (_WIN32) || defined (__OS2__)
> var_Create (mp, "drawable-hwnd", VLC_VAR_INTEGER);
>@@ -1008,7 +1007,6 @@ void libvlc_video_set_callbacks(
>libvlc_media_player_t *mp,
> var_SetAddress( mp, "vmem-unlock", unlock_cb );
> var_SetAddress( mp, "vmem-display", display_cb );
> var_SetAddress( mp, "vmem-data", opaque );
>- var_SetString( mp, "avcodec-hw", "none" );
> var_SetString( mp, "vout", "vmem" );
> var_SetString( mp, "window", "dummy" );
> }
>@@ -1087,13 +1085,11 @@ bool
>libvlc_video_direct3d_set_callbacks(libvlc_media_player_t *mp,
> if ( engine == libvlc_video_direct3d_engine_d3d11 )
> {
> var_SetString ( mp, "vout", "direct3d11" );
>- var_SetString ( mp, "avcodec-hw", "d3d11va");
> var_SetString ( mp, "dec-dev", "d3d11-device" );
> }
> else if ( engine == libvlc_video_direct3d_engine_d3d9 )
> {
> var_SetString ( mp, "vout", "direct3d9" );
>- var_SetString ( mp, "avcodec-hw", "dxva2");
> var_SetString ( mp, "dec-dev", "d3d9-device" );
> }
> else
>@@ -1118,7 +1114,6 @@ void libvlc_media_player_set_nsobject(
>libvlc_media_player_t *p_mi,
> {
> assert (p_mi != NULL);
> #ifdef __APPLE__
>- var_SetString (p_mi, "avcodec-hw", "");
> var_SetString (p_mi, "vout", "");
> var_SetString (p_mi, "window", "");
> var_SetAddress (p_mi, "drawable-nsobject", drawable);
>@@ -1153,7 +1148,6 @@ void libvlc_media_player_set_xwindow(
>libvlc_media_player_t *p_mi,
> {
> assert (p_mi != NULL);
>
>- var_SetString (p_mi, "avcodec-hw", "");
> var_SetString (p_mi, "vout", "");
> var_SetString (p_mi, "window", drawable ? "embed-xid,any" : "");
> var_SetInteger (p_mi, "drawable-xid", drawable);
>@@ -1175,7 +1169,6 @@ void libvlc_media_player_set_hwnd(
>libvlc_media_player_t *p_mi,
> {
> assert (p_mi != NULL);
> #if defined (_WIN32) || defined (__OS2__)
>- var_SetString (p_mi, "avcodec-hw", "");
> var_SetString (p_mi, "vout", "");
> var_SetString (p_mi, "window",
> (drawable != NULL) ? "embed-hwnd,any" : "");
>diff --git a/modules/codec/avcodec/avcodec.c
>b/modules/codec/avcodec/avcodec.c
>index ab76fd8e5ed..ff19c896723 100644
>--- a/modules/codec/avcodec/avcodec.c
>+++ b/modules/codec/avcodec/avcodec.c
>@@ -131,7 +131,6 @@ vlc_module_begin ()
> add_obsolete_string( "ffmpeg-codec" ) /* removed since 2.1.0 */
> add_string( "avcodec-codec", NULL, CODEC_TEXT, CODEC_LONGTEXT, true )
> add_obsolete_bool( "ffmpeg-hw" ) /* removed since 2.1.0 */
>- add_module("avcodec-hw", "hw decoder", "any", HW_TEXT,
>HW_LONGTEXT)
> #if defined(FF_THREAD_FRAME)
> add_obsolete_integer( "ffmpeg-threads" ) /* removed since 2.1.0 */
>add_integer( "avcodec-threads", 0, THREADS_TEXT, THREADS_LONGTEXT, true
>);
>diff --git a/modules/codec/avcodec/avcodec.h
>b/modules/codec/avcodec/avcodec.h
>index 5e526a3b1cd..1df39c613ab 100644
>--- a/modules/codec/avcodec/avcodec.h
>+++ b/modules/codec/avcodec/avcodec.h
>@@ -109,9 +109,6 @@ int ffmpeg_OpenCodec( decoder_t *p_dec,
>AVCodecContext *, const AVCodec * );
>"usually has a detrimental effect on quality. However it provides a big
>" \
> "speedup for high definition streams." )
>
>-#define HW_TEXT N_("Hardware decoding")
>-#define HW_LONGTEXT N_("This allows hardware decoding when
>available.")
>-
> #define THREADS_TEXT N_( "Threads" )
>#define THREADS_LONGTEXT N_( "Number of threads used for decoding, 0
>meaning auto" )
>
>diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c
>index 277a8b1ba47..c4768f24bd0 100644
>--- a/modules/codec/avcodec/va.c
>+++ b/modules/codec/avcodec/va.c
>@@ -119,9 +119,8 @@ vlc_va_t *vlc_va_New(vlc_object_t *obj,
> if (unlikely(va == NULL))
> return NULL;
>
>- char *modlist = var_InheritString(obj, "avcodec-hw");
>
>- if (vlc_module_load(va, "hw decoder", modlist, true,
>+ if (vlc_module_load(va, "hw decoder", NULL, true,
> vlc_va_Start, va, avctx, src_desc, fmt_in, device,
> fmt_out, vtcx_out) == NULL)
> {
>@@ -129,7 +128,6 @@ vlc_va_t *vlc_va_New(vlc_object_t *obj,
> va = NULL;
> }
>
>- free(modlist);
> return va;
> }
>
>--
>2.17.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20191025/79b9584e/attachment.html>
More information about the vlc-devel
mailing list