change: change code style to Linux style except indent.

This commit is contained in:
Mike Solar
2025-08-03 03:09:40 +08:00
parent 65ab76edc8
commit 74f73ab3be
789 changed files with 77113 additions and 68888 deletions
+14 -10
View File
@@ -23,23 +23,27 @@
#include <QDateTime>
#include <QtMath>
namespace olive {
void ViewerPlaybackTimer::Start(const int64_t &start_timestamp, const int &playback_speed, const double &timebase)
namespace olive
{
start_msec_ = QDateTime::currentMSecsSinceEpoch();
start_timestamp_ = start_timestamp;
playback_speed_ = playback_speed;
timebase_ = timebase * 1000;
void ViewerPlaybackTimer::Start(const int64_t &start_timestamp,
const int &playback_speed,
const double &timebase)
{
start_msec_ = QDateTime::currentMSecsSinceEpoch();
start_timestamp_ = start_timestamp;
playback_speed_ = playback_speed;
timebase_ = timebase * 1000;
}
int64_t ViewerPlaybackTimer::GetTimestampNow() const
{
int64_t real_time = QDateTime::currentMSecsSinceEpoch() - start_msec_;
int64_t real_time = QDateTime::currentMSecsSinceEpoch() - start_msec_;
int64_t frames_since_start = qFloor(static_cast<double>(real_time) / (timebase_));
int64_t frames_since_start =
qFloor(static_cast<double>(real_time) / (timebase_));
return start_timestamp_ + frames_since_start * playback_speed_;
return start_timestamp_ + frames_since_start * playback_speed_;
}
}