Merge branch 'master' of https://github.com/olive-editor/olive
This commit is contained in:
+3
-1
@@ -1075,7 +1075,9 @@ void NodeInput::CopyValues(NodeInput *source, NodeInput *dest, bool include_conn
|
||||
for (int i=0;i<source->keyframe_tracks_.size();i++) {
|
||||
dest->keyframe_tracks_[i].clear();
|
||||
foreach (NodeKeyframePtr key, source->keyframe_tracks_.at(i)) {
|
||||
dest->keyframe_tracks_[i].append(key->copy());
|
||||
NodeKeyframePtr key_copy = key->copy();
|
||||
key_copy->set_parent(dest);
|
||||
dest->keyframe_tracks_[i].append(key_copy);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,14 +40,14 @@ QList<Node::CategoryID> MediaInput::Category() const
|
||||
return {kCategoryInput};
|
||||
}
|
||||
|
||||
StreamPtr MediaInput::footage()
|
||||
StreamPtr MediaInput::stream()
|
||||
{
|
||||
return footage_input_->get_standard_value().value<StreamPtr>();
|
||||
}
|
||||
|
||||
void MediaInput::SetFootage(StreamPtr f)
|
||||
void MediaInput::SetStream(StreamPtr s)
|
||||
{
|
||||
footage_input_->set_standard_value(QVariant::fromValue(f));
|
||||
footage_input_->set_standard_value(QVariant::fromValue(s));
|
||||
}
|
||||
|
||||
bool MediaInput::IsMedia() const
|
||||
|
||||
@@ -40,8 +40,8 @@ public:
|
||||
|
||||
virtual QList<CategoryID> Category() const override;
|
||||
|
||||
StreamPtr footage();
|
||||
void SetFootage(StreamPtr f);
|
||||
StreamPtr stream();
|
||||
void SetStream(StreamPtr s);
|
||||
|
||||
virtual bool IsMedia() const override;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ PreCacheTask::PreCacheTask(VideoStreamPtr footage, Sequence* sequence) :
|
||||
backend()->SetRenderMode(RenderMode::kOffline);
|
||||
|
||||
video_node_ = new VideoInput();
|
||||
video_node_->SetFootage(footage);
|
||||
video_node_->SetStream(footage);
|
||||
|
||||
NodeParam::ConnectEdge(video_node_->output(), viewer()->texture_input());
|
||||
|
||||
|
||||
@@ -554,7 +554,7 @@ QList<MediaInput *> ProjectExplorer::GetMediaNodesUsingFootage(Footage *item)
|
||||
if (n->IsMedia()) {
|
||||
MediaInput* media_node = static_cast<MediaInput*>(n);
|
||||
|
||||
if (media_node->footage()->footage() == item) {
|
||||
if (media_node->stream()->footage() == item) {
|
||||
list.append(media_node);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ OfflineFootageCommand::OfflineFootageCommand(const QList<MediaInput *> &media, Q
|
||||
UndoCommand(parent)
|
||||
{
|
||||
foreach (MediaInput* i, media) {
|
||||
stream_data_.insert(i, i->footage());
|
||||
stream_data_.insert(i, i->stream());
|
||||
}
|
||||
|
||||
project_ = static_cast<Sequence*>(media.first()->parent())->project();
|
||||
@@ -40,14 +40,14 @@ Project *OfflineFootageCommand::GetRelevantProject() const
|
||||
void OfflineFootageCommand::redo_internal()
|
||||
{
|
||||
for (auto it=stream_data_.cbegin(); it!=stream_data_.cend(); it++) {
|
||||
it.key()->SetFootage(nullptr);
|
||||
it.key()->SetStream(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void OfflineFootageCommand::undo_internal()
|
||||
{
|
||||
for (auto it=stream_data_.cbegin(); it!=stream_data_.cend(); it++) {
|
||||
it.key()->SetFootage(it.value());
|
||||
it.key()->SetStream(it.value());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -417,7 +417,7 @@ void ImportTool::DropGhosts(bool insert)
|
||||
case Stream::kVideo:
|
||||
{
|
||||
VideoInput* video_input = new VideoInput();
|
||||
video_input->SetFootage(footage_stream);
|
||||
video_input->SetStream(footage_stream);
|
||||
new NodeAddCommand(dst_graph, video_input, command);
|
||||
|
||||
new NodeEdgeAddCommand(video_input->output(), clip->texture_input(), command);
|
||||
@@ -439,7 +439,7 @@ void ImportTool::DropGhosts(bool insert)
|
||||
case Stream::kAudio:
|
||||
{
|
||||
AudioInput* audio_input = new AudioInput();
|
||||
audio_input->SetFootage(footage_stream);
|
||||
audio_input->SetStream(footage_stream);
|
||||
new NodeAddCommand(dst_graph, audio_input, command);
|
||||
|
||||
VolumeNode* volume_node = new VolumeNode();
|
||||
|
||||
@@ -57,8 +57,8 @@ void FootageViewerWidget::SetFootage(Footage *footage)
|
||||
|
||||
ConnectViewerNode(nullptr);
|
||||
|
||||
video_node_->SetFootage(nullptr);
|
||||
audio_node_->SetFootage(nullptr);
|
||||
video_node_->SetStream(nullptr);
|
||||
audio_node_->SetStream(nullptr);
|
||||
|
||||
NodeParam::DisconnectEdge(video_node_->output(), sequence_.viewer_output()->texture_input());
|
||||
NodeParam::DisconnectEdge(audio_node_->output(), sequence_.viewer_output()->samples_input());
|
||||
@@ -97,12 +97,12 @@ void FootageViewerWidget::SetFootage(Footage *footage)
|
||||
}
|
||||
|
||||
if (video_stream) {
|
||||
video_node_->SetFootage(video_stream);
|
||||
video_node_->SetStream(video_stream);
|
||||
NodeParam::ConnectEdge(video_node_->output(), sequence_.viewer_output()->texture_input());
|
||||
}
|
||||
|
||||
if (audio_stream) {
|
||||
audio_node_->SetFootage(audio_stream);
|
||||
audio_node_->SetStream(audio_stream);
|
||||
NodeParam::ConnectEdge(audio_node_->output(), sequence_.viewer_output()->samples_input());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user