MediaInput: Rename streams access methods.
Change MediaInput::footage() to MediaInput::stream() and MediaInput::SetFootage() to MediaInput::SetStream() as they access streams not footage. Also update all instances of access methods to reflect this change.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -414,7 +414,7 @@ void ImportTool::DropGhosts(bool insert)
|
||||
case Stream::kImage:
|
||||
{
|
||||
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);
|
||||
@@ -436,7 +436,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());
|
||||
@@ -98,12 +98,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