merged with master

This commit is contained in:
itsmattkc
2019-03-29 15:45:51 +11:00
19 changed files with 1115 additions and 914 deletions
+4
View File
@@ -111,6 +111,10 @@ void free_panels() {
}
void scroll_to_frame_internal(QScrollBar* bar, long frame, double zoom, int area_width) {
if (bar->value() == bar->minimum() || bar->value() == bar->maximum()) {
return;
}
int screen_point = getScreenPointFromFrame(zoom, frame) - bar->value();
int min_x = area_width*0.1;
int max_x = area_width-min_x;
+5 -14
View File
@@ -64,7 +64,6 @@ extern "C" {
Viewer::Viewer(QWidget *parent) :
Panel(parent),
playing(false),
just_played_(false),
media(nullptr),
seq(nullptr),
created_sequence(false),
@@ -292,7 +291,7 @@ void Viewer::play(bool in_to_out) {
playhead_start = seq->playhead;
playing = true;
just_played_ = true;
SetAudioWakeObject(this);
set_playpause_icon(false);
start_msecs = QDateTime::currentMSecsSinceEpoch();
@@ -301,17 +300,14 @@ void Viewer::play(bool in_to_out) {
}
void Viewer::play_wake() {
if (just_played_) {
start_msecs = QDateTime::currentMSecsSinceEpoch();
playback_updater.start();
if (audio_thread != nullptr) audio_thread->notifyReceiver();
just_played_ = false;
}
start_msecs = QDateTime::currentMSecsSinceEpoch();
playback_updater.start();
if (audio_thread != nullptr) audio_thread->notifyReceiver();
}
void Viewer::pause() {
playing = false;
just_played_ = false;
SetAudioWakeObject(nullptr);
set_playpause_icon(true);
playback_updater.stop();
playback_speed = 0;
@@ -352,11 +348,6 @@ void Viewer::pause() {
}
}
bool Viewer::WaitingForPlayWake()
{
return just_played_;
}
void Viewer::update_playhead_timecode(long p) {
current_timecode_slider->SetValue(p);
}
-2
View File
@@ -66,7 +66,6 @@ public:
void seek(long p);
void play(bool in_to_out = false);
void pause();
bool WaitingForPlayWake();
bool playing;
long playhead_start;
qint64 start_msecs;
@@ -139,7 +138,6 @@ private:
double minimum_zoom;
bool playing_in_to_out;
long last_playhead;
bool just_played_;
void set_zoom_value(double d);
void set_sb_max();
void set_playback_speed(int s);