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,6 +397,46 @@ QVariant Footage::data(const DataType &d) const
|
||||
|
||||
return icon::Error;
|
||||
}
|
||||
case TOOLTIP:
|
||||
{
|
||||
if (valid_) {
|
||||
QString tip = tr("Filename: %1").arg(filename());
|
||||
|
||||
int vp_sz = GetVideoStreamCount();
|
||||
for (int i=0; i<vp_sz; i++) {
|
||||
VideoParams p = GetVideoParams(i);
|
||||
|
||||
if (p.enabled()) {
|
||||
tip.append("\n");
|
||||
tip.append(DescribeVideoStream(p));
|
||||
}
|
||||
}
|
||||
|
||||
int ap_sz = GetAudioStreamCount();
|
||||
for (int i=0; i<ap_sz; i++) {
|
||||
AudioParams p = GetAudioParams(i);
|
||||
|
||||
if (p.enabled()) {
|
||||
tip.append("\n");
|
||||
tip.append(DescribeAudioStream(p));
|
||||
}
|
||||
}
|
||||
|
||||
int sp_sz = GetSubtitleStreamCount();
|
||||
for (int i=0; i<sp_sz; i++) {
|
||||
SubtitleParams p = GetSubtitleParams(i);
|
||||
|
||||
if (p.enabled()) {
|
||||
tip.append("\n");
|
||||
tip.append(DescribeSubtitleStream(p));
|
||||
}
|
||||
}
|
||||
|
||||
return tip;
|
||||
} else {
|
||||
return tr("Invalid");
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -432,47 +472,6 @@ void Footage::SaveCustom(QXmlStreamWriter *writer) const
|
||||
writer->writeEndElement(); // viewer
|
||||
}
|
||||
|
||||
void Footage::UpdateTooltip()
|
||||
{
|
||||
if (valid_) {
|
||||
QString tip = tr("Filename: %1").arg(filename());
|
||||
|
||||
int vp_sz = GetVideoStreamCount();
|
||||
for (int i=0; i<vp_sz; i++) {
|
||||
VideoParams p = GetVideoParams(i);
|
||||
|
||||
if (p.enabled()) {
|
||||
tip.append("\n");
|
||||
tip.append(DescribeVideoStream(p));
|
||||
}
|
||||
}
|
||||
|
||||
int ap_sz = GetAudioStreamCount();
|
||||
for (int i=0; i<ap_sz; i++) {
|
||||
AudioParams p = GetAudioParams(i);
|
||||
|
||||
if (p.enabled()) {
|
||||
tip.append("\n");
|
||||
tip.append(DescribeAudioStream(p));
|
||||
}
|
||||
}
|
||||
|
||||
int sp_sz = GetSubtitleStreamCount();
|
||||
for (int i=0; i<sp_sz; i++) {
|
||||
SubtitleParams p = GetSubtitleParams(i);
|
||||
|
||||
if (p.enabled()) {
|
||||
tip.append("\n");
|
||||
tip.append(DescribeSubtitleStream(p));
|
||||
}
|
||||
}
|
||||
|
||||
SetToolTip(tip);
|
||||
} else {
|
||||
SetToolTip(tr("Invalid"));
|
||||
}
|
||||
}
|
||||
|
||||
void Footage::Reprobe()
|
||||
{
|
||||
// Determine if file still exists
|
||||
|
||||
@@ -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