Make VideoStream::isPlaying return false when EOS has been reached

Before it would return the playing status of the FrameSync, but a DeltaSync doesn't stop at the end of the video, now it returns the least of the FrameSync and the EOS condition
This commit is contained in:
Bart van Strien
2016-01-05 21:45:44 +01:00
parent 2313f3091a
commit f53e0026ab
4 changed files with 11 additions and 4 deletions
+2 -2
View File
@@ -52,12 +52,12 @@ void VideoStream::seek(double offset)
frameSync->seek(offset);
}
double VideoStream::tell()
double VideoStream::tell() const
{
return frameSync->tell();
}
bool VideoStream::isPlaying()
bool VideoStream::isPlaying() const
{
return frameSync->isPlaying();
}
+2 -2
View File
@@ -44,8 +44,8 @@ public:
virtual void play();
virtual void pause();
virtual void seek(double offset);
virtual double tell();
virtual bool isPlaying();
virtual double tell() const;
virtual bool isPlaying() const;
class FrameSync;
class DeltaSync;
+5
View File
@@ -120,6 +120,11 @@ size_t VideoStream::getSize() const
return sizeof(Frame);
}
bool VideoStream::isPlaying() const
{
return frameSync->isPlaying() && !eos;
}
void VideoStream::readPage()
{
char *syncBuffer = nullptr;
+2
View File
@@ -56,6 +56,8 @@ public:
const std::string &getFilename() const;
void setSync(FrameSync *frameSync);
bool isPlaying() const;
void threadedFillBackBuffer(double dt);
private: