// Build monitor for chapters
if (m_isPal) m_tc.setFormat(25);
- else m_tc.setFormat(30000.0/1001, true);
+ else m_tc.setFormat(30000.0 / 1001, true);
m_manager = new MonitorManager(this);
m_manager->resetProfiles(m_tc);
{
m_isPal = isPal;
if (m_isPal) m_tc.setFormat(25);
- else m_tc.setFormat(30000.0/1001, true);
+ else m_tc.setFormat(30000.0 / 1001, true);
m_manager->resetProfiles(m_tc);
m_monitor->resetProfile();
m_format(format),
m_dropFrame(dropFrame),
m_displayedFramesPerSecond(framesPerSecond + 0.5),
- m_realFps(framesPerSecond)
+ m_realFps(framesPerSecond)
{
}
QString Timecode::getTimecodeHH_MM_SS_FF(int frames) const
{
if (m_dropFrame) {
- return getTimecodeDropFrame(frames);
+ return getTimecodeDropFrame(frames);
}
int seconds = frames / m_displayedFramesPerSecond;
frames = frames % m_displayedFramesPerSecond;
// calculate how many frames need to be dropped every minute.
int toDrop = (int) floor(600.0 * (m_displayedFramesPerSecond - m_realFps) + 0.5);
-
+
int perMinute = toDrop / 9;
int tenthMinute = toDrop % 9;
/** Set the current timecode format; this is the output format for this timecode. */
void setFormat(double framesPerSecond, bool dropFrame = false, Formats format = HH_MM_SS_FF) {
- m_displayedFramesPerSecond = (int) (framesPerSecond + 0.5);
+ m_displayedFramesPerSecond = (int)(framesPerSecond + 0.5);
m_dropFrame = dropFrame;
m_format = format;
- m_realFps = framesPerSecond;
+ m_realFps = framesPerSecond;
}
Formats format() const {
QString getTimecodeHH_MM_SS_FF(const GenTime & time) const;
QString getTimecodeHH_MM_SS_FF(int frames) const;
-
+
QString getTimecodeHH_MM_SS_HH(const GenTime & time) const;
QString getTimecodeFrames(const GenTime & time) const;
QString getTimecodeSeconds(const GenTime & time) const;