return list;
}
-void ClipManager::updatePreviewSettings()
-{
- for (int i = 0; i < m_clipList.count(); i++) {
- if (m_clipList.at(i)->clipType() == AV || m_clipList.at(i)->clipType() == VIDEO) {
- if (m_clipList.at(i)->producerProperty("meta.media.0.codec.name") && strcmp(m_clipList.at(i)->producerProperty("meta.media.0.codec.name"), "h264") == 0) {
- if (KdenliveSettings::dropbframes()) {
- m_clipList[i]->setProducerProperty("skip_loop_filter", "all");
- m_clipList[i]->setProducerProperty("skip_frame", "bidir");
- } else {
- m_clipList[i]->setProducerProperty("skip_loop_filter", "");
- m_clipList[i]->setProducerProperty("skip_frame", "");
- }
- }
- }
- }
-}
void ClipManager::clearUnusedProducers()
{
QDomElement groupsXml() const;
int clipsCount() const;
-public slots:
- void updatePreviewSettings();
-
private slots:
/** A clip was externally modified, monitor for more changes and prepare for reload */
void slotClipModified(const QString &path);
if (m_properties.contains("video_index")) m_baseTrackProducers[track]->set("video_index", m_properties.value("video_index").toInt());
if (m_properties.contains("audio_index")) m_baseTrackProducers[track]->set("audio_index", m_properties.value("audio_index").toInt());
m_baseTrackProducers[track]->set("id", QString(getId() + '_' + QString::number(track)).toUtf8().data());
- if (KdenliveSettings::dropbframes() && m_baseTrackProducers.at(i)->get("skip_loop_filter") && strcmp(m_baseTrackProducers.at(i)->get("skip_loop_filter"), "all") == 0) {
- m_baseTrackProducers[track]->set("skip_loop_filter", "all");
- m_baseTrackProducers[track]->set("skip_frame", "bidir");
- }
+
if (m_properties.contains("force_colorspace")) m_baseTrackProducers[track]->set("force_colorspace", m_properties.value("force_colorspace").toInt());
if (m_properties.contains("full_luma")) m_baseTrackProducers[track]->set("set.force_full_luma", m_properties.value("full_luma").toInt());
}
kDebug() << "ERROR; CANNOT CREATE AUTOSAVE FILE";
}
kDebug() << "// AUTOSAVE FILE: " << m_autosave->fileName();
- QString doc;
- if (KdenliveSettings::dropbframes()) {
- KdenliveSettings::setDropbframes(false);
- m_clipManager->updatePreviewSettings();
- doc = m_render->sceneList();
- KdenliveSettings::setDropbframes(true);
- m_clipManager->updatePreviewSettings();
- } else doc = m_render->sceneList();
- saveSceneList(m_autosave->fileName(), doc);
+ saveSceneList(m_autosave->fileName(), m_render->sceneList());
}
}
m_clipManager->resetProducersList(m_render->producersList());
}
-void KdenliveDoc::updatePreviewSettings()
-{
- m_clipManager->updatePreviewSettings();
- m_render->updatePreviewSettings();
- QList <Mlt::Producer *> prods = m_render->producersList();
- m_clipManager->resetProducersList(m_render->producersList());
- qDeleteAll(prods);
- prods.clear();
-}
-
Render *KdenliveDoc::renderer()
{
return m_render;
{
QString titlesFolder = projectFolder().path(KUrl::AddTrailingSlash) + "titles/";
if (path.isEmpty()) {
- path = KFileDialog::getOpenUrl(KUrl(titlesFolder), "*.kdenlivetitle", kapp->activeWindow(), i18n("Enter Template Path"));
+ path = KFileDialog::getOpenUrl(KUrl(titlesFolder), "application/x-kdenlivetitle", kapp->activeWindow(), i18n("Enter Template Path"));
}
if (path.isEmpty()) return;
void setZone(int start, int end);
QPoint zone() const;
int setSceneList();
- void updatePreviewSettings();
bool isTrackLocked(int ix) const;
void setDocumentProperty(const QString &name, const QString &value);
const QString getDocumentProperty(const QString &name) const;
<default>100</default>
</entry>
- <entry name="dropbframes" type="Bool">
- <label>Drop B Frames on H.264 clips for faster playback (For monitor preview only).</label>
- <default>false</default>
- </entry>
</group>
<group name="env">
QWidget *p6 = new QWidget;
m_configSdl.setupUi(p6);
- // Disable drop B frames, see Kdenlive issue #1330
- m_configSdl.groupBox->setHidden(true);
#if not defined(Q_WS_MAC) && not defined(USE_OPEN_GL)
m_configSdl.kcfg_openglmonitors->setHidden(true);
#endif
resetProfile = true;
}
- bool updatePreview = false;
- if (m_configSdl.kcfg_dropbframes->isChecked() != KdenliveSettings::dropbframes()) {
- KdenliveSettings::setDropbframes(m_configSdl.kcfg_dropbframes->isChecked());
- updatePreview = true;
- }
-
if (m_modified) {
// The transcoding profiles were modified, save.
m_modified = false;
//KConfigDialog::updateSettings();
if (resetProfile) emit doResetProfile();
- if (updatePreview) emit updatePreviewSettings();
}
void KdenliveSettingsDialog::slotUpdateDisplay()
signals:
void customChanged();
void doResetProfile();
- void updatePreviewSettings();
void updateCaptureFolder();
};
m_monitorManager->initMonitors(m_clipMonitor, m_projectMonitor);
slotConnectMonitors();
- // Disable drop B frames, see Kdenlive issue #1330, see also kdenlivesettingsdialog.cpp
- KdenliveSettings::setDropbframes(false);
-
// Open or create a file. Command line argument passed in Url has
// precedence, then "openlastproject", then just a plain empty file.
// If opening Url fails, openlastproject will _not_ be used.
{
QString currentSceneList;
m_monitorManager->stopActiveMonitor();
- if (KdenliveSettings::dropbframes()) {
- KdenliveSettings::setDropbframes(false);
- m_activeDocument->clipManager()->updatePreviewSettings();
- currentSceneList = m_projectMonitor->sceneList();
- KdenliveSettings::setDropbframes(true);
- m_activeDocument->clipManager()->updatePreviewSettings();
- } else currentSceneList = m_projectMonitor->sceneList();
-
- if (m_activeDocument->saveSceneList(outputFileName, currentSceneList) == false)
+
+ if (m_activeDocument->saveSceneList(outputFileName, m_projectMonitor->sceneList()) == false)
return false;
// Save timeline thumbnails
#ifndef Q_WS_MAC
m_recMonitor->slotUpdateCaptureFolder(m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash));
#endif
- if (KdenliveSettings::dropbframes()) slotUpdatePreviewSettings();
//Update the mouse position display so it will display in DF/NDF format by default based on the project setting.
slotUpdateMousePosition(0);
// set tool to select tool
connect(dialog, SIGNAL(settingsChanged(const QString&)), this, SLOT(updateConfiguration()));
//connect(dialog, SIGNAL(doResetProfile()), this, SLOT(slotDetectAudioDriver()));
connect(dialog, SIGNAL(doResetProfile()), m_monitorManager, SLOT(slotResetProfiles()));
- connect(dialog, SIGNAL(updatePreviewSettings()), this, SLOT(slotUpdatePreviewSettings()));
#ifndef Q_WS_MAC
connect(dialog, SIGNAL(updateCaptureFolder()), this, SLOT(slotUpdateCaptureFolder()));
#endif
- //connect(dialog, SIGNAL(updatePreviewSettings()), this, SLOT(slotUpdatePreviewSettings()));
dialog->show();
if (page != -1) dialog->showPage(page, option);
}
#endif
}
-void MainWindow::slotUpdatePreviewSettings()
-{
- if (m_activeDocument) {
- m_clipMonitor->slotSetXml(NULL);
- m_activeDocument->updatePreviewSettings();
- }
-}
-
void MainWindow::updateConfiguration()
{
//TODO: we should apply settings to all projects, not only the current one
/** @brief Lets the sampleplugin create a generator. */
void generateClip();
void slotZoneMoved(int start, int end);
- void slotUpdatePreviewSettings();
void slotDvdWizard(const QString &url = QString(), const QString &profile = "dv_pal");
void slotGroupClips();
void slotUnGroupClips();
filePropertyMap["pix_fmt"] = producer->get(query.toUtf8().constData());
filePropertyMap["colorspace"] = producer->get("meta.media.colorspace");
- if (KdenliveSettings::dropbframes()) {
- kDebug() << "// LOOKING FOR H264 on: " << default_video;
- snprintf(property, sizeof(property), "meta.media.%d.codec.name", default_video);
- kDebug() << "PROP: " << property << " = " << producer->get(property);
- if (producer->get(property) && strcmp(producer->get(property), "h264") == 0) {
- kDebug() << "// GOT H264 CLIP, SETTING FAST PROPS";
- producer->set("skip_loop_filter", "all");
- producer->set("skip_frame", "bidir");
- }
- }
-
} else kDebug() << " / / / / /WARNING, VIDEO CONTEXT IS NULL!!!!!!!!!!!!!!";
if (producer->get_int("audio_index") > -1) {
// Get the audio_index
m_mltProducer = new Mlt::Producer(producer->get_producer());
} else m_mltProducer = m_blackClip->cut(0, 50);
- /*if (KdenliveSettings::dropbframes()) {
- m_mltProducer->set("skip_loop_filter", "all");
- m_mltProducer->set("skip_frame", "bidir");
- }*/
if (!m_mltProducer || !m_mltProducer->is_valid()) {
kDebug() << " WARNING - - - - -INVALID PLAYLIST: ";
return -1;
<rect>
<x>0</x>
<y>0</y>
- <width>353</width>
- <height>247</height>
+ <width>342</width>
+ <height>241</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
</property>
</widget>
</item>
- <item row="9" column="1" colspan="2">
+ <item row="8" column="1" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</spacer>
</item>
- <item row="8" column="0" colspan="3">
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>Monitor Preview Speedup Settings</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QCheckBox" name="kcfg_dropbframes">
- <property name="text">
- <string>Drop B frames on H.264 clips</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
<item row="6" column="0" colspan="2">
<widget class="QLabel" name="label">
<property name="text">