[vlc-commits] [Git][videolan/libvlcpp][master] MediaPlayer: Adapt to recent API changes
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Wed Jul 27 10:06:14 UTC 2022
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / libvlcpp
Commits:
d077d7e9 by Thomas Guillem at 2022-07-27T12:03:57+02:00
MediaPlayer: Adapt to recent API changes
- - - - -
3 changed files:
- .gitlab-ci.yml
- test/main.cpp
- vlcpp/MediaPlayer.hpp
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -1,6 +1,6 @@
variables:
VLC30_IMAGE: registry.videolan.org/medialibrary:20201009131431
- VLC40_IMAGE: registry.videolan.org/libvlcpp-unstable:20220620081936
+ VLC40_IMAGE: registry.videolan.org/libvlcpp-unstable:20220727093032
.common_build:
rules:
=====================================
test/main.cpp
=====================================
@@ -144,7 +144,7 @@ int main(int ac, char** av)
std::this_thread::sleep_for( std::chrono::milliseconds(500) );
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
- auto tracks = mp.tracks( VLC::MediaTrack::Type::Video );
+ auto tracks = mp.tracks( VLC::MediaTrack::Type::Video, false );
std::cout << "Got " << tracks.size() << " tracks" << std::endl;
mp.selectTracks( VLC::MediaTrack::Type::Video, tracks );
std::this_thread::sleep_for( std::chrono::milliseconds(1000) );
=====================================
vlcpp/MediaPlayer.hpp
=====================================
@@ -1872,12 +1872,13 @@ public:
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
- std::vector<MediaTrack> tracks( MediaTrack::Type type )
+ std::vector<MediaTrack> tracks( MediaTrack::Type type, bool selected )
{
using TrackListPtr = std::unique_ptr<libvlc_media_tracklist_t,
decltype(&libvlc_media_tracklist_delete)>;
TrackListPtr trackList{ libvlc_media_player_get_tracklist( *this,
- static_cast<libvlc_track_type_t>( type ) ),
+ static_cast<libvlc_track_type_t>( type ),
+ selected ),
&libvlc_media_tracklist_delete };
if ( trackList == nullptr )
return {};
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/commit/d077d7e9ac3810b4adda123e1d8156bbcd3793b5
--
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/commit/d077d7e9ac3810b4adda123e1d8156bbcd3793b5
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list