Commit 2a013d21 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

ISource: Expose number of tracks

parent 135c35ac
......@@ -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
......
......@@ -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;
}
......@@ -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();
......
Markdown is supported
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