viewer: use label instead of media name
This commit is contained in:
@@ -216,7 +216,7 @@ void ViewerOutput::VerifyLength()
|
||||
|
||||
if (video_length.isNull() && texture_input_->IsConnected()) {
|
||||
NodeValueTable t = traverser.GenerateTable(texture_input_->GetConnectedNode(), 0, 0);
|
||||
video_length = t.Get(NodeValue::kRational, "length").value<rational>();
|
||||
video_length = t.Get(NodeValue::kRational, QStringLiteral("length")).value<rational>();
|
||||
}
|
||||
|
||||
video_frame_cache_.SetLength(video_length);
|
||||
@@ -227,7 +227,7 @@ void ViewerOutput::VerifyLength()
|
||||
|
||||
if (audio_length.isNull() && samples_input_->IsConnected()) {
|
||||
NodeValueTable t = traverser.GenerateTable(samples_input_->GetConnectedNode(), 0, 0);
|
||||
audio_length = t.Get(NodeValue::kRational, "length").value<rational>();
|
||||
audio_length = t.Get(NodeValue::kRational, QStringLiteral("length")).value<rational>();
|
||||
}
|
||||
|
||||
audio_playback_cache_.SetLength(audio_length);
|
||||
@@ -277,13 +277,6 @@ void ViewerOutput::Retranslate()
|
||||
}
|
||||
}
|
||||
|
||||
void ViewerOutput::set_media_name(const QString &name)
|
||||
{
|
||||
media_name_ = name;
|
||||
|
||||
emit MediaNameChanged(media_name_);
|
||||
}
|
||||
|
||||
void ViewerOutput::BeginOperation()
|
||||
{
|
||||
operation_stack_++;
|
||||
|
||||
@@ -60,21 +60,25 @@ public:
|
||||
void ShiftAudioCache(const rational& from, const rational& to);
|
||||
void ShiftCache(const rational& from, const rational& to);
|
||||
|
||||
NodeInput* texture_input() const {
|
||||
NodeInput* texture_input() const
|
||||
{
|
||||
return texture_input_;
|
||||
}
|
||||
|
||||
NodeInput* samples_input() const {
|
||||
NodeInput* samples_input() const
|
||||
{
|
||||
return samples_input_;
|
||||
}
|
||||
|
||||
virtual void InvalidateCache(const TimeRange& range, const InputConnection& from) override;
|
||||
|
||||
const VideoParams& video_params() const {
|
||||
const VideoParams& video_params() const
|
||||
{
|
||||
return video_params_;
|
||||
}
|
||||
|
||||
const AudioParams& audio_params() const {
|
||||
const AudioParams& audio_params() const
|
||||
{
|
||||
return audio_params_;
|
||||
}
|
||||
|
||||
@@ -83,11 +87,13 @@ public:
|
||||
|
||||
rational GetLength();
|
||||
|
||||
const QUuid& uuid() const {
|
||||
const QUuid& uuid() const
|
||||
{
|
||||
return uuid_;
|
||||
}
|
||||
|
||||
const QVector<TrackOutput *> &GetTracks() const {
|
||||
const QVector<TrackOutput *> &GetTracks() const
|
||||
{
|
||||
return track_cache_;
|
||||
}
|
||||
|
||||
@@ -96,27 +102,25 @@ public:
|
||||
*/
|
||||
QVector<TrackOutput *> GetUnlockedTracks() const;
|
||||
|
||||
NodeInput* track_input(Timeline::TrackType type) const {
|
||||
NodeInput* track_input(Timeline::TrackType type) const
|
||||
{
|
||||
return track_inputs_.at(type);
|
||||
}
|
||||
|
||||
TrackList* track_list(Timeline::TrackType type) const {
|
||||
TrackList* track_list(Timeline::TrackType type) const
|
||||
{
|
||||
return track_lists_.at(type);
|
||||
}
|
||||
|
||||
virtual void Retranslate() override;
|
||||
|
||||
const QString& media_name() const {
|
||||
return media_name_;
|
||||
}
|
||||
|
||||
void set_media_name(const QString& name);
|
||||
|
||||
FrameHashCache* video_frame_cache() {
|
||||
FrameHashCache* video_frame_cache()
|
||||
{
|
||||
return &video_frame_cache_;
|
||||
}
|
||||
|
||||
AudioPlaybackCache* audio_playback_cache() {
|
||||
AudioPlaybackCache* audio_playback_cache()
|
||||
{
|
||||
return &audio_playback_cache_;
|
||||
}
|
||||
|
||||
@@ -146,8 +150,6 @@ signals:
|
||||
|
||||
void TrackHeightChanged(Timeline::TrackType type, int index, int height);
|
||||
|
||||
void MediaNameChanged(const QString& name);
|
||||
|
||||
private:
|
||||
QUuid uuid_;
|
||||
|
||||
@@ -167,8 +169,6 @@ private:
|
||||
|
||||
rational last_length_;
|
||||
|
||||
QString media_name_;
|
||||
|
||||
FrameHashCache video_frame_cache_;
|
||||
|
||||
AudioPlaybackCache audio_playback_cache_;
|
||||
|
||||
Reference in New Issue
Block a user