Commit 8cc9b22d authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Expose missing track fields

parent c286f844
......@@ -123,6 +123,21 @@ int32_t MediaTrack::level() const
return m_level;
}
uint32_t MediaTrack::bitrate() const
{
return m_bitrate;
}
const std::string&MediaTrack::language() const
{
return m_language;
}
const std::string&MediaTrack::description() const
{
return m_description;
}
uint32_t MediaTrack::channels() const
{
return m_channels;
......@@ -139,7 +154,12 @@ MediaTrack::MediaTrack( libvlc_media_track_t* c )
, m_id( c->i_id )
, m_profile( c->i_profile )
, m_level( c->i_level )
, m_bitrate( c->i_bitrate )
{
if ( c->psz_language != NULL )
m_language = c->psz_language;
if ( c->psz_description != NULL )
m_description = c->psz_description;
switch ( c->i_type )
{
case libvlc_track_audio:
......
......@@ -70,6 +70,9 @@ public:
Type type() const;
int32_t profile() const;
int32_t level() const;
uint32_t bitrate() const;
const std::string& language() const;
const std::string& description() const;
// Audio specific
uint32_t channels() const;
uint32_t rate() const;
......@@ -92,6 +95,9 @@ private:
Type m_type;
int32_t m_profile;
int32_t m_level;
uint32_t m_bitrate;
std::string m_language;
std::string m_description;
// Audio
uint32_t m_channels;
uint32_t m_rate;
......
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