<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Currently, the libvlc media player API doesn't benefit of all the improvement I did on the vlc_player.<br></div><div>Example: the track selection is still done with the int i_id that could change midstream. You can't know the vout used by a ES track, you can't know if the vout is main one or a secondary one.<br></div><div><br></div><div>It's not planned to do it for 4.0, we just ported the implementation (libvlc mediaplayer implementation use vlc_player). I guess it's better to wait a little, see if the vlc_player API need improvements before copying the API for LibVLC.<br></div><div><br></div><div>The question is, do we (if so, when) want to update the libvlc media player API ?<br></div><div><br></div><div>On Mon, Jan 20, 2020, at 14:41, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="qt"><div>I have to disagree for the simple reason that I don't want to break the LibVLC API again in 5.0 (nor do I want to retain piles of legacy backward compatibility code).<br></div><div><br></div><div class="qt-gmail_quote"><div>Le 20 janvier 2020 12:13:12 GMT+02:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><pre class="qt-k9mail"><div>So, can I push this patch ? In that case, we could plan a libvlc media_player rework for 5.0 (that will be like the vlc_player one).<br></div><div><br></div><div>On Thu, Jan 16, 2020, at 16:21, Thomas Guillem wrote:<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(114, 159, 207);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>After more consideration, I really prefer not changing the LibVLC API <br></div><div>again (so, keeping this patch), I explain:<br></div><div><br></div><div>I really like the new vlc_player API (OK, I wrote it...). Ideally this <br></div><div>API should be exposed directly via LibVLC, but we can't really do it <br></div><div>since the vlc_player is new and can be modified again (and LibVLC API <br></div><div>should not be modified as frequently as CORE API).<br></div><div><br></div><div>What I propose/would like: add a new LibVLC media_player API for 5.0 <br></div><div>(or more) that is a copy of the vlc_player one (directly or via a <br></div><div>wrapper). If we do that, we might want to not change the LibVLC API for <br></div><div>4.0 since it will change again in 5.0.<br></div><div><br></div><div>On Thu, Jan 16, 2020, at 16:08, Alexandre Janniaux wrote:<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(173, 127, 168);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>Hi,<br></div><div><br></div><div>I agree against the backward compatibility choice,<br></div><div>otherwise we might want to change the function naming to<br></div><div>enforce this change.<br></div><div><br></div><div>It doesn't feel urgent to change this behaviour for VLC 4.0.<br></div><div><br></div><div>Regards,<br></div><div>--<br></div><div>Alexandre Janniaux<br></div><div>Videolabs<br></div><div><br></div><div>On Thu, Jan 16, 2020 at 03:02:48PM +0100, Thomas Guillem wrote:<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(138, 226, 52);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div> Regression from vlc_player.h port. libvlc_media_player expose the "disable"<br></div><div> track. A -1 id is still a good choice to disable a track, cf<br></div><div> src/input/es_out.c, a valid i_id can't be negative.<hr> lib/audio.c | 7 +++++++<br></div><div> lib/media_player.c | 18 ++++++++++++++++--<br></div><div> lib/video.c | 14 ++++++++++++++<br></div><div> 3 files changed, 37 insertions(+), 2 deletions(-)<br></div><div><br></div><div> diff --git a/lib/audio.c b/lib/audio.c<br></div><div> index aab84cd47a9..8222300707d 100644<br></div><div> --- a/lib/audio.c<br></div><div> +++ b/lib/audio.c<br></div><div> @@ -375,6 +375,13 @@ int libvlc_audio_set_track( libvlc_media_player_t *p_mi, int i_track )<br></div><div> vlc_player_t *player = p_mi->player;<br></div><div> vlc_player_Lock(player);<br></div><div><br></div><div> + if (i_track < 0)<br></div><div> + {<br></div><div> + vlc_player_UnselectTrackCategory(player, AUDIO_ES);<br></div><div> + i_ret = 0;<br></div><div> + goto end;<br></div><div> + }<br></div><div> +<br></div><div> size_t count = vlc_player_GetAudioTrackCount(player);<br></div><div> for( size_t i = 0; i < count; i++ )<br></div><div> {<br></div><div> diff --git a/lib/media_player.c b/lib/media_player.c<br></div><div> index cdb6ba0b8c5..e21ab5c1998 100644<br></div><div> --- a/lib/media_player.c<br></div><div> +++ b/lib/media_player.c<br></div><div> @@ -1671,14 +1671,28 @@ libvlc_track_description_t *<br></div><div> enum es_format_category_e cat )<br></div><div> {<br></div><div> vlc_player_t *player = p_mi->player;<br></div><div> - vlc_player_Lock(player);<br></div><div><br></div><div> libvlc_track_description_t *ret, **pp = &ret;<br></div><div><br></div><div> + /* Add the "Disable" track */<br></div><div> + libvlc_track_description_t *tr = malloc(sizeof (*tr));<br></div><div> + if (unlikely(tr == NULL))<br></div><div> + return NULL;<br></div><div> + tr->i_id = -1;<br></div><div> + tr->psz_name = strdup(_("Disable"));<br></div><div> + if (unlikely(!tr->psz_name))<br></div><div> + {<br></div><div> + free(tr);<br></div><div> + return NULL;<br></div><div> + }<br></div><div> + *pp = tr;<br></div><div> + pp = &tr->p_next;<br></div><div> +<br></div><div> + vlc_player_Lock(player);<br></div><div> size_t count = vlc_player_GetTrackCount(player, cat);<br></div><div> for (size_t i = 0; i < count; i++)<br></div><div> {<br></div><div> - libvlc_track_description_t *tr = malloc(sizeof (*tr));<br></div><div> + tr = malloc(sizeof (*tr));<br></div><div> if (unlikely(tr == NULL))<br></div><div> {<br></div><div> libvlc_printerr("Not enough memory");<br></div><div> diff --git a/lib/video.c b/lib/video.c<br></div><div> index 6f8e6d7f59a..9772945a958 100644<br></div><div> --- a/lib/video.c<br></div><div> +++ b/lib/video.c<br></div><div> @@ -317,6 +317,13 @@ int libvlc_video_set_spu( libvlc_media_player_t *p_mi, int i_spu )<br></div><div> vlc_player_t *player = p_mi->player;<br></div><div> vlc_player_Lock(player);<br></div><div><br></div><div> + if (i_spu < 0)<br></div><div> + {<br></div><div> + vlc_player_UnselectTrackCategory(player, SPU_ES);<br></div><div> + i_ret = 0;<br></div><div> + goto end;<br></div><div> + }<br></div><div> +<br></div><div> size_t count = vlc_player_GetSubtitleTrackCount(player);<br></div><div> for (size_t i = 0; i < count; i++)<br></div><div> {<br></div><div> @@ -488,6 +495,13 @@ int libvlc_video_set_track( libvlc_media_player_t *p_mi, int i_track )<br></div><div> vlc_player_t *player = p_mi->player;<br></div><div> vlc_player_Lock(player);<br></div><div><br></div><div> + if (i_track < 0)<br></div><div> + {<br></div><div> + vlc_player_UnselectTrackCategory(player, VIDEO_ES);<br></div><div> + i_ret = 0;<br></div><div> + goto end;<br></div><div> + }<br></div><div> +<br></div><div> size_t count = vlc_player_GetVideoTrackCount(player);<br></div><div> for( size_t i = 0; i < count; i++ )<br></div><div> {<br></div><div> --<br></div><div> 2.20.1<hr> vlc-devel mailing list<br></div><div> To unsubscribe or modify your subscription options:<br></div><div> <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></blockquote><div><hr>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></blockquote><div><hr>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></blockquote><div><hr>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></pre></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></body></html>