Timecode::Timecode(Formats format, int framesPerSecond, bool dropFrame) :
m_format(format),
m_dropFrame(dropFrame),
- m_displayedFramesPerSecond(framesPerSecond)
+ m_displayedFramesPerSecond(framesPerSecond + 0.5)
{
}
{
}
-int Timecode::fps()
+int Timecode::fps() const
{
return m_displayedFramesPerSecond;
}
}
}
-QString Timecode::getTimecodeFromFrames(int frames)
+QString Timecode::getTimecodeFromFrames(int frames) const
{
return getTimecodeHH_MM_SS_FF(frames);
}
if (m_dropFrame)
return getTimecodeDropFrame(time, fps);
- return getTimecodeHH_MM_SS_FF((int)time.frames(fps));
+ return getTimecodeHH_MM_SS_FF((int)(time.frames(fps) + 0.5));
}
QString Timecode::getTimecodeHH_MM_SS_FF(int frames) const