Refactoring: move all clip queue processing into own class (reducer renderer.cpp)

parent 5ca0c3e3
......@@ -776,7 +776,7 @@ void Bin::slotReloadClip()
if (!xml.isNull()) {
currentItem->setClipStatus(AbstractProjectItem::StatusWaiting);
// We need to set a temporary id before all outdated producers are replaced;
m_doc->renderer()->getFileProperties(xml, currentItem->clipId(), 150, true);
m_doc->getFileProperties(xml, currentItem->clipId(), 150, true);
}
}
}
......@@ -875,7 +875,6 @@ void Bin::setDocument(KdenliveDoc* project)
m_jobManager = new JobManager(this);
m_rootFolder = new ProjectFolder(this);
setEnabled(true);
connect(this, SIGNAL(producerReady(QString)), m_doc->renderer(), SLOT(slotProcessingDone(QString)), Qt::DirectConnection);
connect(m_jobManager, SIGNAL(addClip(QString)), this, SLOT(slotAddUrl(QString)));
connect(m_proxyAction, SIGNAL(toggled(bool)), m_doc, SLOT(slotProxyCurrentItem(bool)));
connect(m_jobManager, SIGNAL(jobCount(int)), m_infoLabel, SLOT(slotSetJobCount(int)));
......@@ -1634,7 +1633,7 @@ void Bin::reloadClip(const QString &id)
if (!clip) return;
QDomDocument doc;
QDomElement xml = clip->toXml(doc);
if (!xml.isNull()) m_doc->renderer()->getFileProperties(xml, id, 150, true);
if (!xml.isNull()) m_doc->getFileProperties(xml, id, 150, true);
}
void Bin::slotThumbnailReady(const QString &id, const QImage &img, bool fromFile)
......@@ -1955,13 +1954,13 @@ void Bin::gotProxy(const QString &id)
if (clip) {
QDomDocument doc;
QDomElement xml = clip->toXml(doc, true);
if (!xml.isNull()) m_doc->renderer()->getFileProperties(xml, id, 150, true);
if (!xml.isNull()) m_doc->getFileProperties(xml, id, 150, true);
}
}
void Bin::reloadProducer(const QString &id, QDomElement xml)
{
m_doc->renderer()->getFileProperties(xml, id, 150, true);
m_doc->getFileProperties(xml, id, 150, true);
}
void Bin::refreshClip(const QString &id)
......@@ -3078,7 +3077,7 @@ void Bin::reloadAllProducers()
if (!xml.isNull()) {
clip->setClipStatus(AbstractProjectItem::StatusWaiting);
// We need to set a temporary id before all outdated producers are replaced;
m_doc->renderer()->getFileProperties(xml, clip->clipId(), 150, true);
m_doc->getFileProperties(xml, clip->clipId(), 150, true);
}
}
}
......@@ -13,6 +13,7 @@ the Free Software Foundation, either version 3 of the License, or
#include "project/projectmanager.h"
#include "monitor/monitormanager.h"
#include "mltcontroller/bincontroller.h"
#include "mltcontroller/producerqueue.h"
#include "bin/bin.h"
#include "library/librarywidget.h"
#include <QCoreApplication>
......@@ -40,6 +41,7 @@ Core::Core(MainWindow *mainWindow) :
Core::~Core()
{
m_monitorManager->stopActiveMonitor();
delete m_producerQueue;
delete m_projectManager;
delete m_binWidget;
delete m_binController;
......@@ -67,6 +69,17 @@ void Core::initialize()
connect(m_binController, SIGNAL(abortAudioThumbs()), m_binWidget, SLOT(abortAudioThumbs()));
connect(m_binController, SIGNAL(loadThumb(QString,QImage,bool)), m_binWidget, SLOT(slotThumbnailReady(QString,QImage,bool)));
m_monitorManager = new MonitorManager(this);
// Producer queue, creating MLT::Producers on request
m_producerQueue = new ProducerQueue(m_binController);
connect(m_producerQueue, SIGNAL(gotFileProperties(requestClipInfo,ClipController *)), m_binWidget, SLOT(slotProducerReady(requestClipInfo,ClipController *)), Qt::DirectConnection);
connect(m_producerQueue, SIGNAL(replyGetImage(QString,QImage,bool)), m_binWidget, SLOT(slotThumbnailReady(QString,QImage,bool)));
connect(m_producerQueue, SIGNAL(removeInvalidClip(QString,bool)), m_binWidget, SLOT(slotRemoveInvalidClip(QString,bool)), Qt::DirectConnection);
connect(m_producerQueue, SIGNAL(addClip(const QString&,const QMap<QString,QString>&)), m_binWidget, SLOT(slotAddUrl(const QString&,const QMap<QString,QString>&)));
connect(m_binController, SIGNAL(createThumb(QDomElement,QString,int)), m_producerQueue, SLOT(getFileProperties(QDomElement,QString,int)));
connect(m_binWidget, SIGNAL(producerReady(QString)), m_producerQueue, SLOT(slotProcessingDone(QString)), Qt::DirectConnection);
//TODO
/*connect(m_producerQueue, SIGNAL(removeInvalidProxy(QString,bool)), m_binWidget, SLOT(slotRemoveInvalidProxy(QString,bool)));*/
emit coreIsReady();
}
......@@ -101,6 +114,11 @@ Bin *Core::bin()
return m_binWidget;
}
ProducerQueue *Core::producerQueue()
{
return m_producerQueue;
}
LibraryWidget *Core::library()
{
return m_library;
......
......@@ -20,6 +20,7 @@ class MonitorManager;
class BinController;
class Bin;
class LibraryWidget;
class ProducerQueue;
#define pCore Core::self()
......@@ -62,6 +63,8 @@ public:
BinController *binController();
/** @brief Returns a pointer to the project bin. */
Bin *bin();
/** @brief Returns a pointer to the producer queue. */
ProducerQueue *producerQueue();
/** @brief Returns a pointer to the library. */
LibraryWidget *library();
......@@ -76,6 +79,7 @@ private:
ProjectManager *m_projectManager;
MonitorManager *m_monitorManager;
BinController *m_binController;
ProducerQueue *m_producerQueue;
Bin *m_binWidget;
LibraryWidget *m_library;
......
......@@ -22,6 +22,7 @@
#include "documentchecker.h"
#include "documentvalidator.h"
#include "mltcontroller/clipcontroller.h"
#include "mltcontroller/producerqueue.h"
#include <config-kdenlive.h>
#include "kdenlivesettings.h"
#include "renderer.h"
......@@ -29,7 +30,6 @@
#include "project/clipmanager.h"
#include "project/projectcommands.h"
#include "bin/bincommands.h"
#include "project/projectlist.h"
#include "effectslist/initeffects.h"
#include "dialogs/profilesdialog.h"
#include "titler/titlewidget.h"
......@@ -99,7 +99,7 @@ KdenliveDoc::KdenliveDoc(const QUrl &url, const QUrl &projectFolder, QUndoGroup
bool success = false;
connect(m_commandStack, SIGNAL(indexChanged(int)), this, SLOT(slotModified()));
connect(m_render, SIGNAL(setDocumentNotes(QString)), this, SLOT(slotSetDocumentNotes(QString)));
connect(pCore->monitorManager(), &MonitorManager::switchProfile, this, &KdenliveDoc::switchProfile);
connect(pCore->producerQueue(), &ProducerQueue::switchProfile, this, &KdenliveDoc::switchProfile);
//connect(m_commandStack, SIGNAL(cleanChanged(bool)), this, SLOT(setModified(bool)));
// Init clip modification tracker
......@@ -276,9 +276,6 @@ KdenliveDoc::KdenliveDoc(const QUrl &url, const QUrl &projectFolder, QUndoGroup
dir.mkdir(QStringLiteral(".backup"));
updateProjectFolderPlacesEntry();
////qDebug() << "// SETTING SCENE LIST:\n\n" << m_document.toString();
connect(m_render, SIGNAL(addClip(const QString&,const QMap<QString,QString>&)), pCore->bin(), SLOT(slotAddUrl(const QString&,const QMap<QString,QString>&)));
}
void KdenliveDoc::slotSetDocumentNotes(const QString &notes)
......@@ -303,6 +300,7 @@ int KdenliveDoc::setSceneList()
{
//m_render->resetProfile(m_profile);
pCore->bin()->isLoading = true;
pCore->producerQueue()->abortOperations();
if (m_render->setSceneList(m_document.toString(), m_documentProperties.value(QStringLiteral("position")).toInt()) == -1) {
// INVALID MLT Consumer, something is wrong
return -1;
......@@ -895,7 +893,7 @@ bool KdenliveDoc::addClip(QDomElement elem, const QString &clipId)
elem.setAttribute("checkProfile", 1);
}
pCore->bin()->createClip(elem);
m_render->getFileProperties(elem, producerId, 150, true);
pCore->producerQueue()->getFileProperties(elem, producerId, 150, true);
/*QString str;
QTextStream stream(&str);
......@@ -1426,7 +1424,7 @@ void KdenliveDoc::slotProxyCurrentItem(bool doProxy, QList<ProjectClip *> clipLi
// Only allow proxy on some clip types
if ((t == Video || t == AV || t == Unknown || t == Image || t == Playlist) && item->isReady()) {
if ((doProxy && item->hasProxy()) || (!doProxy && !item->hasProxy() && pCore->binController()->hasClip(item->clipId()))) continue;
if (m_render->isProcessing(item->clipId())) {
if (pCore->producerQueue()->isProcessing(item->clipId())) {
continue;
}
......@@ -1551,6 +1549,7 @@ void KdenliveDoc::updateProjectProfile(bool reloadProducers)
m_height = m_profile.height;
bool fpsChanged = m_timecode.fps() != fps;
m_timecode.setFormat(fps);
pCore->producerQueue()->abortOperations();
KdenliveSettings::setCurrent_profile(m_profile.path);
pCore->monitorManager()->resetProfiles(m_profile, m_timecode);
if (!reloadProducers) return;
......@@ -1591,6 +1590,16 @@ void KdenliveDoc::switchProfile(MltVideoProfile profile, const QString &id, cons
emit docModified(true);
}
}
renderer()->getFileProperties(xml, id, 150, true);
pCore->producerQueue()->getFileProperties(xml, id, 150, true);
}
void KdenliveDoc::forceProcessing(const QString &id)
{
pCore->producerQueue()->forceProcessing(id);
}
void KdenliveDoc::getFileProperties(const QDomElement &xml, const QString &clipId, int imageHeight, bool replaceProducer)
{
pCore->producerQueue()->getFileProperties(xml, clipId, imageHeight, replaceProducer);
}
......@@ -156,6 +156,9 @@ public:
/** @brief Saves effects embedded in project file. */
void saveCustomEffects(const QDomNodeList &customeffects);
void resetProfile();
/** @brief Force processing of clip id in producer queue. */
void forceProcessing(const QString &id);
void getFileProperties(const QDomElement &xml, const QString &clipId, int imageHeight, bool replaceProducer = true);
private:
QUrl m_url;
......
......@@ -24,7 +24,6 @@
#include "mainwindow.h"
#include "doc/kthumb.h"
#include "bin/projectclip.h"
#include "project/projectlist.h"
#include "effectslist/effectslist.h"
#include "timeline/clipitem.h"
#include "project/transitionsettings.h"
......
......@@ -41,6 +41,7 @@
#include "effectstack/effectstackview2.h"
#include "project/transitionsettings.h"
#include "mltcontroller/bincontroller.h"
#include "mltcontroller/producerqueue.h"
#include "dialogs/renderwidget.h"
#include "renderer.h"
#include "project/clipproperties.h"
......@@ -785,13 +786,8 @@ void MainWindow::slotUpdateClip(const QString &id, bool reload)
void MainWindow::slotConnectMonitors()
{
//connect(m_projectList, SIGNAL(deleteProjectClips(QStringList,QMap<QString,QString>)), this, SLOT(slotDeleteProjectClips(QStringList,QMap<QString,QString>)));
connect(m_projectMonitor->render, SIGNAL(replyGetImage(QString,QImage,bool)), pCore->bin(), SLOT(slotThumbnailReady(QString,QImage,bool)));
connect(m_projectMonitor->render, SIGNAL(gotFileProperties(requestClipInfo,ClipController *)), pCore->bin(), SLOT(slotProducerReady(requestClipInfo,ClipController *)), Qt::DirectConnection);
connect(m_projectMonitor->render, SIGNAL(removeInvalidClip(QString,bool)), pCore->bin(), SLOT(slotRemoveInvalidClip(QString,bool)), Qt::DirectConnection);
//DirectConnection was necessary not to mess the analyze queue, but the monitor thread shouldn't show any UI widget (profile dialog), so adding an AutoConnection in between?
/*connect(m_projectMonitor->render, SIGNAL(removeInvalidProxy(QString,bool)), pCore->bin(), SLOT(slotRemoveInvalidProxy(QString,bool)));*/
connect(m_clipMonitor, SIGNAL(refreshClipThumbnail(QString)), pCore->bin(), SLOT(slotRefreshClipThumbnail(QString)));
connect(m_projectMonitor, SIGNAL(requestFrameForAnalysis(bool)), this, SLOT(slotMonitorRequestRenderFrame(bool)));
}
......@@ -1613,7 +1609,7 @@ void MainWindow::connectDocument()
connect(trackView, SIGNAL(configTrack()), this, SLOT(slotConfigTrack()));
connect(trackView, SIGNAL(updateTracksInfo()), this, SLOT(slotUpdateTrackInfo()));
connect(trackView, SIGNAL(mousePosition(int)), this, SLOT(slotUpdateMousePosition(int)));
connect(m_projectMonitor->render, SIGNAL(infoProcessingFinished()), trackView->projectView(), SLOT(slotInfoProcessingFinished()), Qt::DirectConnection);
connect(pCore->producerQueue(), SIGNAL(infoProcessingFinished()), trackView->projectView(), SLOT(slotInfoProcessingFinished()), Qt::DirectConnection);
connect(trackView->projectView(), SIGNAL(importKeyframes(GraphicsRectItem,QString,int)), this, SLOT(slotProcessImportKeyframes(GraphicsRectItem,QString,int)));
......
......@@ -4,4 +4,5 @@ set(kdenlive_SRCS
mltcontroller/clipcontroller.cpp
mltcontroller/clippropertiescontroller.cpp
mltcontroller/effectscontroller.cpp
PARENT_SCOPE)
\ No newline at end of file
mltcontroller/producerqueue.cpp
PARENT_SCOPE)
This diff is collapsed.
/*
Copyright (C) 2016 Jean-Baptiste Mardelle <jb@kdenlive.org>
This file is part of Kdenlive. See www.kdenlive.org.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License or (at your option) version 3 or any later version
accepted by the membership of KDE e.V. (or its successor approved
by the membership of KDE e.V.), which shall act as a proxy
defined in Section 14 of version 3 of the license.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PRODUCERQUEUE_H
#define PRODUCERQUEUE_H
#include "definitions.h"
#include <QMutex>
#include <QFuture>
class ClipController;
class BinController;
namespace Mlt
{
class Producer;
}
/**)
* @class ProducerQueue
* @brief A class building MLT producers / Clipcontrollers from url / xml info
* @author Jean-Baptiste Mardelle
*/
class ProducerQueue : public QObject
{
Q_OBJECT
public:
explicit ProducerQueue(BinController *controller);
~ProducerQueue();
/** @brief Returns the number of clips to process (When requesting clip info). */
int processingItems();
/** @brief Force processing of clip with selected id. */
void forceProcessing(const QString &id);
/** @brief Are we currently processing clip with selected id. */
bool isProcessing(const QString &id);
/** @brief Make sure to close running threads before closing document */
void abortOperations();
private:
QMutex m_infoMutex;
QList <requestClipInfo> m_requestList;
/** @brief The ids of the clips that are currently being loaded for info query */
QStringList m_processingClipId;
QFuture <void> m_infoThread;
BinController *m_binController;
ClipType getTypeForService(const QString &id, const QString &path) const;
/** @brief Pass xml values to an MLT producer at build time */
void processProducerProperties(Mlt::Producer *prod, QDomElement xml);
public slots:
/** @brief Requests the file properties for the specified URL (will be put in a queue list)
@param xml The xml parameters for the clip
@param clipId The clip Id string
@param imageHeight The height (in pixels) of the returned thumbnail (height of a treewidgetitem in projectlist)
@param replaceProducer If true, the MLT producer will be recreated */
void getFileProperties(const QDomElement &xml, const QString &clipId, int imageHeight, bool replaceProducer = true);
/** @brief Processing of this clip is over, producer was set on clip, remove from list. */
void slotProcessingDone(const QString &id);
private slots:
/** @brief Process the clip info requests (in a separate thread). */
void processFileProperties();
/** @brief A clip with multiple video streams was found, ask what to do. */
void slotMultiStreamProducerFound(const QString &path, QList<int> audio_list, QList<int> video_list, stringMap data);
signals:
/** @brief The renderer received a reply to a getFileProperties request. */
void gotFileProperties(requestClipInfo,ClipController *);
/** @brief The renderer received a reply to a getImage request. */
void replyGetImage(const QString &, const QImage &,bool fromFile = false);
/** @brief A proxy clip is missing, ask for creation. */
void requestProxy(QString);
void infoProcessingFinished();
/** @brief First clip does not match profect profile, switch. */
void switchProfile(MltVideoProfile profile, const QString &id, const QDomElement &xml);
/** @brief The clip is not valid, should be removed from project. */
void removeInvalidClip(const QString &, bool replaceProducer);
/** @brief The proxy is not valid, should be deleted.
* @param id The original clip's id
* @param durationError Should be set to true if the proxy failed because it has not same length as original clip
*/
void removeInvalidProxy(const QString &id, bool durationError);
/** @brief A multiple stream clip was found. */
void multiStreamFound(const QString &,QList<int>,QList<int>,stringMap data);
void addClip(const QString &, const QMap<QString,QString>&);
};
#endif
......@@ -290,7 +290,6 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
connect(render, SIGNAL(durationChanged(int,int)), this, SLOT(adjustRulerSize(int,int)));
connect(render, SIGNAL(rendererStopped(int)), this, SLOT(rendererStopped(int)));
connect(render, &Render::switchProfile, m_monitorManager, &MonitorManager::switchProfile);
connect(m_glMonitor, SIGNAL(analyseFrame(QImage)), render, SLOT(emitFrameUpdated(QImage)));
connect(m_glMonitor, SIGNAL(audioSamplesSignal(const audioShortVector&,int,int,int)), render, SIGNAL(audioSamplesSignal(const audioShortVector&,int,int,int)));
connect(m_glMonitor, SIGNAL(audioLevels(const audioLevelVector&)), &m_levelManager, SLOT(slotAudioLevels(const audioLevelVector&)));
......
......@@ -136,8 +136,6 @@ signals:
void addEffect(QDomElement);
/** @brief Monitor activated, refresh overlay options actions */
void updateOverlayInfos(int, int);
/** @brief First clip does not match profect profile, switch. */
void switchProfile(MltVideoProfile profile, const QString &id, const QDomElement &xml);
};
#endif
......@@ -11,7 +11,6 @@ the Free Software Foundation, either version 3 of the License, or
#include "clippropertiesmanager.h"
#include "clipproperties.h"
#include "projectlist.h"
#include "core.h"
#include "projectmanager.h"
#include "mainwindow.h"
......
......@@ -24,7 +24,6 @@
#include <QDialog>
#include <QPushButton>
#include "project/projectlist.h"
#include "ui_projectsettings_ui.h"
class KdenliveDoc;
......
......@@ -19,7 +19,6 @@
***************************************************************************/
#include "projectcommands.h"
#include "projectlist.h"
#include "bin/projectclip.h"
#include "doc/kdenlivedoc.h"
......
......@@ -580,7 +580,7 @@ void ProjectList::slotReloadClip(const QString &id)
e.setAttribute("duration", clip->getProperty("duration"));
}
resetThumbsProducer(clip);
m_render->getFileProperties(e, item->clipId(), m_listView->iconSize().height(), true);
//m_render->getFileProperties(e, item->clipId(), m_listView->iconSize().height(), true);
}
}
}
......
......@@ -12,13 +12,13 @@ the Free Software Foundation, either version 3 of the License, or
#include "core.h"
#include "bin/bin.h"
#include "mltcontroller/bincontroller.h"
#include "mltcontroller/producerqueue.h"
#include "mainwindow.h"
#include "kdenlivesettings.h"
#include "monitor/monitormanager.h"
#include "doc/kdenlivedoc.h"
#include "timeline/timeline.h"
#include "project/dialogs/projectsettings.h"
#include "projectlist.h"
#include "timeline/customtrackview.h"
#include "transitionsettings.h"
#include "project/dialogs/archivewidget.h"
......@@ -222,7 +222,7 @@ bool ProjectManager::closeCurrentDocument(bool saveChanges, bool quit)
if (!quit && !qApp->isSavingSession()) {
m_autoSaveTimer.stop();
if (m_project) {
m_project->renderer()->abortOperations();
pCore->producerQueue()->abortOperations();
pCore->bin()->abortAudioThumbs();
pCore->window()->slotTimelineClipSelected(NULL, false);
pCore->monitorManager()->clipMonitor()->slotOpenClip(NULL);
......
This diff is collapsed.
......@@ -256,12 +256,6 @@ class Render: public AbstractRender
Mlt::Producer *getProducer();
/** @brief Returns a pointer to the bin's playlist. */
/** @brief Returns the number of clips to process (When requesting clip info). */
int processingItems();
/** @brief Force processing of clip with selected id. */
void forceProcessing(const QString &id);
/** @brief Are we currently processing clip with selected id. */
bool isProcessing(const QString &id);
/** @brief Lock the MLT service */
Mlt::Tractor *lockService();
/** @brief Unlock the MLT service */
......@@ -304,8 +298,6 @@ class Render: public AbstractRender
void prepareProfileReset(double fps);
void updateSlowMotionProducers(const QString &id, QMap <QString, QString> passProperties);
static QMap<QString, QString> mltGetTransitionParamsFromXml(const QDomElement &xml);
/** @brief Make sure to close running threads before closing document */
void abortOperations();
private:
......@@ -340,8 +332,6 @@ private:
QMutex m_infoMutex;
QLocale m_locale;
QFuture <void> m_infoThread;
QList <requestClipInfo> m_requestList;
/** @brief True if this monitor is active. */
bool m_isActive;
/** @brief True if the consumer is currently refreshing itself. */
......@@ -350,8 +340,7 @@ private:
void closeMlt();
void mltPasteEffects(Mlt::Producer *source, Mlt::Producer *dest);
QMap<QString, Mlt::Producer *> m_slowmotionProducers;
/** @brief The ids of the clips that are currently being loaded for info query */
QStringList m_processingClipId;
/** @brief Build the MLT Consumer object with initial settings.
* @param profileName The MLT profile to use for the consumer */
......@@ -365,28 +354,14 @@ private:
void cloneProperties(Mlt::Properties &dest, Mlt::Properties &source);
/** @brief Get a track producer from a clip's id */
Mlt::Producer *getProducerForTrack(Mlt::Playlist &trackPlaylist, const QString &clipId);
ClipType getTypeForService(const QString &id, const QString &path) const;
/** @brief Pass xml values to an MLT producer at build time */
void processProducerProperties(Mlt::Producer *prod, QDomElement xml);
private slots:
/** @brief Refreshes the monitor display. */
void refresh();
/** @brief Process the clip info requests (in a separate thread). */
void processFileProperties();
/** @brief A clip with multiple video streams was found, ask what to do. */
void slotMultiStreamProducerFound(const QString &path, QList<int> audio_list, QList<int> video_list, stringMap data);
void slotCheckSeeking();
signals:
/** @brief The renderer received a reply to a getFileProperties request. */
void gotFileProperties(requestClipInfo,ClipController *);
/** @brief The renderer received a reply to a getImage request. */
void replyGetImage(const QString &, const QImage &,bool fromFile = false);
/** @brief The renderer stopped, either playing or rendering. */
void stopped();
......@@ -401,39 +376,26 @@ signals:
void durationChanged(int, int offset = 0);
void rendererPosition(int);
void rendererStopped(int);
/** @brief The clip is not valid, should be removed from project. */
void removeInvalidClip(const QString &, bool replaceProducer);
/** @brief The proxy is not valid, should be deleted.
* @param id The original clip's id
* @param durationError Should be set to true if the proxy failed because it has not same length as original clip
*/
void removeInvalidProxy(const QString &id, bool durationError);
/** @brief A proxy clip is missing, ask for creation. */
void requestProxy(QString);
/** @brief A multiple stream clip was found. */
void multiStreamFound(const QString &,QList<int>,QList<int>,stringMap data);
/** @brief A clip has changed, we must reload timeline producers. */
void replaceTimelineProducer(const QString&);
void updateTimelineProducer(const QString&);
/** @brief Load project notes. */
void setDocumentNotes(const QString&);
/** @brief The renderer received a reply to a getFileProperties request. */
void gotFileProperties(requestClipInfo,ClipController *);
/** @brief A frame's image has to be shown.
*
* Used in Mac OS X. */
void showImageSignal(QImage);
void showAudioSignal(const QVector<double> &);
void addClip(const QString &, const QMap<QString,QString>&);
void checkSeeking();
/** @brief Activate current monitor. */
void activateMonitor(Kdenlive::MonitorId);
void mltFrameReceived(Mlt::Frame *);
void infoProcessingFinished();
/** @brief We want to replace a clip with another, but before we need to change clip producer id so that there is no interference*/
void prepareTimelineReplacement(const QString &);
/** @brief First clip does not match profect profile, switch. */
void switchProfile(MltVideoProfile profile, const QString &id, const QDomElement &xml);
public slots:
......@@ -452,19 +414,11 @@ public slots:
void seekToFrame(int pos);
/** @brief Starts a timer to query for a refresh. */
void doRefresh();
/** @brief Processing of this clip is over, producer was set on clip, remove from list. */
void slotProcessingDone(const QString &id);
void emitFrameUpdated(QImage img);
/** @brief Save a part of current timeline to an xml file. */
void saveZone(QPoint zone);
/** @brief Requests the file properties for the specified URL (will be put in a queue list)
@param xml The xml parameters for the clip
@param clipId The clip Id string
@param imageHeight The height (in pixels) of the returned thumbnail (height of a treewidgetitem in projectlist)
@param replaceProducer If true, the MLT producer will be recreated */
void getFileProperties(const QDomElement &xml, const QString &clipId, int imageHeight, bool replaceProducer = true);
/** @brief Renderer moved to a new frame, check seeking */
bool checkFrameNumber(int pos);
void storeSlowmotionProducer(const QString &url, Mlt::Producer *prod, bool replace = false);
......
......@@ -4794,7 +4794,7 @@ void CustomTrackView::addClip(const QString &clipId, ItemInfo info, EffectsList
if (!binClip->isReady()) {
// If the clip has no producer, we must wait until it is created...
emit displayMessage(i18n("Waiting for clip..."), InformationMessage);
m_document->renderer()->forceProcessing(clipId);
m_document->forceProcessing(clipId);
// If the clip is not ready, give it 10x3 seconds to complete the task...
for (int i = 0; i < 10; ++i) {
if (!binClip->isReady()) {
......
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