Merge branch 'master' into move-serialization
This commit is contained in:
+2
-13
@@ -176,11 +176,6 @@ public:
|
||||
*/
|
||||
virtual QString Description() const;
|
||||
|
||||
const QString& ToolTip() const
|
||||
{
|
||||
return tooltip_;
|
||||
}
|
||||
|
||||
Folder* folder() const
|
||||
{
|
||||
return folder_;
|
||||
@@ -199,7 +194,8 @@ public:
|
||||
DURATION,
|
||||
CREATED_TIME,
|
||||
MODIFIED_TIME,
|
||||
FREQUENCY_RATE
|
||||
FREQUENCY_RATE,
|
||||
TOOLTIP
|
||||
};
|
||||
|
||||
virtual QVariant data(const DataType &d) const;
|
||||
@@ -1046,11 +1042,6 @@ protected:
|
||||
effect_input_ = input;
|
||||
}
|
||||
|
||||
void SetToolTip(const QString& s)
|
||||
{
|
||||
tooltip_ = s;
|
||||
}
|
||||
|
||||
void SetFlag(Flag f, bool on = true)
|
||||
{
|
||||
if (on) {
|
||||
@@ -1249,8 +1240,6 @@ private:
|
||||
|
||||
OutputConnections output_connections_;
|
||||
|
||||
QString tooltip_;
|
||||
|
||||
Folder* folder_;
|
||||
|
||||
QMap<InputElementPair, ValueHint> value_hints_;
|
||||
|
||||
@@ -397,42 +397,7 @@ QVariant Footage::data(const DataType &d) const
|
||||
|
||||
return icon::Error;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return super::data(d);
|
||||
}
|
||||
|
||||
bool Footage::LoadCustom(QXmlStreamReader *reader, SerializedData *data)
|
||||
{
|
||||
while (XMLReadNextStartElement(reader)) {
|
||||
if (reader->name() == QStringLiteral("timestamp")) {
|
||||
this->set_timestamp(reader->readElementText().toLongLong());
|
||||
} else if (reader->name() == QStringLiteral("viewer")) {
|
||||
if (!ViewerOutput::LoadCustom(reader, data)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
reader->skipCurrentElement();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Footage::SaveCustom(QXmlStreamWriter *writer) const
|
||||
{
|
||||
writer->writeTextElement(QStringLiteral("timestamp"), QString::number(this->timestamp()));
|
||||
|
||||
writer->writeStartElement(QStringLiteral("viewer"));
|
||||
|
||||
ViewerOutput::SaveCustom(writer);
|
||||
|
||||
writer->writeEndElement(); // viewer
|
||||
}
|
||||
|
||||
void Footage::UpdateTooltip()
|
||||
case TOOLTIP:
|
||||
{
|
||||
if (valid_) {
|
||||
QString tip = tr("Filename: %1").arg(filename());
|
||||
@@ -467,11 +432,45 @@ void Footage::UpdateTooltip()
|
||||
}
|
||||
}
|
||||
|
||||
SetToolTip(tip);
|
||||
return tip;
|
||||
} else {
|
||||
SetToolTip(tr("Invalid"));
|
||||
return tr("Invalid");
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return super::data(d);
|
||||
}
|
||||
|
||||
bool Footage::LoadCustom(QXmlStreamReader *reader, SerializedData *data)
|
||||
{
|
||||
while (XMLReadNextStartElement(reader)) {
|
||||
if (reader->name() == QStringLiteral("timestamp")) {
|
||||
this->set_timestamp(reader->readElementText().toLongLong());
|
||||
} else if (reader->name() == QStringLiteral("viewer")) {
|
||||
if (!ViewerOutput::LoadCustom(reader, data)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
reader->skipCurrentElement();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Footage::SaveCustom(QXmlStreamWriter *writer) const
|
||||
{
|
||||
writer->writeTextElement(QStringLiteral("timestamp"), QString::number(this->timestamp()));
|
||||
|
||||
writer->writeStartElement(QStringLiteral("viewer"));
|
||||
|
||||
ViewerOutput::SaveCustom(writer);
|
||||
|
||||
writer->writeEndElement(); // viewer
|
||||
}
|
||||
|
||||
void Footage::Reprobe()
|
||||
{
|
||||
|
||||
@@ -186,22 +186,6 @@ protected:
|
||||
private:
|
||||
QString GetColorspaceToUse(const VideoParams& params) const;
|
||||
|
||||
/**
|
||||
* @brief Update the icon based on the Footage status
|
||||
*
|
||||
* For kUnprobed and kError an appropriate icon will be shown. For kReady, this function will determine what the
|
||||
* dominant type of media in this Footage is (video/audio/image) and set the icon accordingly based on that.
|
||||
*/
|
||||
void UpdateIcon();
|
||||
|
||||
/**
|
||||
* @brief Update the tooltip based on the Footage status
|
||||
*
|
||||
* For kUnprobed and kError, this sets an appropriate generic message. For kReady, this function will set
|
||||
* basic information about the Footage in the tooltip (based on the results of a previous probe).
|
||||
*/
|
||||
void UpdateTooltip();
|
||||
|
||||
void Reprobe();
|
||||
|
||||
VideoParams MergeVideoStream(const VideoParams &base, const VideoParams &over);
|
||||
|
||||
@@ -625,9 +625,12 @@ RenderTicketPtr PreviewAutoCacher::RenderAudio(Node *node, ViewerOutput *context
|
||||
connect(watcher, &RenderTicketWatcher::Finished, this, &PreviewAutoCacher::AudioRendered);
|
||||
running_audio_tasks_.append(watcher);
|
||||
|
||||
AudioParams p = context->GetAudioParams();
|
||||
p.set_format(ViewerOutput::kDefaultSampleFormat);
|
||||
|
||||
RenderManager::RenderAudioParams rap(node,
|
||||
r,
|
||||
context->GetAudioParams(),
|
||||
p,
|
||||
RenderMode::kOffline);
|
||||
|
||||
rap.generate_waveforms = dynamic_cast<AudioWaveformCache*>(cache);
|
||||
|
||||
@@ -181,7 +181,7 @@ QVariant ProjectViewModel::data(const QModelIndex &index, int role) const
|
||||
}
|
||||
break;
|
||||
case Qt::ToolTipRole:
|
||||
return internal_item->ToolTip();
|
||||
return internal_item->data(Node::TOOLTIP);
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
|
||||
@@ -510,6 +510,8 @@ void ViewerWidget::UpdateAudioProcessor()
|
||||
CloseAudioProcessor();
|
||||
|
||||
AudioParams ap = GetConnectedNode()->GetAudioParams();
|
||||
ap.set_format(ViewerOutput::kDefaultSampleFormat);
|
||||
|
||||
AudioParams packed(OLIVE_CONFIG("AudioOutputSampleRate").toInt(),
|
||||
OLIVE_CONFIG("AudioOutputChannelLayout").toULongLong(),
|
||||
SampleFormat::from_string(OLIVE_CONFIG("AudioOutputSampleFormat").toString().toStdString()));
|
||||
|
||||
Reference in New Issue
Block a user