From: Jean-Baptiste Mardelle Date: Sun, 30 Sep 2012 17:18:22 +0000 (+0200) Subject: Fix display of aspect ratio in clip properties for mlt playlists X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=d3820e8361b7bf0fd589efa9d4a599026e57d62c;p=kdenlive Fix display of aspect ratio in clip properties for mlt playlists --- diff --git a/src/clipproperties.cpp b/src/clipproperties.cpp index ad2b0c42..b0b95709 100644 --- a/src/clipproperties.cpp +++ b/src/clipproperties.cpp @@ -258,6 +258,9 @@ ClipProperties::ClipProperties(DocClipBase *clip, Timecode tc, double fps, QWidg m_view.clip_force_vindex->setEnabled(false); } + if (t == PLAYLIST) + m_view.tabWidget->setTabText(VIDEOTAB, i18n("Playlist")); + if (t == IMAGE) { m_view.tabWidget->removeTab(SLIDETAB); m_view.tabWidget->removeTab(COLORTAB); @@ -435,7 +438,7 @@ ClipProperties::ClipProperties(DocClipBase *clip, Timecode tc, double fps, QWidg if (width % 2 == 1) width++; QPixmap pix = m_clip->thumbProducer()->getImage(url, m_clip->getClipThumbFrame(), width, 180); m_view.clip_thumb->setPixmap(pix); - if (t == IMAGE || t == VIDEO) m_view.tabWidget->removeTab(AUDIOTAB); + if (t == IMAGE || t == VIDEO || t == PLAYLIST) m_view.tabWidget->removeTab(AUDIOTAB); } else { m_view.tabWidget->removeTab(IMAGETAB); m_view.tabWidget->removeTab(SLIDETAB); diff --git a/src/renderer.cpp b/src/renderer.cpp index a51ef5d4..adf391b3 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp @@ -885,6 +885,7 @@ void Render::processFileProperties() filePropertyMap["progressive"] = QString::number(original_profile->progressive()); filePropertyMap["colorspace"] = QString::number(original_profile->colorspace()); filePropertyMap["fps"] = QString::number(original_profile->fps()); + filePropertyMap["aspect_ratio"] = QString::number(original_profile->sar()); delete tmpProd; delete original_profile; } @@ -931,10 +932,10 @@ void Render::processFileProperties() filePropertyMap["frame_size"] = QString::number(frame->get_int("width")) + 'x' + QString::number(frame->get_int("height")); filePropertyMap["frequency"] = QString::number(frame->get_int("frequency")); filePropertyMap["channels"] = QString::number(frame->get_int("channels")); - filePropertyMap["aspect_ratio"] = frame->get("aspect_ratio"); + if (!filePropertyMap.contains("aspect_ratio")) filePropertyMap["aspect_ratio"] = frame->get("aspect_ratio"); if (frame->get_int("test_image") == 0) { - if (url.path().endsWith(".mlt") || url.path().endsWith(".westley") || url.path().endsWith(".kdenlive")) { + if (mltService == "xml" || mltService == "consumer") { filePropertyMap["type"] = "playlist"; metadataPropertyMap["comment"] = QString::fromUtf8(producer->get("title")); } else if (frame->get_int("test_audio") == 0)