[vlc-commits] [Git][videolan/libvlcpp][master] 2 commits: MediaPlayer: Deprecate old tracks API
Hugo Beauzée-Luyssen
gitlab at videolan.org
Tue Sep 15 17:08:05 CEST 2020
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / libvlcpp
Commits:
14b14cd2 by Hugo Beauzée-Luyssen at 2020-09-15T16:36:20+02:00
MediaPlayer: Deprecate old tracks API
- - - - -
a756e5ac by Hugo Beauzée-Luyssen at 2020-09-15T16:42:52+02:00
MediaPlayer: Expose single track selection/unselection
- - - - -
1 changed file:
- vlcpp/MediaPlayer.hpp
Changes:
=====================================
vlcpp/MediaPlayer.hpp
=====================================
@@ -967,6 +967,7 @@ public:
return libvlc_audio_set_volume(*this, i_volume) == 0;
}
+#if LIBVLC_VERSION_INT < LIBVLC_VERSION(4, 0, 0, 0)
/**
* Get number of available audio tracks.
*
@@ -1008,6 +1009,7 @@ public:
{
return libvlc_audio_set_track(*this, i_track) == 0;
}
+#endif
/**
* Get current audio channel.
@@ -1276,6 +1278,7 @@ public:
libvlc_video_set_aspect_ratio( *this, ar.size() > 0 ? ar.c_str() : nullptr );
}
+#if LIBVLC_VERSION_INT < LIBVLC_VERSION(4, 0, 0, 0)
/**
* Get current video subtitle.
*
@@ -1319,6 +1322,7 @@ public:
{
return libvlc_video_set_spu(*this, i_spu);
}
+#endif
#if LIBVLC_VERSION_INT < LIBVLC_VERSION(3, 0, 0, 0)
/**
@@ -1553,6 +1557,7 @@ public:
libvlc_video_set_teletext(*this, i_page);
}
+#if LIBVLC_VERSION_INT < LIBVLC_VERSION(4, 0, 0, 0)
/**
* Get number of available video tracks.
*
@@ -1595,6 +1600,7 @@ public:
{
return libvlc_video_set_track(*this, i_track);
}
+#endif
/**
* Take a snapshot of the current video window.
@@ -1870,8 +1876,22 @@ public:
ctracks.data(),
ctracks.size() );
}
+
+ void selectTrack( const MediaTrack& track )
+ {
+ libvlc_media_player_select_track( *this, track );
+ }
+
+ void unselectTrackType( MediaTrack::Type type )
+ {
+ libvlc_media_player_unselect_track_type( *this,
+ static_cast<libvlc_track_type_t>( type ) );
+ }
+
#endif
+#if LIBVLC_VERSION_INT < LIBVLC_VERSION(4, 0, 0, 0)
+
private:
std::vector<TrackDescription> getTracksDescription( libvlc_track_description_t* tracks ) const
{
@@ -1888,6 +1908,7 @@ private:
}
return result;
}
+#endif
private:
std::shared_ptr<MediaPlayerEventManager> m_eventManager;
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/compare/cc5c05311061ac3d2af0b36899b8558a4b1833d8...a756e5ac4a32c76abd78b148a210ac8e09e17813
--
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/compare/cc5c05311061ac3d2af0b36899b8558a4b1833d8...a756e5ac4a32c76abd78b148a210ac8e09e17813
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list