Commit 1a68132a authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

MediaPlayer: Expose new track listing API

parent 5d3887a9
......@@ -40,6 +40,7 @@ class Instance;
class Media;
class MediaPlayerEventManager;
class TrackDescription;
class TrackList;
///
/// \brief The MediaPlayer class exposes libvlc_media_player_t functionnalities
......@@ -1840,6 +1841,18 @@ public:
#endif
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
std::shared_ptr<TrackList> tracks( libvlc_track_type_t type )
{
auto trackList = libvlc_media_player_get_tracklist( *this, type );
if ( trackList == nullptr )
return nullptr;
return std::make_shared<TrackList>( trackList );
}
#endif
private:
std::vector<TrackDescription> getTracksDescription( libvlc_track_description_t* tracks ) const
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment