export: fixed stills
This commit is contained in:
@@ -368,7 +368,7 @@ void TimeRangeListFrameIterator::UpdateIndexIfNecessary()
|
||||
range_index_++;
|
||||
|
||||
if (range_index_ < list_.size()) {
|
||||
current_ = Timecode::snap_time_to_timebase(list_.at(range_index_).in(), timebase_, Timecode::kCeil);
|
||||
current_ = Timecode::snap_time_to_timebase(list_.at(range_index_).in(), timebase_, Timecode::kRound);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+9
-5
@@ -390,10 +390,12 @@ void Core::DialogProjectPropertiesShow()
|
||||
|
||||
void Core::DialogExportShow()
|
||||
{
|
||||
ViewerOutput* viewer = GetSequenceToExport();
|
||||
ViewerOutput* viewer;
|
||||
rational time;
|
||||
|
||||
if (viewer) {
|
||||
if (GetSequenceToExport(&viewer, &time)) {
|
||||
ExportDialog* ed = new ExportDialog(viewer, main_window_);
|
||||
ed->SetTime(time);
|
||||
connect(ed, &ExportDialog::finished, ed, &ExportDialog::deleteLater);
|
||||
ed->open();
|
||||
}
|
||||
@@ -857,7 +859,7 @@ void Core::SaveProjectInternal(Project* project, const QString& override_filenam
|
||||
psm->deleteLater();
|
||||
}
|
||||
|
||||
ViewerOutput* Core::GetSequenceToExport()
|
||||
bool Core::GetSequenceToExport(ViewerOutput **viewer, rational *time)
|
||||
{
|
||||
// First try the most recently focused time based window
|
||||
TimeBasedPanel* time_panel = PanelManager::instance()->MostRecentlyFocused<TimeBasedPanel>();
|
||||
@@ -875,7 +877,9 @@ ViewerOutput* Core::GetSequenceToExport()
|
||||
tr("This Sequence is empty. There is nothing to export."),
|
||||
QMessageBox::Ok);
|
||||
} else {
|
||||
return time_panel->GetConnectedViewer();
|
||||
*viewer = time_panel->GetConnectedViewer();
|
||||
*time = time_panel->GetTime();
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
QMessageBox::critical(main_window_,
|
||||
@@ -884,7 +888,7 @@ ViewerOutput* Core::GetSequenceToExport()
|
||||
QMessageBox::Ok);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
QString Core::GetAutoRecoveryIndexFilename()
|
||||
|
||||
+1
-1
@@ -545,7 +545,7 @@ private:
|
||||
/**
|
||||
* @brief Retrieves the currently most active sequence for exporting
|
||||
*/
|
||||
ViewerOutput *GetSequenceToExport();
|
||||
bool GetSequenceToExport(ViewerOutput **viewer, rational *time);
|
||||
|
||||
static QString GetAutoRecoveryIndexFilename();
|
||||
|
||||
|
||||
@@ -526,7 +526,7 @@ ExportParams ExportDialog::GenerateParams() const
|
||||
if (ExportCodec::IsCodecAStillImage(video_tab_->GetSelectedCodec()) && !video_tab_->IsImageSequenceSet()) {
|
||||
// Exporting as image without exporting image sequence, only export one frame
|
||||
rational export_time = video_tab_->GetStillImageTime();
|
||||
params.set_custom_range(TimeRange(export_time, export_time));
|
||||
params.set_custom_range(TimeRange(export_time, export_time + GetSelectedTimebase()));
|
||||
} else if (range_combobox_->currentIndex() == kRangeInToOut) {
|
||||
// Assume if this combobox is enabled, workarea is enabled - a check that we make in this dialog's constructor
|
||||
params.set_custom_range(viewer_node_->GetTimelinePoints()->workarea()->range());
|
||||
|
||||
@@ -46,6 +46,14 @@ public:
|
||||
|
||||
rational GetSelectedTimebase() const;
|
||||
|
||||
void SetTime(const rational &time)
|
||||
{
|
||||
preview_viewer_->SetAudioScrubbingEnabled(false);
|
||||
preview_viewer_->SetTime(time);
|
||||
video_tab_->SetTime(time);
|
||||
preview_viewer_->SetAudioScrubbingEnabled(true);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent *e) override;
|
||||
|
||||
|
||||
@@ -68,7 +68,8 @@ ViewerWidget::ViewerWidget(QWidget *parent) :
|
||||
prequeuing_video_(false),
|
||||
prequeuing_audio_(0),
|
||||
record_armed_(false),
|
||||
recording_(false)
|
||||
recording_(false),
|
||||
enable_audio_scrubbing_(true)
|
||||
{
|
||||
// Set up main layout
|
||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||
@@ -838,7 +839,7 @@ void ViewerWidget::PauseInternal()
|
||||
|
||||
void ViewerWidget::PushScrubbedAudio()
|
||||
{
|
||||
if (!IsPlaying() && GetConnectedNode() && OLIVE_CONFIG("AudioScrubbing").toBool()) {
|
||||
if (!IsPlaying() && GetConnectedNode() && OLIVE_CONFIG("AudioScrubbing").toBool() && enable_audio_scrubbing_) {
|
||||
// Get audio src device from renderer
|
||||
const AudioParams& params = GetConnectedNode()->audio_playback_cache()->GetParameters();
|
||||
|
||||
|
||||
@@ -89,6 +89,11 @@ public:
|
||||
|
||||
void StartCapture(TimelineWidget *source, const TimeRange &time, const Track::Reference &track);
|
||||
|
||||
void SetAudioScrubbingEnabled(bool e)
|
||||
{
|
||||
enable_audio_scrubbing_ = e;
|
||||
}
|
||||
|
||||
public slots:
|
||||
void Play(bool in_to_out_only);
|
||||
|
||||
@@ -276,6 +281,8 @@ private:
|
||||
|
||||
qint64 queue_starved_start_;
|
||||
|
||||
bool enable_audio_scrubbing_;
|
||||
|
||||
private slots:
|
||||
void PlaybackTimerUpdate();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user