[vlmc-devel] ISource: Expose number of tracks

Hugo Beauzée-Luyssen git at videolan.org
Mon Feb 24 01:59:12 CET 2014


vlmc | branch: ibackend | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Feb 24 00:41:34 2014 +0200| [2a013d21bf349139f9ca57971afae8f0e69c19f0] | committer: Hugo Beauzée-Luyssen

ISource: Expose number of tracks

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=2a013d21bf349139f9ca57971afae8f0e69c19f0
---

 src/Backend/ISource.h         |    2 ++
 src/Backend/VLC/VLCSource.cpp |   12 ++++++++++++
 src/Backend/VLC/VLCSource.h   |    2 ++
 3 files changed, 16 insertions(+)

diff --git a/src/Backend/ISource.h b/src/Backend/ISource.h
index 744cc0a..1bc425e 100644
--- a/src/Backend/ISource.h
+++ b/src/Backend/ISource.h
@@ -46,7 +46,9 @@ namespace Backend
             virtual int64_t         length() const = 0;
             virtual float           fps() const = 0;
             virtual bool            hasVideo() const = 0;
+            virtual unsigned int    nbVideoTracks() const = 0;
             virtual bool            hasAudio() const = 0;
+            virtual unsigned int    nbAudioTracks() const = 0;
     };
 
     class IMemorySource
diff --git a/src/Backend/VLC/VLCSource.cpp b/src/Backend/VLC/VLCSource.cpp
index a72bca7..0b836f7 100644
--- a/src/Backend/VLC/VLCSource.cpp
+++ b/src/Backend/VLC/VLCSource.cpp
@@ -142,7 +142,19 @@ VLCSource::hasVideo() const
     return m_nbVideoTracks > 0;
 }
 
+unsigned int
+VLCSource::nbVideoTracks() const
+{
+    return m_nbVideoTracks;
+}
+
 bool VLCSource::hasAudio() const
 {
     return m_nbAudioTracks > 0;
 }
+
+unsigned int
+VLCSource::nbAudioTracks() const
+{
+    return m_nbAudioTracks;
+}
diff --git a/src/Backend/VLC/VLCSource.h b/src/Backend/VLC/VLCSource.h
index c27fb6c..79944ce 100644
--- a/src/Backend/VLC/VLCSource.h
+++ b/src/Backend/VLC/VLCSource.h
@@ -48,7 +48,9 @@ public:
     virtual int64_t             length() const;
     virtual float               fps() const;
     virtual bool                hasVideo() const;
+    virtual unsigned int        nbVideoTracks() const;
     virtual bool                hasAudio() const;
+    virtual unsigned int        nbAudioTracks() const;
 
     // Below this point are backend internal methods:
     LibVLCpp::Media*            media();



More information about the Vlmc-devel mailing list