<parameter type="geometry" name="transition.geometry" default="0%,0%:100%x100%" opacity="false">
<name>Rectangle</name>
</parameter>
+ <parameter type="bool" name="transition.distort" default="0">
+ <name>Distort</name>
+ </parameter>
</effect>
#include <KApplication>
#include <KUrlRequesterDialog>
#include <KMessageBox>
+#include <KStandardDirs>
#include <QTreeWidgetItem>
#include <QFile>
child->setData(0, statusRole, CLIPOK);
}
} else if (child->data(0, statusRole).toInt() == LUMAMISSING) {
- QString fileName = searchLuma(child->data(0, idRole).toString());
+ QString fileName = searchLuma(searchDir, child->data(0, idRole).toString());
if (!fileName.isEmpty()) {
fixed = true;
child->setText(1, fileName);
}
-QString DocumentChecker::searchLuma(const QString &file) const
+QString DocumentChecker::searchLuma(const QDir &dir, const QString &file) const
{
KUrl searchPath(KdenliveSettings::mltpath());
+ QString fname = KUrl(file).fileName();
if (file.contains("PAL"))
searchPath.cd("../lumas/PAL");
else
searchPath.cd("../lumas/NTSC");
- QString result = searchPath.path(KUrl::AddTrailingSlash) + KUrl(file).fileName();
+ QString result = searchPath.path(KUrl::AddTrailingSlash) + fname;
if (QFile::exists(result))
return result;
// try to find luma in application path
searchPath.clear();
searchPath = KUrl(QCoreApplication::applicationDirPath());
searchPath.cd("../share/apps/kdenlive/lumas");
- result = searchPath.path(KUrl::AddTrailingSlash) + KUrl(file).fileName();
+ result = searchPath.path(KUrl::AddTrailingSlash) + fname;
if (QFile::exists(result))
return result;
- return QString();
+ // Try in Kdenlive's standard KDE path
+ result = KStandardDirs::locate("appdata", "lumas/" + fname);
+ if (!result.isEmpty()) return result;
+ // Try in user's chosen folder
+ return searchPathRecursively(dir, fname);
}
QString DocumentChecker::searchPathRecursively(const QDir &dir, const QString &fileName) const
void slotDeleteSelected();
QString getProperty(QDomElement effect, const QString &name);
void setProperty(QDomElement effect, const QString &name, const QString value);
- QString searchLuma(const QString &file) const;
+ QString searchLuma(const QDir &dir, const QString &file) const;
/** @brief Check if images and fonts in this clip exists, returns a list of images that do exist so we don't check twice. */
void checkMissingImagesAndFonts(QStringList images, QStringList fonts, const QString &id, const QString &baseClip);
void slotCheckButtons();
paramList.append(quickParameterFill(ret, "keyed", "keyed", "fixed", "1", "1", "1"));
paramList.append(quickParameterFill(ret, i18n("Geometry"), "geometry", "geometry", "0/0:100%x100%:100%", "0/0:100%x100%:100%", "0/0:100%x100%:100%", "", "", "", "", "", "true"));
-
+ paramList.append(quickParameterFill(ret, i18n("Distort"), "distort", "bool", "0", "0", "1"));
paramList.append(quickParameterFill(ret, i18n("Rotate X"), "rotate_x", "addedgeometry", "0", "-1800", "1800", QString(), QString(), "10"));
paramList.append(quickParameterFill(ret, i18n("Rotate Y"), "rotate_y", "addedgeometry", "0", "-1800", "1800", QString(), QString(), "10"));
paramList.append(quickParameterFill(ret, i18n("Rotate Z"), "rotate_z", "addedgeometry", "0", "-1800", "1800", QString(), QString(), "10"));
[Desktop Entry]
Name=Kdenlive
GenericName=Video Editor
-GenericName[de]=Video-Editor
-GenericName[it]=Editor Video
-GenericName[ru]=Видеоредактор
-GenericName[uk]=Редактор відео
-GenericName[es]=Editor de video
Comment=Nonlinear video editor for KDE
-Comment[de]=Nicht-linearer Video-Editor für KDE
-Comment[it]=Editor video non lineare per KDE
-Comment[ru]=Редактор нелинейного видеомонтажа для KDE
-Comment[uk]=Нелінійний редактор відео для KDE
-Comment[es]=Editor no lineal de video para KDE
Type=Application
Exec=kdenlive %i -caption "%c" %u
Icon=kdenlive
[Event/RenderFinished]
Name=Rendering finished
-Name[de]=Rendern beendet
-Name[es]=Procesamiento finalizado
-Name[it]=Esportazione conclusa
-Name[ru]=Рендеринг завершён
-Name[sv]=Rendering klar
-Name[uk]=Обробку завершено
Comment=Rendering is over
-Comment[de]=Das Rendern eines Film wurde beendet
-Comment[es]=El procesamiento del video ha finalizado correctamente
-Comment[it]=L'esportazione del filmato si è conclusa correttamente
-Comment[ru]=Рендеринг видеоролика завершён
-Comment[sv]=Renderingen är avslutad
-Comment[uk]=Обробку проекту завершено
Action=Popup
[Event/RenderStarted]
Name=Rendering started
-Name[de]=Rendern angefangen
-Name[es]=Procesamiento iniciado
-Name[it]=Esportazione iniziata
-Name[ru]=Рендеринг начат
-Name[sv]=Rendering påbörjad
-Name[uk]=Розпочато обробку
Comment=Rendering was started
-Comment[de]=Das Rendern eines Film wurde angefangen
-Comment[es]=El procesamiento del video ha sido iniciado
-Comment[it]=È iniziata l'esportazione di un filmato
-Comment[ru]=Рендеринг видеоролика начат
-Comment[sv]=Rendering påbörjades
-Comment[uk]=Розпочато обробку проекту
Action=Popup
[Event/FrameCaptured]
Name=Frame captured
-Name[es]=Fotograma capturado
-Name[ru]=Кадр снят
Comment=A frame was captured to disk
-Comment[es]=Se ha capturado un fotograma al disco
-Comment[ru]=Кадр снят и сохранён на диск
Sound=KDE-Sys-App-Message.ogg
Action=Sound
[Event/ReadyToCapture]
Name=Ready to capture
-Name[es]=Listo para capturar
Sound=KDE-Sys-App-Positive.ogg
Action=Sound
[Event/ErrorMessage]
Name=Error
-Name[de]=Fehler
-Name[es]=Error
-Name[it]=Errore
-Name[ru]=Ошибка
-Name[sv]=Fel
Comment=An error occured in Kdenlive
-Comment[de]=Ein Fehler ist in Kdenlive aufgetreten
-Comment[es]=Ocurrió un error en Kdenlive
-Comment[ru]=В работе Kdenlive произошла ошибка
-Comment[it]=Si è verificato un errore in Kdenlive
-Comment[sv]=Ett fel har inträffat i Kdenlive
Sound=KDE-Sys-Warning.ogg
Action=Sound
// Check encoding profiles
QString data = m_configCapture.kcfg_v4l_profile->itemData(m_configCapture.kcfg_v4l_profile->currentIndex()).toString();
- if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::v4l_parameters()) {
+ if (!data.isEmpty() && (data.section(";", 0, 0) != KdenliveSettings::v4l_parameters() || data.section(";", 1, 1) != KdenliveSettings::v4l_extension())) {
KdenliveSettings::setV4l_parameters(data.section(";", 0, 0));
KdenliveSettings::setV4l_extension(data.section(";", 1, 1));
}
data = m_configCapture.kcfg_decklink_profile->itemData(m_configCapture.kcfg_decklink_profile->currentIndex()).toString();
- if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::decklink_parameters()) {
+ if (!data.isEmpty() && (data.section(";", 0, 0) != KdenliveSettings::decklink_parameters() || data.section(";", 1, 1) != KdenliveSettings::decklink_extension())) {
KdenliveSettings::setDecklink_parameters(data.section(";", 0, 0));
KdenliveSettings::setDecklink_extension(data.section(";", 1, 1));
}
data = m_configProject.kcfg_proxy_profile->itemData(m_configProject.kcfg_proxy_profile->currentIndex()).toString();
- if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::proxyparams()) {
+ if (!data.isEmpty() && (data.section(";", 0, 0) != KdenliveSettings::proxyparams() || data.section(";", 1, 1) != KdenliveSettings::proxyextension())) {
KdenliveSettings::setProxyparams(data.section(";", 0, 0));
KdenliveSettings::setProxyextension(data.section(";", 1, 1));
}
m_clipMonitorDock->setObjectName("clip_monitor");
m_clipMonitor = new Monitor("clip", m_monitorManager, QString(), m_timelineArea);
m_clipMonitorDock->setWidget(m_clipMonitor);
+
+ // Connect the project list
connect(m_projectList, SIGNAL(clipSelected(DocClipBase *, QPoint)), m_clipMonitor, SLOT(slotSetClipProducer(DocClipBase *, QPoint)));
connect(m_projectList, SIGNAL(raiseClipMonitor()), m_clipMonitor, SLOT(activateMonitor()));
-
+ connect(m_projectList, SIGNAL(loadingIsOver()), this, SLOT(slotElapsedTime()));
+ connect(m_projectList, SIGNAL(displayMessage(const QString&, int)), this, SLOT(slotGotProgressInfo(const QString&, int)));
+ connect(m_projectList, SIGNAL(updateRenderStatus()), this, SLOT(slotCheckRenderStatus()));
+ connect(m_projectList, SIGNAL(clipNeedsReload(const QString&)),this, SLOT(slotUpdateClip(const QString &)));
+ connect(m_projectList, SIGNAL(updateProfile(const QString &)), this, SLOT(slotUpdateProjectProfile(const QString &)));
+ connect(m_projectList, SIGNAL(refreshClip(const QString &, bool)), m_monitorManager, SLOT(slotRefreshCurrentMonitor()));
+ connect(m_projectList, SIGNAL(findInTimeline(const QString&)), this, SLOT(slotClipInTimeline(const QString&)));
+ connect(m_clipMonitor, SIGNAL(zoneUpdated(QPoint)), m_projectList, SLOT(slotUpdateClipCut(QPoint)));
+
m_projectMonitorDock = new QDockWidget(i18n("Project Monitor"), this);
m_projectMonitorDock->setObjectName("project_monitor");
m_projectMonitor = new Monitor("project", m_monitorManager, QString());
connect(m_projectMonitorDock, SIGNAL(visibilityChanged(bool)), m_projectMonitor, SLOT(refreshMonitor(bool)));
connect(m_clipMonitorDock, SIGNAL(visibilityChanged(bool)), m_clipMonitor, SLOT(refreshMonitor(bool)));
- //connect(m_monitorManager, SIGNAL(connectMonitors()), this, SLOT(slotConnectMonitors()));
connect(m_monitorManager, SIGNAL(checkColorScopes()), this, SLOT(slotUpdateColorScopes()));
connect(m_monitorManager, SIGNAL(clearScopes()), this, SLOT(slotClearColorScopes()));
connect(m_effectList, SIGNAL(addEffect(const QDomElement)), this, SLOT(slotAddEffect(const QDomElement)));
// Populate encoding profiles
KConfig conf("encodingprofiles.rc", KConfig::FullConfig, "appdata");
- if (KdenliveSettings::proxyparams().isEmpty()) {
+ if (KdenliveSettings::proxyparams().isEmpty() || KdenliveSettings::proxyextension().isEmpty()) {
KConfigGroup group(&conf, "proxy");
QMap< QString, QString > values = group.entryMap();
QMapIterator<QString, QString> i(values);
KdenliveSettings::setProxyextension(data.section(';', 1, 1));
}
}
- if (KdenliveSettings::v4l_parameters().isEmpty()) {
+ if (KdenliveSettings::v4l_parameters().isEmpty() || KdenliveSettings::v4l_extension().isEmpty()) {
KConfigGroup group(&conf, "video4linux");
QMap< QString, QString > values = group.entryMap();
QMapIterator<QString, QString> i(values);
KdenliveSettings::setV4l_extension(data.section(';', 1, 1));
}
}
- if (KdenliveSettings::decklink_parameters().isEmpty()) {
+ if (KdenliveSettings::decklink_parameters().isEmpty() || KdenliveSettings::decklink_extension().isEmpty()) {
KConfigGroup group(&conf, "decklink");
QMap< QString, QString > values = group.entryMap();
QMapIterator<QString, QString> i(values);
disconnect(m_notesWidget, SIGNAL(textChanged()), m_activeDocument, SLOT(setModified()));
disconnect(m_clipMonitor, SIGNAL(zoneUpdated(QPoint)), m_activeDocument, SLOT(setModified()));
disconnect(m_projectList, SIGNAL(projectModified()), m_activeDocument, SLOT(setModified()));
- disconnect(m_projectList, SIGNAL(updateProfile(const QString &)), this, SLOT(slotUpdateProjectProfile(const QString &)));
disconnect(m_projectMonitor->render, SIGNAL(refreshDocumentProducers(bool, bool)), m_activeDocument, SLOT(checkProjectClips(bool, bool)));
disconnect(m_activeTimeline->projectView(), SIGNAL(activateDocumentMonitor()), m_projectMonitor, SLOT(activateMonitor()));
disconnect(m_activeTimeline, SIGNAL(zoneMoved(int, int)), this, SLOT(slotZoneMoved(int, int)));
disconnect(m_projectList, SIGNAL(loadingIsOver()), m_activeTimeline->projectView(), SLOT(slotUpdateAllThumbs()));
- disconnect(m_projectList, SIGNAL(displayMessage(const QString&, int)), this, SLOT(slotGotProgressInfo(const QString&, int)));
- disconnect(m_projectList, SIGNAL(updateRenderStatus()), this, SLOT(slotCheckRenderStatus()));
- disconnect(m_projectList, SIGNAL(clipNeedsReload(const QString&)), this, SLOT(slotUpdateClip(const QString &)));
disconnect(m_projectList, SIGNAL(refreshClip(const QString &)), m_activeTimeline->projectView(), SLOT(slotRefreshThumbs(const QString &)));
m_effectStack->clear();
}
//m_activeDocument->setRenderer(NULL);
- disconnect(m_projectList, SIGNAL(refreshClip(const QString &, bool)), m_monitorManager, SLOT(slotRefreshCurrentMonitor()));
m_clipMonitor->stop();
}
KdenliveSettings::setCurrent_profile(doc->profilePath());
m_projectList->setDocument(doc);
m_transitionConfig->updateProjectFormat(doc->mltProfile(), doc->timecode(), doc->tracksList());
m_effectStack->updateProjectFormat(doc->mltProfile(), doc->timecode());
- connect(m_projectList, SIGNAL(refreshClip(const QString &, bool)), m_monitorManager, SLOT(slotRefreshCurrentMonitor()));
connect(m_projectList, SIGNAL(refreshClip(const QString &, bool)), trackView->projectView(), SLOT(slotRefreshThumbs(const QString &, bool)));
- connect(m_projectList, SIGNAL(clipNeedsReload(const QString&)),this, SLOT(slotUpdateClip(const QString &)));
connect(m_projectList, SIGNAL(projectModified()), doc, SLOT(setModified()));
- connect(m_projectList, SIGNAL(updateProfile(const QString &)), this, SLOT(slotUpdateProjectProfile(const QString &)));
connect(m_projectList, SIGNAL(clipNameChanged(const QString, const QString)), trackView->projectView(), SLOT(clipNameChanged(const QString, const QString)));
- connect(m_projectList, SIGNAL(findInTimeline(const QString&)), this, SLOT(slotClipInTimeline(const QString&)));
-
-
//connect(trackView, SIGNAL(cursorMoved()), m_projectMonitor, SLOT(activateMonitor()));
connect(trackView, SIGNAL(insertTrack(int)), this, SLOT(slotInsertTrack(int)));
connect(trackView, SIGNAL(deleteTrack(int)), this, SLOT(slotDeleteTrack(int)));
connect(trackView->projectView(), SIGNAL(forceClipProcessing(const QString &)), m_projectList, SLOT(slotForceProcessing(const QString &)));
connect(m_projectMonitor, SIGNAL(renderPosition(int)), trackView, SLOT(moveCursorPos(int)));
connect(m_projectMonitor, SIGNAL(zoneUpdated(QPoint)), trackView, SLOT(slotSetZone(QPoint)));
- connect(m_clipMonitor, SIGNAL(zoneUpdated(QPoint)), m_projectList, SLOT(slotUpdateClipCut(QPoint)));
connect(m_projectMonitor, SIGNAL(zoneUpdated(QPoint)), doc, SLOT(setModified()));
connect(m_clipMonitor, SIGNAL(zoneUpdated(QPoint)), doc, SLOT(setModified()));
connect(m_projectMonitor, SIGNAL(durationChanged(int)), trackView, SLOT(setDuration(int)));
connect(trackView->projectView(), SIGNAL(activateDocumentMonitor()), m_projectMonitor, SLOT(activateMonitor()));
connect(trackView, SIGNAL(zoneMoved(int, int)), this, SLOT(slotZoneMoved(int, int)));
connect(m_projectList, SIGNAL(loadingIsOver()), trackView->projectView(), SLOT(slotUpdateAllThumbs()));
- connect(m_projectList, SIGNAL(loadingIsOver()), this, SLOT(slotElapsedTime()));
- connect(m_projectList, SIGNAL(displayMessage(const QString&, int)), this, SLOT(slotGotProgressInfo(const QString&, int)));
- connect(m_projectList, SIGNAL(updateRenderStatus()), this, SLOT(slotCheckRenderStatus()));
trackView->projectView()->setContextMenu(m_timelineContextMenu, m_timelineContextClipMenu, m_timelineContextTransitionMenu, m_clipTypeGroup, (QMenu*)(factory()->container("marker_menu", this)));
connect(m_ruler, SIGNAL(seekRenderer(int)), this, SLOT(slotSeek(int)));
connect(render, SIGNAL(durationChanged(int)), this, SLOT(adjustRulerSize(int)));
connect(render, SIGNAL(rendererStopped(int)), this, SLOT(rendererStopped(int)));
+ connect(render, SIGNAL(rendererPosition(int)), this, SLOT(seekCursor(int)));
if (name != "clip") {
- connect(render, SIGNAL(rendererPosition(int)), this, SIGNAL(renderPosition(int)));
connect(render, SIGNAL(durationChanged(int)), this, SIGNAL(durationChanged(int)));
connect(m_ruler, SIGNAL(zoneChanged(QPoint)), this, SIGNAL(zoneUpdated(QPoint)));
} else {
void Monitor::stop()
{
- disconnect(render, SIGNAL(rendererPosition(int)), this, SLOT(seekCursor(int)));
if (render) render->stop();
}
{
if (!isVisible()) return;
if (render) render->start();
- connect(render, SIGNAL(rendererPosition(int)), this, SLOT(seekCursor(int)));
}
void Monitor::refreshMonitor(bool visible)
{
m_timePos->updateTimeCode(m_monitorManager->timecode());
if (render == NULL) return;
- render->resetProfile(profile);
+ if (!render->hasProfile(profile)) {
+ activateMonitor();
+ render->resetProfile(profile);
+ }
if (m_effectWidget)
m_effectWidget->resetProfile(render);
}
emit requestFrameForAnalysis(show);
if (show) {
m_effectWidget->getScene()->slotZoomFit();
- render->doRefresh();
}
+ render->doRefresh();
}
}
if (m_projectMonitor == NULL || m_clipMonitor == NULL) return;
blockSignals(true);
QString active = m_activeMonitor ? m_activeMonitor->name() : QString();
- if (!m_clipMonitor->render->hasProfile(KdenliveSettings::current_profile())) {
- activateMonitor("clip");
- m_clipMonitor->resetProfile(KdenliveSettings::current_profile());
- m_clipMonitor->updateTimecodeFormat();
- }
- if (!m_projectMonitor->render->hasProfile(KdenliveSettings::current_profile())) {
- activateMonitor("project");
- m_projectMonitor->resetProfile(KdenliveSettings::current_profile());
- m_projectMonitor->updateTimecodeFormat();
- }
+ m_clipMonitor->resetProfile(KdenliveSettings::current_profile());
+ m_projectMonitor->resetProfile(KdenliveSettings::current_profile());
if (!active.isEmpty()) activateMonitor(active);
blockSignals(false);
if (m_activeMonitor) m_activeMonitor->parentWidget()->raise();
void ProjectList::slotGotProxy(const QString &proxyPath)
{
- if (proxyPath.isEmpty() || !m_refreshed || m_abortAllProxies) return;
+ if (proxyPath.isEmpty() || m_abortAllProxies) return;
QTreeWidgetItemIterator it(m_listView);
ProjectItem *item;
m_proxyThreads.clearFutures();
m_thumbnailQueue.clear();
m_listView->clear();
+ m_listView->setEnabled(true);
emit clipSelected(NULL);
m_refreshed = false;
m_allClipsProcessed = false;
if (replace) resetThumbsProducer(clip);
m_render->getFileProperties(xml, clip->getId(), m_listView->iconSize().height(), replace);
}
- else {
+ else if (clip->isPlaceHolder()) {
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDropEnabled);
if (item->data(0, Qt::DecorationRole).isNull()) {
item->setData(0, Qt::DecorationRole, missingPixmap);
{
if (m_render->processingItems() == 0 && m_thumbnailQueue.isEmpty()) {
if (!m_refreshed && m_allClipsProcessed) {
+ m_refreshed = true;
m_listView->setEnabled(true);
slotClipSelected();
QTimer::singleShot(500, this, SIGNAL(loadingIsOver()));
emit displayMessage(QString(), -1);
- m_refreshed = true;
}
updateButtons();
} else if (!m_refreshed) {
if (item->parent()) {
if (item->parent()->type() == PROJECTFOLDERTYPE)
static_cast <FolderProjectItem *>(item->parent())->switchIcon();
- } else if (KdenliveSettings::checkfirstprojectclip() && m_listView->topLevelItemCount() == 1) {
+ } else if (KdenliveSettings::checkfirstprojectclip() && m_listView->topLevelItemCount() == 1 && m_refreshed && m_allClipsProcessed) {
// this is the first clip loaded in project, check if we want to adjust project settings to the clip
updatedProfile = adjustProjectProfileToItem(item);
}
}
} else {
int max = m_doc->clipManager()->clipsCount();
- emit displayMessage(i18n("Loading clips"), (int)(100 *(max - queue) / max));
+ if (max > 0) emit displayMessage(i18n("Loading clips"), (int)(100 *(max - queue) / max));
}
if (m_allClipsProcessed) emit processNextThumbnail();
}
- if (replace && item) {
- toReload = clipId;
- }
if (!item) {
// no item for producer, delete it
delete producer;
+ return;
}
+ if (replace) toReload = clipId;
if (!toReload.isEmpty())
emit clipNeedsReload(toReload);
}
QFile::remove(info.dest);
setProxyStatus(info.dest, CREATINGPROXY);
+
+ // Get the list of clips that will need to get progress info
+ QTreeWidgetItemIterator it(m_listView);
+ QList <ProjectItem *> processingItems;
+ while (*it && !m_abortAllProxies) {
+ if ((*it)->type() == PROJECTCLIPTYPE) {
+ ProjectItem *item = static_cast <ProjectItem *>(*it);
+ if (item->referencedClip()->getProperty("proxy") == info.dest) {
+ processingItems.append(item);
+ }
+ }
+ ++it;
+ }
// Special case: playlist clips (.mlt or .kdenlive project files)
if (info.type == PLAYLIST) {
}
else {
QString log = QString(myProcess.readAll());
- processLogInfo(info.dest, &duration, log);
+ processLogInfo(processingItems, &duration, log);
}
myProcess.waitForFinished(500);
}
// Make sure we don't block when proxy file already exists
parameters << "-y";
parameters << info.dest;
- kDebug()<<"// STARTING PROXY GEN: "<<parameters;
QProcess myProcess;
myProcess.setProcessChannelMode(QProcess::MergedChannels);
myProcess.start("ffmpeg", parameters);
myProcess.waitForStarted();
int result = -1;
int duration = 0;
+
while (myProcess.state() != QProcess::NotRunning) {
// building proxy file
if (m_abortProxy.contains(info.dest) || m_abortAllProxies) {
}
else {
QString log = QString(myProcess.readAll());
- processLogInfo(info.dest, &duration, log);
+ processLogInfo(processingItems, &duration, log);
}
myProcess.waitForFinished(500);
}
myProcess.waitForFinished();
+ m_abortProxy.removeAll(info.dest);
+ m_processingProxy.removeAll(info.dest);
if (result == -1) result = myProcess.exitStatus();
if (result == 0) {
// proxy successfully created
QFile::remove(info.dest);
setProxyStatus(info.dest, PROXYCRASHED);
}
- m_abortProxy.removeAll(info.dest);
- m_processingProxy.removeAll(info.dest);
}
-void ProjectList::processLogInfo(const QString &path, int *duration, const QString &log)
+void ProjectList::processLogInfo(QList <ProjectItem *>items, int *duration, const QString &log)
{
int progress;
if (*duration == 0) {
progress = numbers.at(0).toInt() * 3600 + numbers.at(1).toInt() * 60 + numbers.at(2).toDouble();
}
else progress = (int) time.toDouble();
- setProxyStatus(path, CREATINGPROXY, (int) (100.0 * progress / (*duration)));
+ for (int i = 0; i < items.count(); i++)
+ setProxyStatus(items.at(i), CREATINGPROXY, (int) (100.0 * progress / (*duration)));
}
}
void setProxyStatus(const QString proxyPath, PROXYSTATUS status, int progress = 0);
void setProxyStatus(ProjectItem *item, PROXYSTATUS status, int progress = 0);
/** @brief Process ffmpeg output to find out process progress. */
- void processLogInfo(const QString &path, int *duration, const QString &log);
+ void processLogInfo(QList <ProjectItem *>items, int *duration, const QString &log);
void monitorItemEditing(bool enable);
/** @brief Set thumbnail for a project's clip. */
void setThumbnail(const QString &clipId, const QPixmap &pix);
if (!k.key().isEmpty()) {
QString params = k.value().section(';', 0, 0);
QString extension = k.value().section(';', 1, 1);
- if (params == proxyparameters && extension == proxyextension) {
+ if (ix == -1 && ((params == proxyparameters && extension == proxyextension) || (proxyparameters.isEmpty() || proxyextension.isEmpty()))) {
// this is the current profile
ix = proxy_profile->count();
}
m_infoMutex.unlock();
}
-int Render::processingItems() const
+int Render::processingItems()
{
+ m_infoMutex.lock();
int count = m_requestList.count();
- if (m_infoThread.isRunning()) count++;
+ if (!m_processingClipId.isEmpty()) {
+ // one clip is currently processed
+ count++;
+ }
+ m_infoMutex.unlock();
return count;
}
if (producer == NULL || producer->is_blank() || !producer->is_valid()) {
kDebug() << " / / / / / / / / ERROR / / / / // CANNOT LOAD PRODUCER: "<<path;
+ m_processingClipId.clear();
if (proxyProducer) {
// Proxy file is corrupted
emit removeInvalidProxy(info.clipId, false);
}
else emit removeInvalidClip(info.clipId, info.replaceProducer);
delete producer;
- m_processingClipId.clear();
continue;
}
producer->set("out", info.xml.attribute("proxy_out").toInt());
if (producer->get_out() != info.xml.attribute("proxy_out").toInt()) {
// Proxy file length is different than original clip length, this will corrupt project so disable this proxy clip
+ m_processingClipId.clear();
emit removeInvalidProxy(info.clipId, true);
delete producer;
- m_processingClipId.clear();
continue;
}
}
emit replyGetImage(info.clipId, img);
}
}
- emit replyGetFileProperties(info.clipId, producer, stringMap(), stringMap(), info.replaceProducer);
m_processingClipId.clear();
+ emit replyGetFileProperties(info.clipId, producer, stringMap(), stringMap(), info.replaceProducer);
continue;
}
}
} while (variance == -1);
delete frame;
- if (frameNumber > -1) filePropertyMap["thumbnail"] = frameNumber;
+ if (frameNumber > -1) filePropertyMap["thumbnail"] = QString::number(frameNumber);
emit replyGetImage(info.clipId, img);
} else if (frame->get_int("test_audio") == 0) {
emit replyGetImage(info.clipId, "audio-x-generic", fullWidth, info.imageHeight);
metadataPropertyMap[ name.section('.', 0, -2)] = value;
}
producer->seek(0);
+ m_processingClipId.clear();
emit replyGetFileProperties(info.clipId, producer, filePropertyMap, metadataPropertyMap, info.replaceProducer);
}
m_processingClipId.clear();
m_mltConsumer->purge();
consumerPosition = m_mltConsumer->position();
- if (m_mltProducer) {
- m_mltProducer->set_speed(0);
- currentId = m_mltProducer->get("id");
- delete m_mltProducer;
- m_mltProducer = NULL;
- emit stopped();
- }
blockSignals(true);
- if (producer && producer->is_valid()) {
- m_mltProducer = producer;
- } else m_mltProducer = m_blackClip->cut(0, 1);
+ if (!producer || !producer->is_valid()) {
+ if (producer) delete producer;
+ producer = m_blackClip->cut(0, 1);
+ }
- if (!m_mltProducer || !m_mltProducer->is_valid()) {
+ if (!producer || !producer->is_valid()) {
kDebug() << " WARNING - - - - -INVALID PLAYLIST: ";
return -1;
}
- if (position == -1 && m_mltProducer->get("id") == currentId) position = consumerPosition;
- if (position != -1) m_mltProducer->seek(position);
+ if (m_mltProducer) currentId = m_mltProducer->get("id");
+ emit stopped();
+ if (position == -1 && producer->get("id") == currentId) position = consumerPosition;
+ if (position != -1) producer->seek(position);
int volume = KdenliveSettings::volume();
- m_mltProducer->set("meta.volume", (double)volume / 100);
- m_fps = m_mltProducer->get_fps();
+ producer->set("meta.volume", (double)volume / 100);
+ m_fps = producer->get_fps();
blockSignals(false);
- m_mltConsumer->connect(*m_mltProducer);
+ m_mltConsumer->connect(*producer);
+
+ if (m_mltProducer) {
+ m_mltProducer->set_speed(0);
+ delete m_mltProducer;
+ m_mltProducer = NULL;
+ }
+ m_mltProducer = producer;
m_mltProducer->set_speed(0);
emit durationChanged(m_mltProducer->get_playtime());
if (m_mltConsumer->start() == -1) {
/** @brief Returns a pointer to the main producer. */
Mlt::Producer *getProducer();
/** @brief Returns the number of clips to process (When requesting clip info). */
- int processingItems() const;
+ int processingItems();
/** @brief Force processing of clip with selected id. */
void forceProcessing(const QString &id);
/** @brief Are we currently processing clip with selected id. */
while (ioctl(s->fd, VIDIOC_ENUM_FMT, &fmt) != -1)
{
- snprintf( value, sizeof(value), ">%c%c%c%c", fmt.pixelformat >> 0, fmt.pixelformat >> 8, fmt.pixelformat >> 16, fmt.pixelformat >> 24 );
- strcat(*pixelformatdescription, (char *) value);
+ if (strlen(*pixelformatdescription) > 2000) break;
+ if (snprintf( value, sizeof(value), ">%c%c%c%c", fmt.pixelformat >> 0, fmt.pixelformat >> 8, fmt.pixelformat >> 16, fmt.pixelformat >> 24 ) > 0)
+ strcat(*pixelformatdescription, (char *) value);
fprintf(stderr, "detected format: %s: %c%c%c%c\n", fmt.description, fmt.pixelformat >> 0, fmt.pixelformat >> 8,
fmt.pixelformat >> 16, fmt.pixelformat >> 24);
rates.pixel_format = fmt.pixelformat;
rates.width = image_size.width;
rates.height = image_size.height;
- snprintf( value, sizeof(value), ":%dx%d=", image_size.width, image_size.height );
- strcat(*pixelformatdescription, (char *) value);
+ if (strlen(*pixelformatdescription) > 2000) break;
+ if (snprintf( value, sizeof(value), ":%dx%d=", image_size.width, image_size.height ) > 0)
+ strcat(*pixelformatdescription, (char *) value);
fprintf(stderr, "Size: %dx%d: ", image_size.width, image_size.height);
while (ioctl(s->fd, VIDIOC_ENUM_FRAMEINTERVALS, &rates) != -1) {
- snprintf( value, sizeof(value), "%d/%d,", rates.un.discrete.denominator, rates.un.discrete.numerator );
- strcat(*pixelformatdescription, (char *) value);
+ if (strlen(*pixelformatdescription) > 2000) break;
+ if (snprintf( value, sizeof(value), "%d/%d,", rates.un.discrete.denominator, rates.un.discrete.numerator ) > 0)
+ strcat(*pixelformatdescription, (char *) value);
fprintf(stderr, "%d/%d, ", rates.un.discrete.numerator, rates.un.discrete.denominator);
rates.index ++;
}
#include <QtGui>
#include <QtOpenGL>
+#ifndef __APPLE__
+#include <GL/glu.h>
+#endif
#include "videoglwidget.h"
#ifndef GL_TEXTURE_RECTANGLE_EXT
itemSize = sizes.at(j).section("=", 0, 0);
itemRates = sizes.at(j).section("=", 1, 1).split(",", QString::SkipEmptyParts);
for (int k = 0; k < itemRates.count(); k++) {
- m_capture.v4l_formats->addItem("[" + format + "] " + itemSize + " (" + itemRates.at(k) + ")", QStringList() << format << itemSize.section('x', 0, 0) << itemSize.section('x', 1, 1) << itemRates.at(k).section('/', 0, 0) << itemRates.at(k).section('/', 1, 1));
+ QString formatDescription = "[" + format + "] " + itemSize + " (" + itemRates.at(k) + ")";
+ if (m_capture.v4l_formats->findText(formatDescription) == -1)
+ m_capture.v4l_formats->addItem(formatDescription, QStringList() << format << itemSize.section('x', 0, 0) << itemSize.section('x', 1, 1) << itemRates.at(k).section('/', 0, 0) << itemRates.at(k).section('/', 1, 1));
}
}
}