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