Added code to print the total recorded time during movie capture.
parent
dd8ad6c445
commit
a062398701
|
@ -228,3 +228,8 @@ float AVICapture::getFrameRate() const
|
|||
{
|
||||
return frameRate;
|
||||
}
|
||||
|
||||
int AVICapture::getFrameCount() const
|
||||
{
|
||||
return frameCounter;
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ class AVICapture : public MovieCapture
|
|||
int getWidth() const;
|
||||
int getHeight() const;
|
||||
float getFrameRate() const;
|
||||
int getFrameCount() const;
|
||||
|
||||
private:
|
||||
void cleanup();
|
||||
|
|
|
@ -1350,6 +1350,16 @@ void CelestiaCore::renderOverlay()
|
|||
|
||||
glPopMatrix();
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef((width + movieWidth) / 2 - emWidth * 5,
|
||||
(height + movieHeight) / 2 + 2, 0);
|
||||
float sec = movieCapture->getFrameCount() /
|
||||
movieCapture->getFrameRate();
|
||||
int min = (int) (sec / 60);
|
||||
sec -= min * 60.0f;
|
||||
overlay->printf("%3d:%05.2f", min, sec);
|
||||
glPopMatrix();
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef((width - movieWidth) / 2,
|
||||
(height - movieHeight) / 2 - fontHeight - 2, 0);
|
||||
|
|
|
@ -25,6 +25,7 @@ class MovieCapture
|
|||
virtual bool end() = 0;
|
||||
virtual bool captureFrame() = 0;
|
||||
|
||||
virtual int getFrameCount() const = 0;
|
||||
virtual int getWidth() const = 0;
|
||||
virtual int getHeight() const = 0;
|
||||
virtual float getFrameRate() const = 0;
|
||||
|
|
Loading…
Reference in New Issue