added setting for fast seeking
This commit is contained in:
@@ -22,6 +22,8 @@ PreferencesDialog::PreferencesDialog(QWidget *parent) :
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->accurateSeekButton->setChecked(!config.fast_seeking);
|
||||
ui->fastSeekButton->setChecked(config.fast_seeking);
|
||||
ui->recordingComboBox->setCurrentIndex(config.recording_mode - 1);
|
||||
ui->imgSeqFormatEdit->setText(config.img_seq_formats);
|
||||
}
|
||||
@@ -77,4 +79,5 @@ void PreferencesDialog::setup_kbd_shortcuts(QMenuBar* menubar) {
|
||||
void PreferencesDialog::on_buttonBox_accepted() {
|
||||
config.recording_mode = ui->recordingComboBox->currentIndex() + 1;
|
||||
config.img_seq_formats = ui->imgSeqFormatEdit->text();
|
||||
config.fast_seeking = ui->fastSeekButton->isChecked();
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
@@ -62,6 +62,38 @@
|
||||
<string>Behavior</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_4">
|
||||
<attribute name="title">
|
||||
<string>Playback</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Seeking</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="accurateSeekButton">
|
||||
<property name="text">
|
||||
<string>Accurate Seeking
|
||||
Always show the correct frame (visual may pause briefly as correct frame is retrieved)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="fastSeekButton">
|
||||
<property name="text">
|
||||
<string>Fast Seeking
|
||||
Seek quickly (may briefly show inaccurate frames when seeking - doesn't affect playback/export)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
<string>Keyboard</string>
|
||||
|
||||
+6
-1
@@ -30,7 +30,8 @@ Config::Config()
|
||||
enable_audio_scrubbing(true),
|
||||
drop_on_media_to_replace(true),
|
||||
autoscroll(AUTOSCROLL_PAGE_SCROLL),
|
||||
audio_rate(48000)
|
||||
audio_rate(48000),
|
||||
fast_seeking(false)
|
||||
{}
|
||||
|
||||
void Config::load(QString path) {
|
||||
@@ -107,6 +108,9 @@ void Config::load(QString path) {
|
||||
} else if (stream.name() == "AudioRate") {
|
||||
stream.readNext();
|
||||
audio_rate = stream.text().toInt();
|
||||
} else if (stream.name() == "FastSeeking") {
|
||||
stream.readNext();
|
||||
fast_seeking = (stream.text() == "1");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -153,6 +157,7 @@ void Config::save(QString path) {
|
||||
stream.writeTextElement("DropFileOnMediaToReplace", QString::number(drop_on_media_to_replace));
|
||||
stream.writeTextElement("Autoscroll", QString::number(autoscroll));
|
||||
stream.writeTextElement("AudioRate", QString::number(audio_rate));
|
||||
stream.writeTextElement("FastSeeking", QString::number(fast_seeking));
|
||||
|
||||
stream.writeEndElement(); // configuration
|
||||
stream.writeEndDocument(); // doc
|
||||
|
||||
@@ -42,6 +42,7 @@ struct Config {
|
||||
bool drop_on_media_to_replace;
|
||||
int autoscroll;
|
||||
int audio_rate;
|
||||
bool fast_seeking;
|
||||
|
||||
void load(QString path);
|
||||
void save(QString path);
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "project/effect.h"
|
||||
#include "panels/effectcontrols.h"
|
||||
#include "project/media.h"
|
||||
#include "io/config.h"
|
||||
#include "debug.h"
|
||||
|
||||
extern "C" {
|
||||
@@ -193,7 +194,7 @@ void get_clip_frame(Clip* c, long playhead) {
|
||||
#ifdef GCF_DEBUG
|
||||
dout << "GCF ==> RESET" << target_pts << "(" << target_frame->pts << "-" << target_frame->pts+target_frame->pkt_duration << ")";
|
||||
#endif
|
||||
target_frame = NULL;
|
||||
if (!config.fast_seeking) target_frame = NULL;
|
||||
reset = true;
|
||||
c->last_invalid_ts = target_pts;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user