[vlc-devel] [PATCHv3 00/17] libvlc: new track list and new track selection

Rémi Denis-Courmont remi at remlab.net
Thu Jun 11 17:35:47 CEST 2020


Le keskiviikkona 10. kesäkuuta 2020, 15.57.39 EEST Thomas Guillem a écrit :
> The full branch is available here:
> https://code.videolan.org/tguillem/vlc/commits/libvlc-tracks/6
> 
> Change since v2
> 
>  - libvlc_media_tracklist_at() doesn't return a const media anymore. The
> media need to be writable by the user so that he can update the selected
> state (via libvlc_media_player_update_tracklist()).
>  - Improved lib_media_player tests
>  - Added lib_media_player tracks API test
> 
> There is a problem with libvlc_media_tracklist_at() not returning const. The
> user might want to use libvlc_media_track_release() on a single track
> coming from the list (when he should use libvlc_media_tracklist_release()).
> The API & documentation says that it's illegal, but I'm not sure if it is
> enough. I could add assert/abort or change the way to update the track
> selection. What do you think ?

I'm not convinced that exposing player state in the track is a good idea, 
regardless of constness. It requires that tracks are tied to an active player 
instance, which does not sound like so forward-looking design. I'd leave the 
selected state separate.

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list