Commit 84e2b4ee authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Don't rebuild existing audio thumbs for playlist on project opening, display...

Don't rebuild existing audio thumbs for playlist on project opening, display playlist audio thumbs in clip monitor
parent c661c680
......@@ -368,6 +368,10 @@ bool AudioThumbJob::startJob()
// Generate one thumb per stream
m_audioStream = stream;
m_cachePath = m_binClip->getAudioThumbPath(stream);
if (QFile::exists(m_cachePath)) {
// Audio thumb already exists
continue;
}
m_done = false;
bool ok = false;
if (type == ClipType::Playlist) {
......
......@@ -28,6 +28,8 @@ AudioStreamInfo::AudioStreamInfo(const std::shared_ptr<Mlt::Producer> &producer,
if (playlist && streams == 0) {
// Playlist clips do not provide stream info
m_audioStreams.insert(0, i18n("Audio"));
// TODO: compute playlist channels
m_audioChannels.insert(0, 2);
}
int streamIndex = 1;
for (int ix = 0; ix < streams; ix++) {
......
......@@ -1646,7 +1646,7 @@ void Monitor::slotOpenClip(const std::shared_ptr<ProjectClip> &controller, int i
m_controller->getMarkerModel()->registerSnapModel(m_snaps);
m_glMonitor->getControllerProxy()->setClipProperties(controller->clipId().toInt(), controller->clipType(), controller->hasAudioAndVideo(), controller->clipName());
if (!m_controller->hasVideo() || KdenliveSettings::displayClipMonitorInfo() & 0x10) {
qDebug()<<"=======\n\nSETTING AUDIO DATA IN MON\n\n=========";
qDebug()<<"=======\n\nSETTING AUDIO DATA IN MON";
if (m_audioMeterWidget->audioChannels == 0) {
m_glMonitor->getControllerProxy()->setAudioThumb();
} else {
......
......@@ -217,7 +217,7 @@ Item {
height: isAudioClip ? parent.height : parent.height / 6
//font.pixelSize * 3
width: parent.width
visible: (root.permanentAudiothumb || root.showAudiothumb) && (isAudioClip || controller.clipType == ProducerType.AV)
visible: (root.permanentAudiothumb || root.showAudiothumb) && (isAudioClip || controller.clipType == ProducerType.AV || controller.clipType == ProducerType.Playlist)
onStateVisibleChanged: {
// adjust monitor image size
if (stateVisible && root.permanentAudiothumb && audioThumb.visible) {
......
......@@ -150,6 +150,9 @@ public:
}
}
qreal indicesPrPixel = qreal(m_outPoint - m_inPoint) / width() * m_precisionFactor;
if (m_outPoint == m_inPoint) {
return;
}
QPen pen = painter->pen();
pen.setColor(m_color);
painter->setBrush(m_color);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment