[vlc-devel] [PATCH 4/5] libvlc: player: deprecate will_play()

Steve Lhomme robux4 at ycbcr.xyz
Mon May 13 14:15:50 CEST 2019


On 2019-05-09 18:01, Rémi Denis-Courmont wrote:
> Le torstaina 9. toukokuuta 2019, 18.56.57 EEST Romain Vimont a écrit :
>> This function is meaningless on the new player.
>> ---
>>   include/vlc/libvlc_media_player.h |  1 +
>>   lib/media_player.c                | 11 ++---------
>>   2 files changed, 3 insertions(+), 9 deletions(-)
>>
>> diff --git a/include/vlc/libvlc_media_player.h
>> b/include/vlc/libvlc_media_player.h index ca72a550d3..f831eefcff 100644
>> --- a/include/vlc/libvlc_media_player.h
>> +++ b/include/vlc/libvlc_media_player.h
>> @@ -946,6 +946,7 @@ LIBVLC_API int libvlc_media_player_get_chapter_count(
>> libvlc_media_player_t *p_m *
>>    * \libvlc_return_bool
>>    */
>> +LIBVLC_DEPRECATED
>>   LIBVLC_API int libvlc_media_player_will_play( libvlc_media_player_t *p_mi
>> );
> 
> You are probably better off removing it since 4.0 will break the API anyway.

If not the prototype should probably be moved to 
include/vlc/deprecated.h like the other API calls.

>>
>>   /**
>> diff --git a/lib/media_player.c b/lib/media_player.c
>> index c348ebdd26..12941fdb53 100644
>> --- a/lib/media_player.c
>> +++ b/lib/media_player.c
>> @@ -1669,15 +1669,8 @@ void libvlc_media_player_previous_chapter(
>> libvlc_media_player_t *p_mi )
>>
>>   int libvlc_media_player_will_play( libvlc_media_player_t *p_mi )
>>   {
>> -    input_thread_t *p_input_thread =
>> -                            libvlc_get_input_thread ( p_mi );
>> -    if ( !p_input_thread )
>> -        return false;
>> -
>> -    int state = var_GetInteger( p_input_thread, "state" );
>> -    input_Release(p_input_thread);
>> -
>> -    return state != END_S && state != ERROR_S;
>> +    (void) p_mi;
>> +    return true;
>>   }
>>
>>   int libvlc_media_player_set_rate( libvlc_media_player_t *p_mi, float rate )
> 
> 
> -- 
> Rémi Denis-Courmont
> http://www.remlab.net/
> 
> 
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list