Commit 135c35ac authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

ISource: Expose length (in milliseconds)

parent f2536d58
......@@ -23,6 +23,8 @@
#ifndef ISOURCE_HPP
#define ISOURCE_HPP
#include <stdint.h>
namespace Backend
{
class ISourceRendererEventCb;
......@@ -41,6 +43,7 @@ namespace Backend
virtual bool preparse() = 0;
virtual unsigned int width() const = 0;
virtual unsigned int height() const = 0;
virtual int64_t length() const = 0;
virtual float fps() const = 0;
virtual bool hasVideo() const = 0;
virtual bool hasAudio() const = 0;
......
......@@ -124,6 +124,12 @@ VLCSource::height() const
return m_height;
}
int64_t
VLCSource::length() const
{
return m_length;
}
float
VLCSource::fps() const
{
......
......@@ -45,6 +45,7 @@ public:
virtual bool preparse();
virtual quint32 width() const;
virtual quint32 height() const;
virtual int64_t length() const;
virtual float fps() const;
virtual bool hasVideo() const;
virtual bool hasAudio() const;
......@@ -63,7 +64,7 @@ private:
float m_fps;
unsigned int m_nbVideoTracks;
unsigned int m_nbAudioTracks;
qint64 m_length; //in milliseconds.
int64_t m_length; //in milliseconds.
QImage* m_snapshot;
};
......
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