finished merge of viewer and footage
This commit is contained in:
@@ -76,14 +76,15 @@ bool ExportTask::Run()
|
||||
if (params_.video_enabled()) {
|
||||
|
||||
// If a transformation matrix is applied to this video, create it here
|
||||
if (viewer()->video_params().width() != params_.video_params().width()
|
||||
VideoParams vp = viewer()->GetVideoParams();
|
||||
if (vp.width() != params_.video_params().width()
|
||||
|| params_.video_params().height() != params_.video_params().height()) {
|
||||
video_force_size = QSize(params_.video_params().width(), params_.video_params().height());
|
||||
|
||||
if (params_.video_scaling_method() != ExportParams::kStretch) {
|
||||
video_force_matrix = ExportParams::GenerateMatrix(params_.video_scaling_method(),
|
||||
viewer()->video_params().width(),
|
||||
viewer()->video_params().height(),
|
||||
vp.width(),
|
||||
vp.height(),
|
||||
params_.video_params().width(),
|
||||
params_.video_params().height());
|
||||
}
|
||||
@@ -162,7 +163,7 @@ void ExportTask::FrameDownloaded(FramePtr f, const QByteArray &hash, const QVect
|
||||
|
||||
forever {
|
||||
rational real_time = Timecode::timestamp_to_time(frame_time_,
|
||||
viewer()->video_params().time_base());
|
||||
viewer()->GetVideoParams().time_base());
|
||||
|
||||
if (!time_map_.contains(real_time)) {
|
||||
break;
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
namespace olive {
|
||||
|
||||
PreCacheTask::PreCacheTask(Footage *footage, int index, Sequence* sequence) :
|
||||
RenderTask(new ViewerOutput(), sequence->video_params(), sequence->audio_params())
|
||||
RenderTask(new ViewerOutput(), sequence->GetVideoParams(), sequence->GetAudioParams())
|
||||
{
|
||||
viewer()->set_video_params(sequence->video_params());
|
||||
viewer()->set_audio_params(sequence->audio_params());
|
||||
viewer()->SetVideoParams(sequence->GetVideoParams());
|
||||
viewer()->SetAudioParams(sequence->GetAudioParams());
|
||||
|
||||
// FIXME: I've been lazy and haven't included support for anything connected to a footage input.
|
||||
// At the moment, footage nodes have no connectable inputs so it's not a problem, but if
|
||||
|
||||
@@ -214,7 +214,7 @@ void ProjectImportTask::ValidateImageSequence(Footage *footage, QFileInfoList& i
|
||||
video_stream.set_start_time(start_index);
|
||||
video_stream.set_duration(end_index - start_index + 1);
|
||||
|
||||
footage->SetVideoParams(0, video_stream);
|
||||
footage->SetVideoParams(video_stream, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -169,15 +169,15 @@ bool LoadOTIOTask::Run()
|
||||
probed_item->setParent(project_->root());
|
||||
}
|
||||
|
||||
Footage::StreamReference reference;
|
||||
Track::Reference reference;
|
||||
|
||||
if (track->type() == Track::kVideo) {
|
||||
reference = Footage::StreamReference(Stream::kVideo, 0);
|
||||
reference = Track::Reference(Track::kVideo, 0);
|
||||
} else {
|
||||
reference = Footage::StreamReference(Stream::kAudio, 0);
|
||||
reference = Track::Reference(Track::kAudio, 0);
|
||||
}
|
||||
|
||||
QString output_id = probed_item->GetStringFromReference(reference);
|
||||
QString output_id = reference.ToString();
|
||||
|
||||
Node::ConnectEdge(NodeOutput(probed_item, output_id), NodeInput(block, ClipBlock::kBufferIn));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user