<html><head></head><body>Yes, there's only one obsolete type per underlying data type, float, integer or string. No needs for more precision.<br><br><div class="gmail_quote">Le 25 octobre 2019 18:00:54 GMT+03:00, Alexandre Janniaux <ajanni@videolabs.io> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Hi,<br><br>On Fri, Oct 25, 2019 at 03:45:46PM +0200, Steve Lhomme wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> Now the modules only load if they are given a compatible decoder device.<br> This decoder device is loaded with the --dec-dev option.<hr> v3: don't fully remove the option, mark it obsolete and don't use it<br><br> There's no add_obsolete_module() so use add_obsolete_string() instead.<br></blockquote><br>Modules are a special case of string. As it doesn't display<br>metadata anymore in help or other places, there is not need<br>for an add_obsolete_module function. ;)<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><hr> lib/media_player.c | 11 ++++-------<br> modules/codec/avcodec/avcodec.c | 2 +-<br> modules/codec/avcodec/avcodec.h | 3 ---<br> modules/codec/avcodec/va.c | 4 +---<br> 4 files changed, 6 insertions(+), 14 deletions(-)<br><br> diff --git a/lib/media_player.c b/lib/media_player.c<br> index 70b470b3b02..965cab2100a 100644<br> --- a/lib/media_player.c<br> +++ b/lib/media_player.c<br> @@ -604,7 +604,6 @@ libvlc_media_player_new( libvlc_instance_t *instance )<br> var_Create( mp, "vout-cb-select-plane", VLC_VAR_ADDRESS );<br><br> var_Create (mp, "dec-dev", VLC_VAR_STRING);<br> - var_Create (mp, "avcodec-hw", VLC_VAR_STRING);<br> var_Create (mp, "drawable-xid", VLC_VAR_INTEGER);<br> #if defined (_WIN32) || defined (__OS2__)<br> var_Create (mp, "drawable-hwnd", VLC_VAR_INTEGER);<br> @@ -1008,7 +1007,7 @@ void libvlc_video_set_callbacks( libvlc_media_player_t *mp,<br> var_SetAddress( mp, "vmem-unlock", unlock_cb );<br> var_SetAddress( mp, "vmem-display", display_cb );<br> var_SetAddress( mp, "vmem-data", opaque );<br> - var_SetString( mp, "avcodec-hw", "none" );<br> + var_SetString( mp, "dec-dev", "none" );<br> var_SetString( mp, "vout", "vmem" );<br> var_SetString( mp, "window", "dummy" );<br> }<br> @@ -1087,13 +1086,11 @@ bool libvlc_video_direct3d_set_callbacks(libvlc_media_player_t *mp,<br> if ( engine == libvlc_video_direct3d_engine_d3d11 )<br> {<br> var_SetString ( mp, "vout", "direct3d11" );<br> - var_SetString ( mp, "avcodec-hw", "d3d11va");<br> var_SetString ( mp, "dec-dev", "d3d11-device" );<br> }<br> else if ( engine == libvlc_video_direct3d_engine_d3d9 )<br> {<br> var_SetString ( mp, "vout", "direct3d9" );<br> - var_SetString ( mp, "avcodec-hw", "dxva2");<br> var_SetString ( mp, "dec-dev", "d3d9-device" );<br> }<br> else<br> @@ -1118,7 +1115,7 @@ void libvlc_media_player_set_nsobject( libvlc_media_player_t *p_mi,<br> {<br> assert (p_mi != NULL);<br> #ifdef __APPLE__<br> - var_SetString (p_mi, "avcodec-hw", "");<br> + var_SetString (p_mi, "dec-dev", "");<br> var_SetString (p_mi, "vout", "");<br> var_SetString (p_mi, "window", "");<br> var_SetAddress (p_mi, "drawable-nsobject", drawable);<br> @@ -1153,7 +1150,7 @@ void libvlc_media_player_set_xwindow( libvlc_media_player_t *p_mi,<br> {<br> assert (p_mi != NULL);<br><br> - var_SetString (p_mi, "avcodec-hw", "");<br> + var_SetString (p_mi, "dec-dev", "");<br> var_SetString (p_mi, "vout", "");<br> var_SetString (p_mi, "window", drawable ? "embed-xid,any" : "");<br> var_SetInteger (p_mi, "drawable-xid", drawable);<br> @@ -1175,7 +1172,7 @@ void libvlc_media_player_set_hwnd( libvlc_media_player_t *p_mi,<br> {<br> assert (p_mi != NULL);<br> #if defined (_WIN32) || defined (__OS2__)<br> - var_SetString (p_mi, "avcodec-hw", "");<br> + var_SetString (p_mi, "dec-dev", "");<br> var_SetString (p_mi, "vout", "");<br> var_SetString (p_mi, "window",<br> (drawable != NULL) ? "embed-hwnd,any" : "");<br> diff --git a/modules/codec/avcodec/avcodec.c b/modules/codec/avcodec/avcodec.c<br> index ab76fd8e5ed..ad2201cb1fb 100644<br> --- a/modules/codec/avcodec/avcodec.c<br> +++ b/modules/codec/avcodec/avcodec.c<br> @@ -131,7 +131,7 @@ vlc_module_begin ()<br> add_obsolete_string( "ffmpeg-codec" ) /* removed since 2.1.0 */<br> add_string( "avcodec-codec", NULL, CODEC_TEXT, CODEC_LONGTEXT, true )<br> add_obsolete_bool( "ffmpeg-hw" ) /* removed since 2.1.0 */<br> - add_module("avcodec-hw", "hw decoder", "any", HW_TEXT, HW_LONGTEXT)<br> + add_obsolete_string( "avcodec-hw" ) /* removed since 4.0.0 */<br> #if defined(FF_THREAD_FRAME)<br> add_obsolete_integer( "ffmpeg-threads" ) /* removed since 2.1.0 */<br> add_integer( "avcodec-threads", 0, THREADS_TEXT, THREADS_LONGTEXT, true );<br> diff --git a/modules/codec/avcodec/avcodec.h b/modules/codec/avcodec/avcodec.h<br> index 5e526a3b1cd..1df39c613ab 100644<br> --- a/modules/codec/avcodec/avcodec.h<br> +++ b/modules/codec/avcodec/avcodec.h<br> @@ -109,9 +109,6 @@ int ffmpeg_OpenCodec( decoder_t *p_dec, AVCodecContext *, const AVCodec * );<br> "usually has a detrimental effect on quality. However it provides a big " \<br> "speedup for high definition streams." )<br><br> -#define HW_TEXT N_("Hardware decoding")<br> -#define HW_LONGTEXT N_("This allows hardware decoding when available.")<br> -<br> #define THREADS_TEXT N_( "Threads" )<br> #define THREADS_LONGTEXT N_( "Number of threads used for decoding, 0 meaning auto" )<br><br> diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c<br> index 277a8b1ba47..c4768f24bd0 100644<br> --- a/modules/codec/avcodec/va.c<br> +++ b/modules/codec/avcodec/va.c<br> @@ -119,9 +119,8 @@ vlc_va_t *vlc_va_New(vlc_object_t *obj,<br> if (unlikely(va == NULL))<br> return NULL;<br><br> - char *modlist = var_InheritString(obj, "avcodec-hw");<br><br> - if (vlc_module_load(va, "hw decoder", modlist, true,<br> + if (vlc_module_load(va, "hw decoder", NULL, true,<br> vlc_va_Start, va, avctx, src_desc, fmt_in, device,<br> fmt_out, vtcx_out) == NULL)<br> {<br> @@ -129,7 +128,6 @@ vlc_va_t *vlc_va_New(vlc_object_t *obj,<br> va = NULL;<br> }<br><br> - free(modlist);<br> return va;<br> }<br><br> --<br> 2.17.1<hr> vlc-devel mailing list<br> To unsubscribe or modify your subscription options:<br> <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></blockquote><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>