[vlc-commits] [Git][videolan/npapi-vlc][master] 2 commits: Use new media api

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Fri Jul 29 09:47:44 UTC 2022



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC Browser Plugins


Commits:
82ae7804 by Thomas Guillem at 2022-07-29T11:45:36+02:00
Use new media api

- - - - -
1df320cc by Thomas Guillem at 2022-07-29T11:45:40+02:00
Bump CI images

- - - - -


4 changed files:

- .gitlab-ci.yml
- activex/vlccontrol2.cpp
- common/vlc_player.cpp
- vlcpp


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -1,7 +1,7 @@
 variables:
   GIT_SUBMODULE_STRATEGY: normal
-  WIN32_IMAGE: registry.videolan.org/medialibrary-win32:20220620092626
-  WIN64_IMAGE: registry.videolan.org/medialibrary-win64:20220620085314
+  WIN32_IMAGE: registry.videolan.org/medialibrary-win32:20220728090852
+  WIN64_IMAGE: registry.videolan.org/medialibrary-win64:20220728080707
   PKG_CONFIG_LIBDIR: /prefix/lib/pkgconfig
 
 .common_build:


=====================================
activex/vlccontrol2.cpp
=====================================
@@ -454,7 +454,7 @@ STDMETHODIMP VLCAudio::get_track(long* track)
 
 STDMETHODIMP VLCAudio::put_track(long track)
 {
-    auto tracks = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Audio );
+    auto tracks = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Audio, false );
     if ( track >= tracks.size() )
         return E_INVALIDARG;
     _plug->get_player().get_mp().selectTrack( tracks[track] );
@@ -473,7 +473,7 @@ STDMETHODIMP VLCAudio::get_count(long* trackNumber)
     case libvlc_Playing:
     case libvlc_Paused:
     {
-        *trackNumber = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Audio ).size();
+        *trackNumber = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Audio, false ).size();
         break;
     }
     default:
@@ -506,7 +506,7 @@ STDMETHODIMP VLCAudio::description(long trackId, BSTR* name)
     case libvlc_Playing:
     case libvlc_Paused:
     {
-        auto tracks = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Audio );
+        auto tracks = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Audio, false );
         if ( trackId >= tracks.size() )
             return E_INVALIDARG;
         *name = BSTRFromCStr( CP_UTF8, tracks[trackId].name().c_str() );
@@ -1146,7 +1146,7 @@ STDMETHODIMP VLCSubtitle::get_track(long* spu)
 //FIXME: this should be unsigned
 STDMETHODIMP VLCSubtitle::put_track(long spu)
 {
-    auto tracks = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Subtitle );
+    auto tracks = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Subtitle, false );
     if ( spu >= tracks.size() )
         return E_INVALIDARG;
     _plug->get_player().get_mp().selectTrack( tracks[spu] );
@@ -1165,7 +1165,7 @@ STDMETHODIMP VLCSubtitle::get_count(long* spuNumber)
     case libvlc_Playing:
     case libvlc_Paused:
     {
-        *spuNumber = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Subtitle ).size();
+        *spuNumber = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Subtitle, false ).size();
         break;
     }
     default:
@@ -1199,7 +1199,7 @@ STDMETHODIMP VLCSubtitle::description(long nameID, BSTR* name)
     case libvlc_Playing:
     case libvlc_Paused:
     {
-        auto tracks = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Subtitle );
+        auto tracks = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Subtitle, false );
         if ( nameID >= tracks.size() )
             return E_INVALIDARG;
         *name = BSTRFromCStr( CP_UTF8, tracks[nameID].name().c_str() );
@@ -1362,7 +1362,7 @@ STDMETHODIMP VLCVideo::get_subtitle(long* spu)
 
 STDMETHODIMP VLCVideo::put_subtitle(long spu)
 {
-    auto tracks = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Subtitle );
+    auto tracks = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Subtitle, false );
     if ( spu >= tracks.size() )
         return E_INVALIDARG;
     _plug->get_player().get_mp().selectTrack( tracks[spu] );
@@ -1520,7 +1520,7 @@ STDMETHODIMP VLCVideo::get_track(long* track)
 
 STDMETHODIMP VLCVideo::put_track(long track)
 {
-    auto tracks = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Video );
+    auto tracks = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Video, false );
     if ( track >= tracks.size() )
         return E_INVALIDARG;
     _plug->get_player().get_mp().selectTrack( tracks[track] );
@@ -1539,7 +1539,7 @@ STDMETHODIMP VLCVideo::get_count(long* trackNumber)
     case libvlc_Playing:
     case libvlc_Paused:
     {
-        *trackNumber = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Video ).size();
+        *trackNumber = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Video, false ).size();
         break;
     }
     default:
@@ -1574,7 +1574,7 @@ STDMETHODIMP VLCVideo::description(long trackId, BSTR* name)
     case libvlc_Playing:
     case libvlc_Paused:
     {
-        auto tracks = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Video );
+        auto tracks = _plug->get_player().get_mp().tracks( VLC::MediaTrack::Type::Video, false );
         if ( trackId >= tracks.size() )
             return E_INVALIDARG;
         *name = BSTRFromCStr( CP_UTF8, tracks[trackId].name().c_str() );


=====================================
common/vlc_player.cpp
=====================================
@@ -173,19 +173,19 @@ void vlc_player::play()
 
 int vlc_player::currentAudioTrack()
 {
-    auto tracks = _mp.tracks( VLC::MediaTrack::Type::Audio );
+    auto tracks = _mp.tracks( VLC::MediaTrack::Type::Audio, true );
     return getCurrentTrack( tracks );
 }
 
 int vlc_player::currentSubtitleTrack()
 {
-    auto tracks = _mp.tracks( VLC::MediaTrack::Type::Subtitle );
+    auto tracks = _mp.tracks( VLC::MediaTrack::Type::Subtitle, true );
     return getCurrentTrack( tracks );
 }
 
 int vlc_player::currentVideoTrack()
 {
-    auto tracks = _mp.tracks( VLC::MediaTrack::Type::Video );
+    auto tracks = _mp.tracks( VLC::MediaTrack::Type::Video, true );
     return getCurrentTrack( tracks );
 }
 


=====================================
vlcpp
=====================================
@@ -1 +1 @@
-Subproject commit 0c7d3968010f1b27b36e78c11e07e4d7f6fe756b
+Subproject commit d077d7e9ac3810b4adda123e1d8156bbcd3793b5



View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/-/compare/228dacb8332e1243a7bc255b3afca234348c4985...1df320cc1f12740ba87463231643448d359ce03a

-- 
View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/-/compare/228dacb8332e1243a7bc255b3afca234348c4985...1df320cc1f12740ba87463231643448d359ce03a
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