aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Pinon <[email protected]>2015-07-31 14:53:22 +0200
committerVincent Pinon <[email protected]>2015-08-02 22:19:55 +0200
commit7e0678f7db624c216a14b240febcd5163918f51d (patch)
treed8f4beb0f89d25b6a2fb71a3808f73761cb2e18a
parent85838ab40c36a2ded22bc23b5218734683a45509 (diff)
remove unsued functions (cppcheck warnings)
-rw-r--r--src/bin/bin.cpp10
-rw-r--r--src/bin/bin.h6
-rw-r--r--src/bin/projectclip.cpp21
-rw-r--r--src/bin/projectclip.h5
-rw-r--r--src/bin/projectfolder.cpp14
-rw-r--r--src/bin/projectfolder.h5
-rw-r--r--src/bin/projectfolderup.cpp4
-rw-r--r--src/bin/projectfolderup.h5
-rw-r--r--src/capture/mltdevicecapture.cpp21
-rw-r--r--src/doc/docclipbase.cpp121
-rw-r--r--src/doc/docclipbase.h10
-rw-r--r--src/doc/kdenlivedoc.cpp72
-rw-r--r--src/doc/kdenlivedoc.h6
-rw-r--r--src/doc/kthumb.cpp5
-rw-r--r--src/doc/kthumb.h1
-rw-r--r--src/dvdwizard/dvdwizardmenu.cpp62
-rw-r--r--src/dvdwizard/dvdwizardmenu.h1
-rw-r--r--src/effectstack/widgets/kis_curve_widget.cpp11
-rw-r--r--src/lib/external/kiss_fft/kiss_fft.c5
-rw-r--r--src/lib/external/kiss_fft/kiss_fft.h7
-rw-r--r--src/mainwindow.cpp17
-rw-r--r--src/mainwindow.h1
-rw-r--r--src/mltcontroller/clipcontroller.cpp10
-rw-r--r--src/mltcontroller/clipcontroller.h1
-rw-r--r--src/monitor/glwidget.cpp5
-rw-r--r--src/monitor/glwidget.h1
-rw-r--r--src/monitor/monitor.cpp45
-rw-r--r--src/monitor/monitor.h1
-rw-r--r--src/monitor/monitoreditwidget.cpp10
-rw-r--r--src/monitor/monitoreditwidget.h5
-rw-r--r--src/monitor/videoglwidget.cpp23
-rw-r--r--src/monitor/videoglwidget.h4
-rw-r--r--src/project/clipmanager.cpp15
-rw-r--r--src/project/clipmanager.h2
-rw-r--r--src/project/clipproperties.cpp10
-rw-r--r--src/project/clipproperties.h1
-rw-r--r--src/project/clipstabilize.cpp56
-rw-r--r--src/project/clipstabilize.h1
-rw-r--r--src/project/projectitem.cpp12
-rw-r--r--src/project/projectitem.h4
-rw-r--r--src/project/projectlist.cpp417
-rw-r--r--src/project/projectlist.h23
-rw-r--r--src/project/projectlistview.cpp5
-rw-r--r--src/project/projectlistview.h1
-rw-r--r--src/renderer.cpp392
-rw-r--r--src/renderer.h10
-rw-r--r--src/statusbarmessagelabel.cpp11
-rw-r--r--src/statusbarmessagelabel.h10
-rw-r--r--src/stopmotion/stopmotion.cpp32
-rw-r--r--src/stopmotion/stopmotion.h3
-rw-r--r--src/timeline/abstractclipitem.cpp15
-rw-r--r--src/timeline/abstractclipitem.h3
-rw-r--r--src/timeline/clipitem.cpp22
-rw-r--r--src/timeline/clipitem.h1
-rw-r--r--src/timeline/customtrackview.cpp48
-rw-r--r--src/timeline/customtrackview.h6
56 files changed, 0 insertions, 1615 deletions
diff --git a/src/bin/bin.cpp b/src/bin/bin.cpp
index b85dac3..91e5067 100644
--- a/src/bin/bin.cpp
+++ b/src/bin/bin.cpp
@@ -528,11 +528,6 @@ ProjectFolder *Bin::rootFolder()
return m_rootFolder;
}
-double Bin::projectRatio()
-{
- return m_doc->dar();
-}
-
QUrl Bin::projectFolder() const
{
return m_doc->projectFolder();
@@ -1502,11 +1497,6 @@ const QSize Bin::getRenderSize()
return m_doc->getRenderSize();
}
-JobManager *Bin::jobManager()
-{
- return m_jobManager;
-}
-
void Bin::slotUpdateJobStatus(const QString&id, int jobType, int status, const QString &label, const QString &actionName, const QString &details)
{
ProjectClip *clip = m_rootFolder->clip(id);
diff --git a/src/bin/bin.h b/src/bin/bin.h
index c48b4c2..3ec819b 100644
--- a/src/bin/bin.h
+++ b/src/bin/bin.h
@@ -309,9 +309,6 @@ public:
/** @brief Create a clip item from its xml description */
void createClip(QDomElement xml);
- /** @brief Returns current doc's project ratio for thumbnail scaling */
- double projectRatio();
-
/** @brief Used to notify the Model View that an item was updated */
void emitItemUpdated(AbstractProjectItem* item);
@@ -365,9 +362,6 @@ public:
/** @brief A proxy clip was just created, pass it to the responsible item */
void gotProxy(const QString &id);
- /** @brief Returns the job manager, responsible for handling clip jobs */
- JobManager *jobManager();
-
/** @brief Get the document's renderer frame size */
const QSize getRenderSize();
diff --git a/src/bin/projectclip.cpp b/src/bin/projectclip.cpp
index 96610d5..aa348c6 100644
--- a/src/bin/projectclip.cpp
+++ b/src/bin/projectclip.cpp
@@ -198,15 +198,6 @@ GenTime ProjectClip::duration() const
return GenTime();
}
-QString ProjectClip::serializeClip()
-{
- /*Mlt::Consumer *consumer = bin()->project()->xmlConsumer();
- consumer->connect(*m_baseProducer);
- consumer->run();
- return QString::fromUtf8(consumer->get("kdenlive_clip"));*/
- return QString();
-}
-
void ProjectClip::reloadProducer(bool thumbnailOnly)
{
QDomDocument doc;
@@ -331,18 +322,6 @@ QPoint ProjectClip::zone() const
return QPoint(x, y);
}
-void ProjectClip::addMarker(int position)
-{
- m_markers << position;
- //bin()->markersUpdated(m_id, m_markers);
-}
-
-void ProjectClip::removeMarker(int position)
-{
- m_markers.removeAll(position);
- //bin()->markersUpdated(m_id, m_markers);
-}
-
void ProjectClip::resetProducerProperty(const QString &name)
{
if (m_controller) {
diff --git a/src/bin/projectclip.h b/src/bin/projectclip.h
index f735c5c..0182e33 100644
--- a/src/bin/projectclip.h
+++ b/src/bin/projectclip.h
@@ -85,8 +85,6 @@ public:
ClipType clipType() const;
ClipPropertiesController *buildProperties(QWidget *parent);
QPoint zone() const;
- void addMarker(int position);
- void removeMarker(int position);
/** @brief Returns true if we want to add an affine transition in timeline when dropping this clip. */
bool isTransparent() const;
@@ -97,9 +95,6 @@ public:
/** @brief Returns the clip's url. */
QUrl url() const;
- /** @brief Returns the clip's xml data by using MLT's XML consumer. */
- QString serializeClip();
-
/** @brief Returns whether this clip has a limited duration or whether it is resizable ad infinitum. */
virtual bool hasLimitedDuration() const;
diff --git a/src/bin/projectfolder.cpp b/src/bin/projectfolder.cpp
index c1c327d..38aa548 100644
--- a/src/bin/projectfolder.cpp
+++ b/src/bin/projectfolder.cpp
@@ -31,7 +31,6 @@ ProjectFolder::ProjectFolder(const QString &id, const QString &name, ProjectFold
AbstractProjectItem(AbstractProjectItem::FolderItem, id, parent)
, m_bin(NULL)
{
- //loadChildren(description);
m_name = name;
m_clipStatus = StatusReady;
m_thumbnail = QIcon::fromTheme("folder");
@@ -120,19 +119,6 @@ QDomElement ProjectFolder::toXml(QDomDocument& document)
return folder;
}
-void ProjectFolder::loadChildren(const QDomElement& description)
-{
- /*QDomNodeList childen = description.childNodes();
- for (int i = 0; i < childen.count(); ++i) {
- QDomElement childElement = childen.at(i).toElement();
- if (childElement.tagName() == "folder") {
- new ProjectFolder(childElement, this);
- } else {
- childElement.setTagName("producer");
- }
- }*/
-}
-
bool ProjectFolder::rename(const QString &name, int column)
{
if (m_name == name) return false;
diff --git a/src/bin/projectfolder.h b/src/bin/projectfolder.h
index 66dd2f5..534f7a2 100644
--- a/src/bin/projectfolder.h
+++ b/src/bin/projectfolder.h
@@ -80,12 +80,7 @@ public:
virtual QString getToolTip() const;
virtual bool rename(const QString &name, int column);
-protected:
-
-
private:
- void loadChildren(const QDomElement &description);
-
Bin *m_bin;
};
diff --git a/src/bin/projectfolderup.cpp b/src/bin/projectfolderup.cpp
index dd5728f..e74b474 100644
--- a/src/bin/projectfolderup.cpp
+++ b/src/bin/projectfolderup.cpp
@@ -82,10 +82,6 @@ QDomElement ProjectFolderUp::toXml(QDomDocument& document)
return document.documentElement();
}
-void ProjectFolderUp::loadChildren(const QDomElement& description)
-{
-}
-
bool ProjectFolderUp::rename(const QString &, int )
{
return false;
diff --git a/src/bin/projectfolderup.h b/src/bin/projectfolderup.h
index f149bc0..66014c9 100644
--- a/src/bin/projectfolderup.h
+++ b/src/bin/projectfolderup.h
@@ -77,12 +77,7 @@ public:
virtual QString getToolTip() const;
virtual bool rename(const QString &name, int column);
-protected:
-
-
private:
- void loadChildren(const QDomElement &description);
-
Bin *m_bin;
};
diff --git a/src/capture/mltdevicecapture.cpp b/src/capture/mltdevicecapture.cpp
index 538a7b8..c5a3196 100644
--- a/src/capture/mltdevicecapture.cpp
+++ b/src/capture/mltdevicecapture.cpp
@@ -41,27 +41,6 @@ static void consumer_gl_frame_show(mlt_consumer, MltDeviceCapture * self, mlt_fr
self->showFrame(frame);
}
-static void rec_consumer_frame_preview(mlt_consumer, MltDeviceCapture * self, mlt_frame frame_ptr)
-{
- Mlt::Frame frame(frame_ptr);
- if (!frame.is_valid()) return;
- if (self->sendFrameForAnalysis && frame_ptr->convert_image) {
- self->emitFrameUpdated(frame);
- }
- if (self->doCapture > 0) {
- self->doCapture --;
- if (self->doCapture == 0) self->saveFrame(frame);
- }
-
- //TODO: connect record monitor to audio scopes
-
- if (self->analyseAudio) {
- self->showAudio(frame);
- }
-
-}
-
-
MltDeviceCapture::MltDeviceCapture(QString profile, /*VideoSurface *surface, */QWidget *parent) :
AbstractRender(Kdenlive::RecordMonitor, parent),
doCapture(0),
diff --git a/src/doc/docclipbase.cpp b/src/doc/docclipbase.cpp
index aca93ec..4dcae28 100644
--- a/src/doc/docclipbase.cpp
+++ b/src/doc/docclipbase.cpp
@@ -134,13 +134,6 @@ QPoint DocClipBase::zone() const
return zone;
}
-
-bool DocClipBase::hasAudioThumb() const
-{
- if (m_clipType == Audio || m_clipType == AV || m_clipType == Playlist) return true;
- return false;
-}
-
KThumb *DocClipBase::thumbProducer()
{
return m_thumbProd;
@@ -180,11 +173,6 @@ QUrl DocClipBase::fileURL() const
return QUrl();
}
-void DocClipBase::setClipThumbFrame(const uint &ix)
-{
- m_properties.insert("thumbnail", QString::number((int) ix));
-}
-
uint DocClipBase::getClipThumbFrame() const
{
return (uint) m_properties.value("thumbnail").toInt();
@@ -374,20 +362,6 @@ void DocClipBase::addSnapMarker(const CommentedTime &marker)
}
}
-void DocClipBase::editSnapMarker(const GenTime & time, const QString &comment)
-{
- QList < CommentedTime >::Iterator it;
- for (it = m_snapMarkers.begin(); it != m_snapMarkers.end(); ++it) {
- if ((*it).time() == time)
- break;
- }
- if (it != m_snapMarkers.end()) {
- (*it).setComment(comment);
- } else {
- qCritical() << "trying to edit Snap Marker that does not already exists";
- }
-}
-
QString DocClipBase::deleteSnapMarker(const GenTime & time)
{
QString result = i18n("Marker");
@@ -407,30 +381,6 @@ QString DocClipBase::deleteSnapMarker(const GenTime & time)
}
-GenTime DocClipBase::findPreviousSnapMarker(const GenTime & currTime)
-{
- int it;
- for (it = 0; it < m_snapMarkers.count(); ++it) {
- if (m_snapMarkers.at(it).time() >= currTime)
- break;
- }
- if (it == 0) return GenTime();
- else if (it == m_snapMarkers.count() - 1 && m_snapMarkers.at(it).time() < currTime)
- return m_snapMarkers.at(it).time();
- else return m_snapMarkers.at(it - 1).time();
-}
-
-GenTime DocClipBase::findNextSnapMarker(const GenTime & currTime)
-{
- int it;
- for (it = 0; it < m_snapMarkers.count(); ++it) {
- if (m_snapMarkers.at(it).time() > currTime)
- break;
- }
- if (it < m_snapMarkers.count() && m_snapMarkers.at(it).time() > currTime) return m_snapMarkers.at(it).time();
- return duration();
-}
-
QString DocClipBase::markerComment(const GenTime &t) const
{
QList < CommentedTime >::ConstIterator itt = m_snapMarkers.begin();
@@ -491,29 +441,6 @@ void DocClipBase::deleteProducers()
m_audioTrackProducers.clear();
}
-void DocClipBase::cleanupProducers()
-{
- /*
- int ct = 0;
- //qDebug()<<"----------------------------------------------------------------------------------";
- for (int i = 0; i < m_toDeleteProducers.count(); ++i) {
- if (m_toDeleteProducers.at(i) != NULL) {
- Mlt::Properties props(m_toDeleteProducers.at(i)->get_properties());
- if (props.ref_count() > 2) {
- //qDebug()<<"PRODUCER: "<<i<<", COUNTS: "<<props.ref_count();
- //exit(1);
- }
- ct++;
- }
- }*/
-
- if (!isClean()) {
- qDeleteAll(m_toDeleteProducers);
- m_toDeleteProducers.clear();
- m_replaceMutex.unlock();
- }
-}
-
bool DocClipBase::isClean() const
{
return m_toDeleteProducers.isEmpty();
@@ -702,49 +629,6 @@ Mlt::Producer *DocClipBase::videoProducer(int track)
return m_videoTrackProducers.at(track);
}
-Mlt::Producer *DocClipBase::getCloneProducer()
-{
- Mlt::Producer *source = NULL;
- Mlt::Producer *prod = NULL;
- if (m_clipType != Audio && m_clipType != AV && m_clipType != Playlist) {
- source = getProducer();
- if (!source) return NULL;
- }
- if (m_clipType == Color) {
- prod = new Mlt::Producer(*(source->profile()), 0, QString("colour:" + QString(source->get("resource"))).toUtf8().constData());
- } else if (m_clipType == Text) {
- prod = new Mlt::Producer(*(source->profile()), 0, QString("kdenlivetitle:" + QString(source->get("resource"))).toUtf8().constData());
- if (prod && prod->is_valid() && m_properties.contains("xmldata"))
- prod->set("xmldata", m_properties.value("xmldata").toUtf8().constData());
- }
- if (!prod) {
- if (!source) {
- QMutexLocker locker(&m_producerMutex);
- for (int i = 0; i < m_baseTrackProducers.count(); ++i) {
- if (m_baseTrackProducers.at(i) != NULL) {
- source = m_baseTrackProducers.at(i);
- break;
- }
- }
- if (!source) return NULL;
- }
- prod = cloneProducer(source);
- }
- if (prod) {
- adjustProducerProperties(prod, getId() + '_', false, false);
- if (!m_properties.contains("proxy_out")) {
- // Adjust length in case...
- if (m_properties.contains("duration")) prod->set("length", m_properties.value("duration").toInt());
- if (m_properties.contains("out"))prod->set("out", m_properties.value("out").toInt());
- }
- if (m_clipType == Audio) {
- prod->set("_audioclip", 1);
- }
- }
- return prod;
-}
-
-
Mlt::Producer *DocClipBase::getProducer(int track)
{
QMutexLocker locker(&m_producerMutex);
@@ -1287,11 +1171,6 @@ void DocClipBase::updateCutZone(int oldin, int oldout, int in, int out, const QS
}
}
-QList <CutZoneInfo> DocClipBase::cutZones() const
-{
- return m_cutZones;
-}
-
bool DocClipBase::hasVideoCodec(const QString &codec) const
{
Mlt::Producer *prod = NULL;
diff --git a/src/doc/docclipbase.h b/src/doc/docclipbase.h
index 7d0b2e3..e1ff021 100644
--- a/src/doc/docclipbase.h
+++ b/src/doc/docclipbase.h
@@ -78,8 +78,6 @@ public:
/** Returns the internal unique id of the clip. */
const QString &getId() const;
- bool hasAudioThumb() const;
- //KThumb *thumbCreator;
bool audioThumbCreated() const;
/*void getClipMainThumb();*/
@@ -115,8 +113,6 @@ public:
void setProducer(Mlt::Producer &producer, bool reset = false, bool readPropertiesFromProducer = false);
/** Retrieve a producer for a track */
Mlt::Producer *getProducer(int track = -1);
- /** Get a copy of the producer, for use in the clip monitor */
- Mlt::Producer *getCloneProducer();
/** Retrieve the producer that shows only video */
Mlt::Producer *videoProducer(int track);
/** Retrieve the producer that shows only audio */
@@ -177,7 +173,6 @@ public:
void addCutZone(int in, int out, const QString &desc = QString());
bool hasCutZone(const QPoint &p) const;
void removeCutZone(int in, int out);
- QList <CutZoneInfo> cutZones() const;
void updateCutZone(int oldin, int oldout, int in, int out, const QString &desc = QString());
bool hasVideoCodec(const QString &codec) const;
@@ -187,7 +182,6 @@ public:
QImage extractImage(int frame, int width, int height);
void clearThumbProducer();
void reloadThumbProducer();
- void cleanupProducers();
bool isClean() const;
void setAnalysisData(const QString &name, const QString &data, int offset = 0);
QMap <QString, QString> analysisData() const;
@@ -262,15 +256,11 @@ private: // Private attributes
public slots:
void updateAudioThumbnail(const audioByteArray& data);
QList < CommentedTime > commentedSnapMarkers() const;
- GenTime findNextSnapMarker(const GenTime & currTime);
- GenTime findPreviousSnapMarker(const GenTime & currTime);
QString deleteSnapMarker(const GenTime & time);
- void editSnapMarker(const GenTime & time, const QString &comment);
void addSnapMarker(const CommentedTime &marker);
QList < GenTime > snapMarkers() const;
QString markerComment(const GenTime &t) const;
CommentedTime markerAt(const GenTime &t) const;
- void setClipThumbFrame(const uint &ix);
uint getClipThumbFrame() const;
void setProperties(QMap<QString, QString> properties);
void setMetadata(const QMap <QString, QString> &properties, const QString &tool = QString());
diff --git a/src/doc/kdenlivedoc.cpp b/src/doc/kdenlivedoc.cpp
index 9eb2634..c0176e5 100644
--- a/src/doc/kdenlivedoc.cpp
+++ b/src/doc/kdenlivedoc.cpp
@@ -302,7 +302,6 @@ KdenliveDoc::KdenliveDoc(const QUrl &url, const QUrl &projectFolder, QUndoGroup
// Something went wrong, or a new file was requested: create a new project
if (!success) {
m_url.clear();
- //setProfilePath(profileName);
m_profile = ProfilesDialog::getVideoProfile(profileName);
m_document = createEmptyDocument(tracks.x(), tracks.y());
updateProjectProfile();
@@ -804,66 +803,6 @@ ProfileInfo KdenliveDoc::getProfileInfo() const
return info;
}
-/*Mlt::Profile *KdenliveDoc::profile()
-{
- return pCore->binController()->profile();
-}*/
-
-bool KdenliveDoc::setProfilePath(QString path)
-{
- if (path.isEmpty())
- path = KdenliveSettings::default_profile();
- if (path.isEmpty())
- path = QLatin1String("dv_pal");
- m_profile = ProfilesDialog::getVideoProfile(path);
- double current_fps = m_render->fps();
- if (m_profile.path.isEmpty()) {
- // Profile not found, use embedded profile
- QDomElement profileInfo = m_document.elementsByTagName("profileinfo").at(0).toElement();
- if (profileInfo.isNull()) {
- KMessageBox::information(QApplication::activeWindow(), i18n("Project profile was not found, using default profile."), i18n("Missing Profile"));
- m_profile = ProfilesDialog::getVideoProfile(KdenliveSettings::default_profile());
- } else {
- m_profile.description = profileInfo.attribute("description");
- m_profile.frame_rate_num = profileInfo.attribute("frame_rate_num").toInt();
- m_profile.frame_rate_den = profileInfo.attribute("frame_rate_den").toInt();
- m_profile.width = profileInfo.attribute("width").toInt();
- m_profile.height = profileInfo.attribute("height").toInt();
- m_profile.progressive = profileInfo.attribute("progressive").toInt();
- m_profile.sample_aspect_num = profileInfo.attribute("sample_aspect_num").toInt();
- m_profile.sample_aspect_den = profileInfo.attribute("sample_aspect_den").toInt();
- m_profile.display_aspect_num = profileInfo.attribute("display_aspect_num").toInt();
- m_profile.display_aspect_den = profileInfo.attribute("display_aspect_den").toInt();
- QString existing = ProfilesDialog::existingProfile(m_profile);
- if (!existing.isEmpty()) {
- m_profile = ProfilesDialog::getVideoProfile(existing);
- KMessageBox::information(QApplication::activeWindow(), i18n("Project profile not found, replacing with existing one: %1", m_profile.description), i18n("Missing Profile"));
- } else {
- QString newDesc = m_profile.description;
- bool ok = true;
- while (ok && (newDesc.isEmpty() || ProfilesDialog::existingProfileDescription(newDesc))) {
- newDesc = QInputDialog::getText(QApplication::activeWindow(), i18n("Existing Profile"), i18n("Your project uses an unknown profile.\nIt uses an existing profile name: %1.\nPlease choose a new name to save it", newDesc), QLineEdit::Normal, newDesc, &ok);
- }
- if (ok == false) {
- // User canceled, use default profile
- m_profile = ProfilesDialog::getVideoProfile(KdenliveSettings::default_profile());
- } else {
- if (newDesc != m_profile.description) {
- // Profile description existed, was replaced by new one
- m_profile.description = newDesc;
- } else {
- KMessageBox::information(QApplication::activeWindow(), i18n("Project profile was not found, it will be added to your system now."), i18n("Missing Profile"));
- }
- ProfilesDialog::saveProfile(m_profile);
- }
- }
- setModified(true);
- }
- }
- updateProjectProfile();
- return (current_fps != KdenliveSettings::project_fps());
-}
-
double KdenliveDoc::dar() const
{
return (double) m_profile.display_aspect_num / m_profile.display_aspect_den;
@@ -1597,17 +1536,6 @@ void KdenliveDoc::slotClipMissing(const QString &path)
}*/
}
-void KdenliveDoc::slotClipAvailable(const QString &path)
-{
- qDebug() << "// CLIP: " << path << " WAS ADDED";
- QStringList ids = pCore->binController()->getBinIdsByResource(QUrl::fromLocalFile(path));
-
- foreach (const QString &id, ids) {
- pCore->bin()->reloadClip(id);
- //emit availableClip(id);
- }
-}
-
void KdenliveDoc::slotProcessModifiedClips()
{
if (!m_modifiedClips.isEmpty()) {
diff --git a/src/doc/kdenlivedoc.h b/src/doc/kdenlivedoc.h
index ab07642..7d24832 100644
--- a/src/doc/kdenlivedoc.h
+++ b/src/doc/kdenlivedoc.h
@@ -108,14 +108,9 @@ public:
/** @brief Returns current project profile. */
MltVideoProfile mltProfile() const;
ProfileInfo getProfileInfo() const;
- //Mlt::Profile *profile();
const QString description() const;
void setUrl(const QUrl &url);
- /** @brief Updates the project profile.
- * @return true if frame rate was changed */
- bool setProfilePath(QString path);
-
/** @brief Defines whether the document needs to be saved. */
bool isModified() const;
@@ -227,7 +222,6 @@ public slots:
private slots:
void slotClipModified(const QString &path);
void slotClipMissing(const QString &path);
- void slotClipAvailable(const QString &path);
void slotProcessModifiedClips();
void slotModified();
void slotSetDocumentNotes(const QString &notes);
diff --git a/src/doc/kthumb.cpp b/src/doc/kthumb.cpp
index 763db89..c11245b 100644
--- a/src/doc/kthumb.cpp
+++ b/src/doc/kthumb.cpp
@@ -87,11 +87,6 @@ bool KThumb::hasProducer() const
return m_producer != NULL;
}
-void KThumb::updateThumbUrl(const QString &hash)
-{
- m_thumbFile = m_clipManager->projectFolder() + "/thumbs/" + hash + ".thumb";
-}
-
void KThumb::updateClipUrl(const QUrl &url, const QString &hash)
{
m_url = url;
diff --git a/src/doc/kthumb.h b/src/doc/kthumb.h
index 71d7f3e..8370d16 100644
--- a/src/doc/kthumb.h
+++ b/src/doc/kthumb.h
@@ -56,7 +56,6 @@ public:
void setProducer(Mlt::Producer *producer);
bool hasProducer() const;
void clearProducer();
- void updateThumbUrl(const QString &hash);
void extractImage(const QList<int> &frames);
QImage extractImage(int frame, int width, int height);
/** @brief Request thumbnails for the frame range. */
diff --git a/src/dvdwizard/dvdwizardmenu.cpp b/src/dvdwizard/dvdwizardmenu.cpp
index c68c7f0..f5d7b7c 100644
--- a/src/dvdwizard/dvdwizardmenu.cpp
+++ b/src/dvdwizard/dvdwizardmenu.cpp
@@ -162,68 +162,6 @@ void DvdWizardMenu::slotEnableShadows(int enable)
}
}
-// virtual
-bool DvdWizardMenu::isComplete() const
-{
- m_view.error_message->setHidden(true);
- if (!m_view.create_menu->isChecked()) return true;
- QList <int> targets;
- QList<QGraphicsItem *> list = m_scene->items();
- int buttonCount = 0;
- // check that the menu buttons don't collide
- for (int i = 0; i < list.count(); ++i) {
- if (list.at(i)->type() == DvdButtonItem) {
- buttonCount++;
- DvdButton *button = static_cast < DvdButton* >(list.at(i));
- QList<QGraphicsItem *> collisions = button->collidingItems();
- if (!collisions.isEmpty()) {
- for (int j = 0; j < collisions.count(); ++j) {
- if (collisions.at(j)->type() == button->type()) {
- m_menuMessage->setText(i18n("Buttons overlapping"));
- m_menuMessage->setMessageType(KMessageWidget::Warning);
- m_menuMessage->show();
- return false;
- }
- }
- }
- targets.append(button->target());
- }
- }
- if (buttonCount == 0) {
- //We need at least one button
- m_menuMessage->setText(i18n("No button in menu"));
- m_menuMessage->setMessageType(KMessageWidget::Warning);
- m_menuMessage->show();
- return false;
- }
-
- if (!m_view.background_image->isHidden()) {
- // Make sure user selected a valid image / video file
- if (!QFile::exists(m_view.background_image->url().path())) {
- m_menuMessage->setText(i18n("Missing background image"));
- m_menuMessage->setMessageType(KMessageWidget::Warning);
- m_menuMessage->show();
- return false;
- }
- }
-
- m_menuMessage->hide();
-
- // check that we have a "Play all" entry
- if (targets.contains(0)) return true;
- // ... or that each video file has a button
- for (int i = m_view.target_list->count() - 1; i > 0; --i) {
- // If there is a vob file entry and it has no button assigned, don't allow to go further
- if (m_view.target_list->itemIcon(i).isNull() == false && !targets.contains(i)) {
- m_menuMessage->setText(i18n("No menu entry for %1", m_view.target_list->itemText(i)));
- m_menuMessage->setMessageType(KMessageWidget::Warning);
- m_menuMessage->show();
- return false;
- }
- }
- return true;
-}
-
void DvdWizardMenu::setButtonTarget(int ix)
{
QList<QGraphicsItem *> list = m_scene->selectedItems();
diff --git a/src/dvdwizard/dvdwizardmenu.h b/src/dvdwizard/dvdwizardmenu.h
index c7e0718..a931c2b 100644
--- a/src/dvdwizard/dvdwizardmenu.h
+++ b/src/dvdwizard/dvdwizardmenu.h
@@ -151,7 +151,6 @@ class DvdWizardMenu : public QWizardPage
public:
explicit DvdWizardMenu(DVDFORMAT format, QWidget * parent = 0);
virtual ~DvdWizardMenu();
- virtual bool isComplete() const;
bool createMenu() const;
void createBackgroundImage(const QString &img1, bool letterbox);
void createButtonImages(const QString &selected_image, const QString &highlighted_image, bool letterbox);
diff --git a/src/effectstack/widgets/kis_curve_widget.cpp b/src/effectstack/widgets/kis_curve_widget.cpp
index 6d63fd2..0443b89 100644
--- a/src/effectstack/widgets/kis_curve_widget.cpp
+++ b/src/effectstack/widgets/kis_curve_widget.cpp
@@ -116,17 +116,6 @@ void KisCurveWidget::setupInOutControls(QSpinBox *in, QSpinBox *out, int min, in
d->syncIOControls();
}
-void KisCurveWidget::dropInOutControls()
-{
- if (!d->m_intIn || !d->m_intOut)
- return;
-
- disconnect(d->m_intIn, SIGNAL(valueChanged(int)), this, SLOT(inOutChanged(int)));
- disconnect(d->m_intOut, SIGNAL(valueChanged(int)), this, SLOT(inOutChanged(int)));
-
- d->m_intIn = d->m_intOut = NULL;
-
-}
void KisCurveWidget::inOutChanged(int)
{
diff --git a/src/lib/external/kiss_fft/kiss_fft.c b/src/lib/external/kiss_fft/kiss_fft.c
index 643a3dd..ba46006 100644
--- a/src/lib/external/kiss_fft/kiss_fft.c
+++ b/src/lib/external/kiss_fft/kiss_fft.c
@@ -386,11 +386,6 @@ void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout)
}
-void kiss_fft_cleanup(void)
-{
- // nothing needed any more
-}
-
int kiss_fft_next_fast_size(int n)
{
while(1) {
diff --git a/src/lib/external/kiss_fft/kiss_fft.h b/src/lib/external/kiss_fft/kiss_fft.h
index a592116..009aa80 100644
--- a/src/lib/external/kiss_fft/kiss_fft.h
+++ b/src/lib/external/kiss_fft/kiss_fft.h
@@ -121,13 +121,6 @@ void kiss_fft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout
#define kiss_fft_free free
/*
- Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up
- your compiler output to call this before you exit.
-*/
-void kiss_fft_cleanup(void);
-
-
-/*
* Returns the smallest integer k, such that k>=n and k has only "fast" factors (2,3,5)
*/
int kiss_fft_next_fast_size(int n);
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 2718384..e8afc03 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1234,11 +1234,6 @@ void MainWindow::setupActions()
//m_effectsActionCollection->readSettings();
}
-void MainWindow::slotDisplayActionMessage(QAction *a)
-{
- statusBar()->showMessage(a->data().toString(), 3000);
-}
-
void MainWindow::setStatusBarStyleSheet(const QPalette &p)
{
KColorScheme scheme(p.currentColorGroup(), KColorScheme::Window, KSharedConfig::openConfig(KdenliveSettings::colortheme()));
@@ -2422,18 +2417,6 @@ void MainWindow::slotClipInProjectTree()
}
}
-/*void MainWindow::slotClipToProjectTree()
-{
- if (pCore->projectManager()->currentTimeline()) {
- const QList<ClipItem *> clips = pCore->projectManager()->currentTimeline()->projectView()->selectedClipItems();
- if (clips.isEmpty()) return;
- for (int i = 0; i < clips.count(); ++i) {
- m_projectList->slotAddXmlClip(clips.at(i)->itemXml());
- }
- //m_projectList->selectItemById(clipIds.at(i));
- }
-}*/
-
void MainWindow::slotSelectClipInTimeline()
{
if (pCore->projectManager()->currentTimeline()) {
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 2d5e297..307101f 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -274,7 +274,6 @@ private slots:
void slotAddEffect(const QDomElement &effect);
void slotEditProfiles();
void slotEditProjectSettings();
- void slotDisplayActionMessage(QAction *a);
/** @brief Turns automatic splitting of audio and video on/off. */
void slotSwitchSplitAudio();
diff --git a/src/mltcontroller/clipcontroller.cpp b/src/mltcontroller/clipcontroller.cpp
index 01fd11a..82e0dc7 100644
--- a/src/mltcontroller/clipcontroller.cpp
+++ b/src/mltcontroller/clipcontroller.cpp
@@ -313,16 +313,6 @@ const QString ClipController::codec(bool audioCodec) const
return m_properties->get(propertyName.toUtf8().constData());
}
-QSize ClipController::originalFrameSize() const
-{
- if (!m_properties) return QSize();
- QString propertyName = QString("meta.media.%1.codec.width").arg(m_videoIndex);
- int x = m_properties->get_int(propertyName.toUtf8().constData());
- propertyName = QString("meta.media.%1.codec.height").arg(m_videoIndex);
- int y = m_properties->get_int(propertyName.toUtf8().constData());
- return QSize(x, y);
-}
-
QUrl ClipController::clipUrl() const
{
return m_url;
diff --git a/src/mltcontroller/clipcontroller.h b/src/mltcontroller/clipcontroller.h
index dd27db0..599ef66 100644
--- a/src/mltcontroller/clipcontroller.h
+++ b/src/mltcontroller/clipcontroller.h
@@ -119,7 +119,6 @@ public:
double originalFps() const;
QString videoCodecProperty(const QString &property) const;
const QString codec(bool audioCodec) const;
- QSize originalFrameSize() const;
const QString getClipHash() const;
/** @brief Returns the clip duration as a string like 00:00:02:01. */
diff --git a/src/monitor/glwidget.cpp b/src/monitor/glwidget.cpp
index 48c5fe5..96c800c 100644
--- a/src/monitor/glwidget.cpp
+++ b/src/monitor/glwidget.cpp
@@ -1210,11 +1210,6 @@ void FrameRenderer::clearFrame()
m_frame = SharedFrame();
}
-SharedFrame FrameRenderer::getDisplayFrame()
-{
- return m_frame;
-}
-
void FrameRenderer::cleanup()
{
if (m_renderTexture[0] && m_renderTexture[1] && m_renderTexture[2]) {
diff --git a/src/monitor/glwidget.h b/src/monitor/glwidget.h
index 8cdd0a8..4d21c05 100644
--- a/src/monitor/glwidget.h
+++ b/src/monitor/glwidget.h
@@ -198,7 +198,6 @@ public:
~FrameRenderer();
QSemaphore* semaphore() { return &m_semaphore; }
QOpenGLContext* context() const { return m_context; }
- SharedFrame getDisplayFrame();
void clearFrame();
Q_INVOKABLE void showFrame(Mlt::Frame frame);
Q_INVOKABLE void showGLFrame(Mlt::Frame frame);
diff --git a/src/monitor/monitor.cpp b/src/monitor/monitor.cpp
index c6a82d4..5daab0d 100644
--- a/src/monitor/monitor.cpp
+++ b/src/monitor/monitor.cpp
@@ -367,11 +367,6 @@ void Monitor::slotForceSize(QAction *a)
updateGeometry();
}
-void Monitor::resetSize()
-{
- m_glWidget->setMinimumSize(0, 0);
-}
-
QString Monitor::getTimecodeFromFrames(int pos)
{
return m_monitorManager->timecode().getTimecodeFromFrames(pos);
@@ -1076,46 +1071,6 @@ const QString Monitor::activeClipId()
return QString();
}
-/*
-void Monitor::slotSetClipProducer(DocClipBase *clip, QPoint zone, bool forceUpdate, int position)
-{
- if (render == NULL) return;
- if (clip == NULL && m_currentClip != NULL) {
- m_currentClip->lastSeekPosition = render->seekFramePosition();
- m_currentClip = NULL;
- m_length = -1;
- render->setProducer(NULL, -1);
- return;
- }
-
- if (clip != m_currentClip || forceUpdate) {
- if (m_currentClip) m_currentClip->lastSeekPosition = render->seekFramePosition();
- m_currentClip = clip;
- if (position == -1) position = clip->lastSeekPosition;
- updateMarkers(clip);
- if (render->setMonitorProducer(clip->getId(), position) == -1) {
- // MLT CONSUMER is broken
- qWarning() << "ERROR, Cannot start monitor";
- } else start();
- } else {
- if (m_currentClip) {
- slotActivateMonitor();
- if (position == -1) position = render->seekFramePosition();
- render->seek(position);
- if (zone.isNull()) {
- zone = m_currentClip->zone();
- m_ruler->setZone(zone.x(), zone.y());
- return;
- }
- }
- }
- if (!zone.isNull()) {
- m_ruler->setZone(zone.x(), zone.y());
- render->seek(zone.x());
- }
-}
-*/
-
void Monitor::slotOpenDvdFile(const QString &file)
{
if (render == NULL) return;
diff --git a/src/monitor/monitor.h b/src/monitor/monitor.h
index 47472ed..423cde0 100644
--- a/src/monitor/monitor.h
+++ b/src/monitor/monitor.h
@@ -62,7 +62,6 @@ public:
AbstractRender *abstractRender();
void resetProfile(MltVideoProfile profile);
void setCustomProfile(const QString &profile, const Timecode &tc);
- void resetSize();
void pause();
void setupMenu(QMenu *goMenu, QAction *playZone, QAction *loopZone, QMenu *markerMenu = NULL, QAction *loopClip = NULL, QWidget* parent = NULL);
const QString sceneList();
diff --git a/src/monitor/monitoreditwidget.cpp b/src/monitor/monitoreditwidget.cpp
index 176b269..a2aca12 100644
--- a/src/monitor/monitoreditwidget.cpp
+++ b/src/monitor/monitoreditwidget.cpp
@@ -105,16 +105,6 @@ MonitorScene* MonitorEditWidget::getScene() const
return m_scene;
}
-QAction* MonitorEditWidget::getVisibilityAction()
-{
- return m_visibilityAction;
-}
-
-void MonitorEditWidget::showVisibilityButton(bool show)
-{
- m_visibilityAction->setVisible(show);
-}
-
void MonitorEditWidget::addCustomButton(const QIcon& icon, const QString& text, const QObject* receiver, const char* member, bool checkable, bool checked)
{
QToolButton *button = new QToolButton(m_ui.frameCustomControls);
diff --git a/src/monitor/monitoreditwidget.h b/src/monitor/monitoreditwidget.h
index 6449325..d7af542 100644
--- a/src/monitor/monitoreditwidget.h
+++ b/src/monitor/monitoreditwidget.h
@@ -44,11 +44,6 @@ public:
/** @brief Returns the on-monitor scene. */
MonitorScene *getScene() const;
- /** @brief Returns the action toggling between the normal monitor and the editor. */
- QAction *getVisibilityAction();
- /** @brief Shows/Hides the visibility button/action. */
- void showVisibilityButton(bool show);
-
/** @brief Adds a custom widget to the controls. */
void addCustomControl(QWidget *widget);
void addCustomButton(const QIcon &icon, const QString &text, const QObject *receiver, const char *member, bool checkable = true, bool checked = true);
diff --git a/src/monitor/videoglwidget.cpp b/src/monitor/videoglwidget.cpp
index d8eda94..b23ed69 100644
--- a/src/monitor/videoglwidget.cpp
+++ b/src/monitor/videoglwidget.cpp
@@ -61,12 +61,6 @@ QSize VideoGLWidget::sizeHint() const
return QSize(400, 300);
}
-void VideoGLWidget::setImageAspectRatio(double ratio)
-{
- m_display_ratio = ratio;
- resizeGL(width(), height());
-}
-
void VideoGLWidget::initializeGL()
{
initializeOpenGLFunctions();
@@ -138,23 +132,6 @@ void VideoGLWidget::paintGL()
}
}
-void VideoGLWidget::showImage(const QImage &image)
-{
- m_image_width = image.width();
- m_image_height = image.height();
- makeCurrent();
- if (m_texture)
- glDeleteTextures(1, &m_texture);
-
- glPixelStorei(GL_UNPACK_ROW_LENGTH, m_image_width);
- glGenTextures(1, &m_texture);
- glBindTexture(GL_TEXTURE_RECTANGLE_EXT, m_texture);
- glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, GL_RGBA8, m_image_width, m_image_height, 0, GL_RGB,
- GL_UNSIGNED_BYTE, image.bits());
-}
-
void VideoGLWidget::mouseDoubleClickEvent(QMouseEvent * event)
{
// TODO: disable screensaver?
diff --git a/src/monitor/videoglwidget.h b/src/monitor/videoglwidget.h
index 3abaf57..db9ad61 100644
--- a/src/monitor/videoglwidget.h
+++ b/src/monitor/videoglwidget.h
@@ -34,14 +34,10 @@ public:
void activateMonitor();
QSize minimumSizeHint() const;
QSize sizeHint() const;
- void setImageAspectRatio(double ratio);
void setBackgroundColor(const QColor &color) {
m_backgroundColor = color;
}
-public slots:
- void showImage(const QImage &image);
-
protected:
void initializeGL();
void resizeGL(int width, int height);
diff --git a/src/project/clipmanager.cpp b/src/project/clipmanager.cpp
index d1c5f80..daafd43 100644
--- a/src/project/clipmanager.cpp
+++ b/src/project/clipmanager.cpp
@@ -244,12 +244,6 @@ void ClipManager::deleteProjectItems(QStringList clipIds, QStringList folderIds,
}
}
-
-void ClipManager::deleteProjectClip(const QString &clipId)
-{
- pCore->bin()->deleteClip(clipId);
-}
-
void ClipManager::slotDeleteClips(QStringList clipIds, QStringList folderIds, QStringList subClipIds, QUndoCommand *deleteCommand, bool execute)
{
for (int i = 0; i < clipIds.size(); ++i) {
@@ -303,15 +297,6 @@ void ClipManager::deleteClip(const QString &clipId)
return list;
}*/
-
-void ClipManager::clearUnusedProducers()
-{
-/* for (int i = 0; i < m_clipList.count(); ++i) {
- if (m_clipList.at(i)->numReferences() == 0) m_clipList.at(i)->deleteProducers();
- }*/
-}
-
-
void ClipManager::slotAddCopiedClip(KIO::Job *job, const QUrl &, const QUrl &dst)
{
pCore->bin()->droppedUrls(QList<QUrl>() << dst);
diff --git a/src/project/clipmanager.h b/src/project/clipmanager.h
index 4ebf09c..f0ca52d 100644
--- a/src/project/clipmanager.h
+++ b/src/project/clipmanager.h
@@ -71,7 +71,6 @@ Q_OBJECT public:
explicit ClipManager(KdenliveDoc *doc);
virtual ~ ClipManager();
void deleteClip(const QString &clipId);
- void deleteProjectClip(const QString &clipId);
void slotAddTextTemplateClip(QString titleName, const QUrl &path, const QString &group, const QString &groupId);
void slotDeleteClips(QStringList clipIds, QStringList folderIds, QStringList subClipIds, QUndoCommand *deleteCommand, bool execute);
@@ -80,7 +79,6 @@ Q_OBJECT public:
int getFreeFolderId();
int lastClipId() const;
QString projectFolder() const;
- void clearUnusedProducers();
/** @brief Prepare deletion of clips and folders from the Bin. */
void deleteProjectItems(QStringList clipIds, QStringList folderIds, QStringList subClipIds, QUndoCommand *deleteCommand = NULL);
void clear();
diff --git a/src/project/clipproperties.cpp b/src/project/clipproperties.cpp
index f705d9b..a020a58 100644
--- a/src/project/clipproperties.cpp
+++ b/src/project/clipproperties.cpp
@@ -738,16 +738,6 @@ void ClipProperties::slotReloadVideoThumb()
emit requestThumb(QString('?' + m_clip->getId()), QList<int>() << m_clip->getClipThumbFrame());
}
-void ClipProperties::disableClipId(const QString &id)
-{
- if (m_clip && m_view.buttonBox->button(QDialogButtonBox::Ok)->isEnabled()) {
- if (m_clip->getId() == id) {
- // clip was removed from project, close this properties dialog
- close();
- }
- }
-}
-
void ClipProperties::slotModified()
{
m_view.buttonBox->button(QDialogButtonBox::Apply)->setEnabled(true);
diff --git a/src/project/clipproperties.h b/src/project/clipproperties.h
index 5647736..88a64e5 100644
--- a/src/project/clipproperties.h
+++ b/src/project/clipproperties.h
@@ -57,7 +57,6 @@ public:
const QString &clipId() const;
bool needsTimelineRefresh() const;
bool needsTimelineReload() const;
- void disableClipId(const QString &id);
public slots:
void slotFillMarkersList(DocClipBase *clip);
diff --git a/src/project/clipstabilize.cpp b/src/project/clipstabilize.cpp
index dbb1333..9ab4c05 100644
--- a/src/project/clipstabilize.cpp
+++ b/src/project/clipstabilize.cpp
@@ -177,62 +177,6 @@ QString ClipStabilize::desc() const
return i18n("Stabilize clip");
}
-void ClipStabilize::slotStartStabilize()
-{
- /*
- if (m_consumer && !m_consumer->is_stopped()) {
- return;
- }
- m_duration = 0;
- QStringList parameters;
- QString destination;
- //QString params = ffmpeg_params->toPlainText().simplified();
- if (urls_list->count() > 0) {
- source_url->setUrl(m_urls.takeFirst());
- destination = dest_url->url().path(::AddTrailingSlash)+ source_url->url().fileName()+".mlt";
- QList<QListWidgetItem *> matching = urls_list->findItems(source_url->url().path(), Qt::MatchExactly);
- if (matching.count() > 0) {
- matching.at(0)->setFlags(Qt::ItemIsSelectable);
- urls_list->setCurrentItem(matching.at(0));
- }
- } else {
- destination = dest_url->url().path();
- }
- QString s_url = source_url->url().path();
-
- if (QFile::exists(destination)) {
- if (KMessageBox::questionYesNo(this, i18n("File %1 already exists.\nDo you want to overwrite it?", destination )) == KMessageBox::No) return;
- }
- buttonBox->button(QDialogButtonBox::Abort)->setText(i18n("Abort"));
-
- if (m_profile){
- m_playlist= new Mlt::Playlist;
- Mlt::Filter filter(*m_profile,filtername.toUtf8().data());
- QHashIterator <QString,QHash<QString,QString> > it(m_ui_params);
- while (it.hasNext()){
- it.next();
- filter.set(
- it.key().toLatin1().data(),
- QString::number(it.value()["value"].toDouble()).toLatin1().data());
- }
- Mlt::Producer p(*m_profile,s_url.toUtf8().data());
- if (p.is_valid()) {
- m_playlist->append(p);
- m_playlist->attach(filter);
- m_consumer= new Mlt::Consumer(*m_profile,"xml",destination.toUtf8().data());
- m_consumer->set("all",1);
- m_consumer->set("real_time",-2);
- m_consumer->connect(*m_playlist);
- m_stabilizeRun = QtConcurrent::run(this, &ClipStabilize::slotRunStabilize);
- m_timer->start(500);
- button_start->setEnabled(false);
- }
- }
-*/
-}
-
-
-
void ClipStabilize::slotUpdateParams()
{
for (int i=0;i<vbox->count();++i){
diff --git a/src/project/clipstabilize.h b/src/project/clipstabilize.h
index fe7cc44..af462ac 100644
--- a/src/project/clipstabilize.h
+++ b/src/project/clipstabilize.h
@@ -49,7 +49,6 @@ public:
private slots:
- void slotStartStabilize();
void slotUpdateParams();
void slotValidate();
diff --git a/src/project/projectitem.cpp b/src/project/projectitem.cpp
index 24154f4..b80d105 100644
--- a/src/project/projectitem.cpp
+++ b/src/project/projectitem.cpp
@@ -262,18 +262,6 @@ bool ProjectItem::hasProxy() const
return true;
}
-bool ProjectItem::isProxyReady() const
-{
- return (data(0, JobProgressRole).toInt() == JobDone);
-}
-
-bool ProjectItem::isJobRunning() const
-{
- int s = data(0, JobProgressRole).toInt();
- if (s == JobWaiting || s == JobWorking || s > 0) return true;
- return false;
-}
-
void ProjectItem::setJobStatus(AbstractClipJob::JOBTYPE jobType, ClipJobStatus status, int progress, const QString &statusMessage)
{
}
diff --git a/src/project/projectitem.h b/src/project/projectitem.h
index 327a27e..fd41cdd 100644
--- a/src/project/projectitem.h
+++ b/src/project/projectitem.h
@@ -69,10 +69,6 @@ public:
void setConditionalJobStatus(ClipJobStatus status, AbstractClipJob::JOBTYPE requestedJobType);
/** \brief Returns the proxy status for this clip (true means there is a proxy clip). */
bool hasProxy() const;
- /** \brief Returns true if the proxy for this clip is ready. */
- bool isProxyReady() const;
- /** \brief Returns true if there is a job currently running for this clip. */
- bool isJobRunning() const;
/** \brief Returns true if we are currently creating the proxy for this clip. */
bool isProxyRunning() const;
/** \brief Returns true if the thumbnail for this clip has been loaded. */
diff --git a/src/project/projectlist.cpp b/src/project/projectlist.cpp
index 8ec6e38..8fd8f2f 100644
--- a/src/project/projectlist.cpp
+++ b/src/project/projectlist.cpp
@@ -307,12 +307,6 @@ ProjectList::~ProjectList()
delete m_infoMessage;
}
-void ProjectList::focusTree() const
-{
- m_listView->setFocus();
-}
-
-
void ProjectList::selectClip(const QString &id)
{
ProjectItem *item = getItemById(id);
@@ -324,16 +318,6 @@ void ProjectList::clearSelection()
m_listView->clearSelection();
}
-QByteArray ProjectList::headerInfo() const
-{
- return m_listView->header()->saveState();
-}
-
-void ProjectList::setHeaderInfo(const QByteArray &state)
-{
- m_listView->header()->restoreState(state);
-}
-
void ProjectList::updateProjectFormat(Timecode t)
{
m_timecode = t;
@@ -689,13 +673,6 @@ bool ProjectList::hasMissingClips()
return missing;
}
-void ProjectList::setRenderer(Render *projectRender)
-{
- m_render = projectRender;
- m_listView->setIconSize(QSize((m_listView->iconSize().height() - 2) * m_render->dar(), m_listView->iconSize().height() - 2));
- connect(m_render, SIGNAL(requestProxy(QString)), this, SLOT(slotCreateProxy(QString)));
-}
-
void ProjectList::slotClipSelected()
{
QTreeWidgetItem *item = m_listView->currentItem();
@@ -912,8 +889,6 @@ void ProjectList::slotItemEdited(QTreeWidgetItem *item, int column)
if (clip->clipType() == Text) {
// This is a text template clip, update the image
- /*oldprops.insert("xmldata", clip->referencedClip()->getProperty("xmldata"));
- newprops.insert("xmldata", generateTemplateXml(clip->referencedClip()->getProperty("xmltemplate"), item->text(2)).toString());*/
oldprops.insert("templatetext", clip->referencedClip()->getProperty("templatetext"));
newprops.insert("templatetext", item->text(1));
}
@@ -1073,14 +1048,6 @@ void ProjectList::updateButtons() const
*/
}
-void ProjectList::selectItemById(const QString &clipId)
-{
- ProjectItem *item = getItemById(clipId);
- if (item)
- m_listView->setCurrentItem(item);
-}
-
-
void ProjectList::slotDeleteClip(const QString &clipId)
{
ProjectItem *item = getItemById(clipId);
@@ -1159,20 +1126,6 @@ void ProjectList::slotAddFolder(const QString &foldername, const QString &clipId
}
}
-void ProjectList::deleteProjectFolder(QMap <QString, QString> map)
-{
- QMapIterator<QString, QString> i(map);
- QUndoCommand *delCommand = new QUndoCommand();
- delCommand->setText(i18n("Delete Folder"));
- while (i.hasNext()) {
- i.next();
- new AddFolderCommand(this, i.key(), i.value(), false, delCommand);
- }
- if (delCommand->childCount() > 0) m_commandStack->push(delCommand);
- else delete delCommand;
-}
-
-
void ProjectList::slotGotProxy(const QString &proxyPath)
{
if (proxyPath.isEmpty() || m_abortAllJobs) return;
@@ -1221,29 +1174,6 @@ void ProjectList::slotGotProxy(ProjectItem *item)
m_render->getFileProperties(e, clip->getId(), m_listView->iconSize().height(), true);
}
-void ProjectList::slotResetProjectList()
-{
- m_listView->blockSignals(true);
- m_abortAllJobs = true;
- for (int i = 0; i < m_jobList.count(); ++i) {
- m_jobList.at(i)->setStatus(JobAborted);
- }
- m_closing = true;
- m_jobThreads.waitForFinished();
- m_jobThreads.clearFutures();
- m_thumbnailQueue.clear();
- if (!m_jobList.isEmpty()) qDeleteAll(m_jobList);
- m_jobList.clear();
- m_listView->clear();
- m_listView->setEnabled(true);
- emit clipSelected(NULL);
- m_refreshed = false;
- m_allClipsProcessed = false;
- m_abortAllJobs = false;
- m_closing = false;
- m_listView->blockSignals(false);
-}
-
void ProjectList::slotUpdateClip(const QString &id)
{
ProjectItem *item = getItemById(id);
@@ -1545,42 +1475,6 @@ void ProjectList::slotRemoveInvalidProxy(const QString &id, bool durationError)
m_thumbnailQueue.removeAll(id);
}
-void ProjectList::slotAddTitleTemplateClip()
-{
- if (!m_commandStack)
- qDebug() << "!!!!!!!!!!!!!!!! NO CMD STK";
-
- QStringList groupInfo = getGroup();
-
- // Get the list of existing templates
- QStringList filter;
- filter << "*.kdenlivetitle";
- const QString path = m_doc->projectFolder().path() + QDir::separator() + "titles/";
- QStringList templateFiles = QDir(path).entryList(filter, QDir::Files);
-
- QPointer<QDialog> dia = new QDialog(this);
- Ui::TemplateClip_UI dia_ui;
- dia_ui.setupUi(dia);
- for (int i = 0; i < templateFiles.size(); ++i)
- dia_ui.template_list->comboBox()->addItem(templateFiles.at(i), path + templateFiles.at(i));
-
- if (!templateFiles.isEmpty())
- dia_ui.buttonBox->button(QDialogButtonBox::Ok)->setFocus();
- QStringList mimeTypeFilters;
- mimeTypeFilters <<"application/x-kdenlivetitle";
- dia_ui.template_list->setFilter(mimeTypeFilters.join(' '));
- //warning: setting base directory doesn't work??
- dia_ui.template_list->setUrl(QUrl::fromLocalFile(path));
- dia_ui.text_box->setHidden(true);
- if (dia->exec() == QDialog::Accepted) {
- QString textTemplate = dia_ui.template_list->comboBox()->itemData(dia_ui.template_list->comboBox()->currentIndex()).toString();
- if (textTemplate.isEmpty()) textTemplate = dia_ui.template_list->comboBox()->currentText();
- // Create a cloned template clip
- m_doc->slotCreateTextTemplateClip(groupInfo.at(0), groupInfo.at(1), QUrl(textTemplate));
- }
- delete dia;
-}
-
QStringList ProjectList::getGroup() const
{
QStringList result;
@@ -1848,107 +1742,6 @@ void ProjectList::extractMetadata(DocClipBase *clip)
}
}
-
-void ProjectList::slotReplyGetFileProperties(requestClipInfo &clipInfo, Mlt::Producer &producer, const stringMap &properties, const stringMap &metadata)
-{
- QMutexLocker lock(&m_processMutex);
- QString toReload;
- ProjectItem *item = getItemById(clipInfo.clipId);
- if (item && producer.is_valid()) {
- monitorItemEditing(false);
- DocClipBase *clip = item->referencedClip();
- if (clip->isPlaceHolder()) {
- clip->setValid();
- toReload = clipInfo.clipId;
- }
- item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsDragEnabled | Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsDropEnabled);
- item->setProperties(properties, metadata);
- clip->setProducer(producer, clipInfo.replaceProducer);
- extractMetadata(clip);
- m_render->slotProcessingDone(clipInfo.clipId);
- // Proxy stuff
- QString size = properties.value("frame_size");
- if (!useProxy() && clip->getProperty("proxy").isEmpty()) {
- item->setConditionalJobStatus(NoJob, AbstractClipJob::PROXYJOB);
- discardJobs(clipInfo.clipId, AbstractClipJob::PROXYJOB);
- }
- if (useProxy() && generateProxy() && clip->getProperty("proxy") == "-") {
- item->setConditionalJobStatus(NoJob, AbstractClipJob::PROXYJOB);
- discardJobs(clipInfo.clipId, AbstractClipJob::PROXYJOB);
- }
- else if (useProxy() && !item->hasProxy() && !hasPendingJob(item, AbstractClipJob::PROXYJOB)) {
- // proxy video and image clips
- int maxSize;
- ClipType t = item->clipType();
- if (t == Image) maxSize = m_doc->getDocumentProperty("proxyimageminsize").toInt();
- else maxSize = m_doc->getDocumentProperty("proxyminsize").toInt();
- if ((((t == AV || t == Video || t == Playlist) && generateProxy()) || (t == Image && generateImageProxy())) && (size.section('x', 0, 0).toInt() > maxSize || size.section('x', 1, 1).toInt() > maxSize)) {
- if (clip->getProperty("proxy").isEmpty()) {
- QDir folder(m_doc->projectFolder().path());
- folder.cd("proxy");
- QMap <QString, QString> newProps;
- // insert required duration for proxy
- if (t != Image) newProps.insert("proxy_out", clip->producerProperty("out"));
- newProps.insert("proxy", folder.absoluteFilePath(clip->getClipHash() + '.' + (t == Image ? "png" : m_doc->getDocumentProperty("proxyextension"))));
- QMap <QString, QString> oldProps = clip->properties();
- oldProps.insert("proxy", QString());
- //TODO
- /*EditClipCommand *command = new EditClipCommand(this, clipInfo.clipId, oldProps, newProps, true);
- m_doc->commandStack()->push(command);*/
- }
- }
- }
-
- if (!clipInfo.replaceProducer && m_allClipsProcessed && !item->hasPixmap()) {
- getCachedThumbnail(item);
- }
- if (!toReload.isEmpty())
- item->slotSetToolTip();
- } else {
- //qDebug() << "//////// COULD NOT FIND CLIP TO UPDATE PRPS...";
- m_render->slotProcessingDone(clipInfo.clipId);
- }
- int queue = m_render->processingItems();
- if (queue == 0) {
- monitorItemEditing(true);
- if (item && m_thumbnailQueue.isEmpty()) {
- if (!item->hasProxy() || m_render->activeClipId() == item->clipId()) {
- emit requestClipSelect(clipInfo.clipId);
- }
- if (item->parent()) {
- if (item->parent()->type() == ProjectFoldeType)
- static_cast <FolderProjectItem *>(item->parent())->switchIcon();
- } 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
- emit firstClip(item);
- }
- } else {
- //TODO
- /*
- int max = m_doc->clipManager()->clipsCount();
- if (max > 0)
- emit displayMessage(i18n("Loading clips"), (int)(100 *(max - queue) / max));
- */
- }
-
- if (m_allClipsProcessed)
- emit processNextThumbnail();
- }
- if (!item) {
- // no item for producer, delete it
- // TODO: remove from bin's playlist
- //delete producer;
- return;
- }
- if (clipInfo.replaceProducer) toReload = clipInfo.clipId;
- if (!toReload.isEmpty()) {
- emit clipNeedsReload(toReload);
- }
-}
-
bool ProjectList::adjustProjectProfileToItem(ProjectItem *item)
{
if (item == NULL) {
@@ -2037,32 +1830,6 @@ bool ProjectList::generateImageProxy() const
return m_doc->getDocumentProperty("generateimageproxy").toInt();
}
-void ProjectList::slotReplyGetImage(const QString &clipId, const QImage &img)
-{
- ProjectItem *item = getItemById(clipId);
- if (item && !img.isNull()) {
- QPixmap pix = roundedPixmap(img);
- processThumbOverlays(item, pix);
- monitorItemEditing(false);
- item->setPixmap(pix);
- monitorItemEditing(true);
- QString hash = item->getClipHash();
- if (!hash.isEmpty()) m_doc->cacheImage(hash, img);
- }
-}
-
-void ProjectList::slotReplyGetImage(const QString &clipId, const QString &name, int width, int height)
-{
- // For clips that have a generic icon (like audio clips...)
- ProjectItem *item = getItemById(clipId);
- QPixmap pix = QIcon::fromTheme(name).pixmap(QSize(width, height));
- if (item && !pix.isNull()) {
- monitorItemEditing(false);
- item->setData(0, Qt::DecorationRole, pix);
- monitorItemEditing(true);
- }
-}
-
QTreeWidgetItem *ProjectList::getAnyItemById(const QString &id)
{
QTreeWidgetItemIterator it(m_listView);
@@ -2116,19 +1883,6 @@ ProjectItem *ProjectList::getItemById(const QString &id)
return NULL;
}
-FolderProjectItem *ProjectList::getFolderItemByName(const QString &name)
-{
- FolderProjectItem *item = NULL;
- QList <QTreeWidgetItem *> hits = m_listView->findItems(name, Qt::MatchExactly, 0);
- for (int i = 0; i < hits.count(); ++i) {
- if (hits.at(i)->type() == ProjectFoldeType) {
- item = static_cast<FolderProjectItem *>(hits.at(i));
- break;
- }
- }
- return item;
-}
-
FolderProjectItem *ProjectList::getFolderItemById(const QString &id)
{
FolderProjectItem *item;
@@ -2144,58 +1898,6 @@ FolderProjectItem *ProjectList::getFolderItemById(const QString &id)
return NULL;
}
-void ProjectList::slotSelectClip(const QString &ix)
-{
- ProjectItem *clip = getItemById(ix);
- if (clip) {
- m_listView->setCurrentItem(clip);
- m_listView->scrollToItem(clip);
- m_editButton->defaultAction()->setEnabled(true);
- m_deleteButton->defaultAction()->setEnabled(true);
- m_reloadAction->setEnabled(true);
- m_extractAudioAction->setEnabled(true);
- m_transcodeAction->setEnabled(true);
- m_clipsActionsMenu->setEnabled(true);
- if (clip->clipType() == Image && !KdenliveSettings::defaultimageapp().isEmpty()) {
- m_openAction->setIcon(QIcon::fromTheme(KdenliveSettings::defaultimageapp()));
- m_openAction->setEnabled(true);
- } else if (clip->clipType() == Audio && !KdenliveSettings::defaultaudioapp().isEmpty()) {
- m_openAction->setIcon(QIcon::fromTheme(KdenliveSettings::defaultaudioapp()));
- m_openAction->setEnabled(true);
- } else {
- m_openAction->setEnabled(false);
- }
- }
-}
-
-QMap <QString, QString> ProjectList::getConditionalIds(const QString &condition) const
-{
- QMap <QString, QString> result;
- ProjectItem *item;
- QList<QTreeWidgetItem *> list = m_listView->selectedItems();
- for (int i = 0; i < list.count(); ++i) {
- if (list.at(i)->type() == ProjectFoldeType)
- continue;
- if (list.at(i)->type() == ProjectSubclipType) {
- // subitem
- item = static_cast <ProjectItem*>(list.at(i)->parent());
- } else {
- item = static_cast <ProjectItem*>(list.at(i));
- }
- if (item == NULL || item->type() == Color || item->type() == SlideShow || item->type() == Text)
- continue;
- DocClipBase *clip = item->referencedClip();
- if (!condition.isEmpty()) {
- if (condition.startsWith(QLatin1String("vcodec")) && !clip->hasVideoCodec(condition.section('=', 1, 1)))
- continue;
- else if (condition.startsWith(QLatin1String("acodec")) && !clip->hasAudioCodec(condition.section('=', 1, 1)))
- continue;
- }
- result.insert(item->clipId(), item->clipUrl().path());
- }
- return result;
-}
-
void ProjectList::regenerateTemplate(const QString &id)
{
ProjectItem *clip = getItemById(id);
@@ -2209,30 +1911,6 @@ void ProjectList::regenerateTemplate(ProjectItem *clip)
clip->referencedClip()->getProducer()->set("force_reload", 1);
}
-QDomDocument ProjectList::generateTemplateXml(QString path, const QString &replaceString)
-{
- QDomDocument doc;
- QFile file(path);
- if (!file.open(QIODevice::ReadOnly)) {
- qWarning() << "ERROR, CANNOT READ: " << path;
- return doc;
- }
- if (!doc.setContent(&file)) {
- qWarning() << "ERROR, CANNOT READ: " << path;
- file.close();
- return doc;
- }
- file.close();
- QDomNodeList texts = doc.elementsByTagName("content");
- for (int i = 0; i < texts.count(); ++i) {
- QString data = texts.item(i).firstChild().nodeValue();
- data.replace("%s", replaceString);
- texts.item(i).firstChild().setNodeValue(data);
- }
- return doc;
-}
-
-
void ProjectList::slotAddClipCut(const QString &id, int in, int out)
{
ProjectItem *clip = getItemById(id);
@@ -2321,11 +1999,6 @@ void ProjectList::doUpdateClipCut(const QString &id, const QPoint &oldzone, cons
emit projectModified();
}
-void ProjectList::slotForceProcessing(const QString &id)
-{
- m_render->forceProcessing(id);
-}
-
void ProjectList::slotAddOrUpdateSequence(const QString &frameName)
{
QString fileName = QUrl(frameName).fileName().section('_', 0, -2);
@@ -2423,80 +2096,6 @@ void ProjectList::slotCreateProxy(const QString &id)
slotCheckJobProcess();
}
-void ProjectList::slotCutClipJob(const QString &id, QPoint zone)
-{
- ProjectItem *item = getItemById(id);
- if (!item|| item->referencedClip()->isPlaceHolder()) return;
- QString source = item->clipUrl().path();
- QString ext = source.section('.', -1);
- QString dest = source.section('.', 0, -2) + '_' + QString::number(zone.x()) + '.' + ext;
-
- double clipFps = item->referencedClip()->getProperty("fps").toDouble();
- if (clipFps == 0) clipFps = m_fps;
- // if clip and project have different frame rate, adjust in and out
- int in = zone.x();
- int out = zone.y();
- in = GenTime(in, m_timecode.fps()).frames(clipFps);
- out = GenTime(out, m_timecode.fps()).frames(clipFps);
- int max = GenTime(item->clipMaxDuration(), m_timecode.fps()).frames(clipFps);
- int duration = out - in + 1;
- QString timeIn = Timecode::getStringTimecode(in, clipFps, true);
- QString timeOut = Timecode::getStringTimecode(duration, clipFps, true);
-
- QPointer<QDialog> d = new QDialog(this);
- Ui::CutJobDialog_UI ui;
- ui.setupUi(d);
- ui.extra_params->setVisible(false);
- ui.add_clip->setChecked(KdenliveSettings::add_new_clip());
- ui.file_url->setMode(KFile::File);
- ui.extra_params->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5);
- ui.file_url->setUrl(QUrl(dest));
- ui.button_more->setIcon(QIcon::fromTheme("configure"));
- ui.extra_params->setPlainText("-acodec copy -vcodec copy");
- QString mess = i18n("Extracting %1 out of %2", timeOut, Timecode::getStringTimecode(max, clipFps, true));
- ui.info_label->setText(mess);
- if (d->exec() != QDialog::Accepted) {
- delete d;
- return;
- }
- dest = ui.file_url->url().path();
- bool acceptPath = dest != source;
- if (acceptPath && QFileInfo(dest).size() > 0) {
- // destination file olready exists, overwrite?
- acceptPath = false;
- }
- while (!acceptPath) {
- // Do not allow to save over original clip
- if (dest == source) ui.info_label->setText("<b>" + i18n("You cannot overwrite original clip.") + "</b><br>" + mess);
- else if (KMessageBox::questionYesNo(this, i18n("Overwrite file %1", dest)) == KMessageBox::Yes) break;
- if (d->exec() != QDialog::Accepted) {
- delete d;
- return;
- }
- dest = ui.file_url->url().path();
- acceptPath = dest != source;
- if (acceptPath && QFileInfo(dest).size() > 0) {
- acceptPath = false;
- }
- }
- QString extraParams = ui.extra_params->toPlainText().simplified();
- KdenliveSettings::setAdd_new_clip(ui.add_clip->isChecked());
- delete d;
-
- QStringList jobParams;
- jobParams << dest << item->clipUrl().path() << timeIn << timeOut << QString::number(duration) << QString::number(KdenliveSettings::add_new_clip());
- if (!extraParams.isEmpty()) jobParams << extraParams;
- CutClipJob *job = new CutClipJob(item->clipType(), id, jobParams);
- if (job->isExclusive() && hasPendingJob(item, job->jobType)) {
- delete job;
- return;
- }
- m_jobList.append(job);
- setJobStatus(item, job->jobType, JobWaiting, 0, job->statusMessage());
-
- slotCheckJobProcess();
-}
-
void ProjectList::slotCheckJobProcess()
{
if (!m_jobThreads.futures().isEmpty()) {
@@ -2527,17 +2126,6 @@ void ProjectList::slotCheckJobProcess()
if (m_jobThreads.futures().isEmpty() || m_jobThreads.futures().count() < KdenliveSettings::proxythreads()) m_jobThreads.addFuture(QtConcurrent::run(this, &ProjectList::slotProcessJobs));
}
-void ProjectList::slotAbortProxy(const QString &id, const QString &path)
-{
- Q_UNUSED(path)
-
- ProjectItem *item = getItemById(id);
- if (!item) return;
- if (!item->isProxyRunning()) slotGotProxy(item);
- item->setConditionalJobStatus(NoJob, AbstractClipJob::PROXYJOB);
- discardJobs(id, AbstractClipJob::PROXYJOB);
-}
-
void ProjectList::slotProcessJobs()
{
/*
@@ -3059,11 +2647,6 @@ void ProjectList::updatePalette()
}
-void ProjectList::slotClosePopup()
-{
- m_errorLog.clear();
-}
-
void ProjectList::slotGotFilterJobResults(QString id, int , int , stringMap results, stringMap filterInfo)
{
// Currently, only the first value of results is used
diff --git a/src/project/projectlist.h b/src/project/projectlist.h
index 694e511..09d4c6d 100644
--- a/src/project/projectlist.h
+++ b/src/project/projectlist.h
@@ -114,24 +114,15 @@ public:
virtual ~ProjectList();
BinController *binController();
- void setRenderer(Render *projectRender);
void slotUpdateClipProperties(const QString &id, QMap <QString, QString> properties);
- QByteArray headerInfo() const;
- void setHeaderInfo(const QByteArray &state);
void updateProjectFormat(Timecode t);
- /** @brief Get a list of selected clip Id's and url's that match a condition. */
- QMap <QString, QString> getConditionalIds(const QString &condition) const;
- QDomDocument generateTemplateXml(QString data, const QString &replaceString);
void cleanup();
void trashUnusedClips();
void addClipCut(const QString &id, int in, int out, const QString desc, bool newItem);
void removeClipCut(const QString &id, int in, int out);
- void focusTree() const;
SubProjectItem *getSubItem(ProjectItem *clip, const QPoint &zone);
void doUpdateClipCut(const QString &id, const QPoint &oldzone, const QPoint &zone, const QString &comment);
bool hasMissingClips();
- void deleteProjectFolder(QMap <QString, QString> map);
- void selectItemById(const QString &clipId);
/** @brief Returns a string list of all supported mime extensions. */
static QStringList getExtensions();
@@ -162,16 +153,12 @@ public:
public slots:
void updateAllClips(bool displayRatioChanged, bool fpsChanged, const QStringList &brokenClips);
- void slotReplyGetImage(const QString &clipId, const QImage &img);
- void slotReplyGetImage(const QString &clipId, const QString &name, int width, int height);
- void slotReplyGetFileProperties(requestClipInfo &clipInfo, Mlt::Producer &producer, const stringMap &properties, const stringMap &metadata);
void slotDeleteClip(const QString &clipId);
void slotUpdateClip(const QString &id);
void slotRefreshClipThumbnail(const QString &clipId, bool update = true);
void slotRefreshClipThumbnail(QTreeWidgetItem *item, bool update = true);
void slotRemoveInvalidClip(const QString &id, bool replace);
void slotRemoveInvalidProxy(const QString &id, bool durationError);
- void slotSelectClip(const QString &ix);
/** @brief Prepares removing the selected items. */
void slotRemoveClip();
@@ -180,18 +167,14 @@ public slots:
*
* This is triggered by AddFolderCommand and EditFolderCommand. */
void slotAddFolder(const QString &foldername, const QString &clipId, bool remove, bool edit = false);
- void slotResetProjectList();
void slotOpenClip();
void slotEditClip();
void slotReloadClip(const QString &id = QString());
void regenerateTemplate(const QString &id);
void slotUpdateClipCut(QPoint p);
void slotAddClipCut(const QString &id, int in, int out);
- void slotForceProcessing(const QString &id);
/** @brief Remove all instances of a proxy and delete the file. */
void slotDeleteProxy(const QString proxyPath);
- /** @brief Start a hard cut clip job. */
- void slotCutClipJob(const QString &id, QPoint zone);
void slotSetThumbnail(const QString &id, int framePos, QImage img);
@@ -206,7 +189,6 @@ private:
ProjectItem *getItemById(const QString &id);
QTreeWidgetItem *getAnyItemById(const QString &id);
FolderProjectItem *getFolderItemById(const QString &id);
- FolderProjectItem *getFolderItemByName(const QString &name);
QAction *m_openAction;
QAction *m_reloadAction;
QAction *m_discardCurrentClipJobs;
@@ -297,7 +279,6 @@ private:
private slots:
void slotClipSelected();
- void slotAddTitleTemplateClip();
/** @brief Shows the context menu after enabling and disabling actions based on the item's type.
* @param pos The position where the menu should pop up
@@ -328,8 +309,6 @@ private slots:
void slotProxyCurrentItem(bool doProxy, ProjectItem *itemToProxy = NULL);
/** @brief Put clip in the proxy waiting list. */
void slotCreateProxy(const QString &id);
- /** @brief Stop creation of this clip's proxy. */
- void slotAbortProxy(const QString &id, const QString& path);
/** @brief Start creation of clip jobs. */
void slotProcessJobs();
/** @brief Discard running and pending clip jobs. */
@@ -353,8 +332,6 @@ private slots:
void slotDiscardClipJobs();
/** @brief Make sure current clip is visible in project tree. */
void slotCheckScrolling();
- /** @brief close warning info passive popup. */
- void slotClosePopup();
/** @brief process clip job result. */
void slotGotFilterJobResults(QString ,int , int, stringMap, stringMap);
/** @brief Select clip in project list from its id. */
diff --git a/src/project/projectlistview.cpp b/src/project/projectlistview.cpp
index c302736..254a3da 100644
--- a/src/project/projectlistview.cpp
+++ b/src/project/projectlistview.cpp
@@ -99,11 +99,6 @@ void ProjectListView::updateStyleSheet()
setStyleSheet(style);
}
-void ProjectListView::processLayout()
-{
- executeDelayedItemsLayout();
-}
-
void ProjectListView::configureColumns(const QPoint& pos)
{
QMenu popup(this);
diff --git a/src/project/projectlistview.h b/src/project/projectlistview.h
index 4619e89..33a548e 100644
--- a/src/project/projectlistview.h
+++ b/src/project/projectlistview.h
@@ -55,7 +55,6 @@ class ProjectListView : public QTreeWidget
public:
explicit ProjectListView(QWidget *parent = 0);
~ProjectListView();
- void processLayout();
void updateStyleSheet();
protected:
diff --git a/src/renderer.cpp b/src/renderer.cpp
index 3cb819d..df9bed0 100644
--- a/src/renderer.cpp
+++ b/src/renderer.cpp
@@ -54,17 +54,6 @@
#define SEEK_INACTIVE (-1)
-static void kdenlive_callback(void* /*ptr*/, int level, const char* fmt, va_list vl)
-{
- if (level > MLT_LOG_ERROR) return;
- ////qDebug() << "log level" << level << QString().vsprintf(fmt, vl).simplified();
- QString error;
- QApplication::postEvent(qApp->activeWindow(), new MltErrorEvent(error.vsprintf(fmt, vl).simplified()));
- va_end(vl);
-}
-
-
-
Render::Render(Kdenlive::MonitorId rendererName, BinController *binController, GLWidget *qmlView, QWidget *parent) :
AbstractRender(rendererName, parent),
requestedSeekPosition(SEEK_INACTIVE),
@@ -133,111 +122,6 @@ void Render::slotSwitchFullscreen()
m_mltConsumer->set("full_screen", 1);
}
-/*void Render::buildConsumer()
-{
- delete m_blackClip;
- m_blackClip = NULL;
- m_blackClip = new Mlt::Producer(*m_mltProfile, "colour:black");
- m_blackClip->set("id", "black");
- m_blackClip->set("mlt_type", "producer");
- if (KdenliveSettings::external_display() && m_name != Kdenlive::ClipMonitor && m_winid != 0) {
- // Use blackmagic card for video output
- int device = KdenliveSettings::blackmagic_output_device();
- if (device >= 0) {
- QString decklink = "decklink:" + QString::number(KdenliveSettings::blackmagic_output_device());
- if (!m_mltConsumer) {
- m_mltConsumer = new Mlt::Consumer(*m_mltProfile, decklink.toUtf8().constData());
- m_showFrameEvent = m_mltConsumer->listen("consumer-frame-show", this, (mlt_listener) consumer_frame_show);
- mlt_log_set_callback(kdenlive_callback);
- }
- if (m_mltConsumer->is_valid()) {
- externalConsumer = true;
- m_mltConsumer->set("terminate_on_pause", 0);
- m_mltConsumer->set("deinterlace_method", KdenliveSettings::mltdeinterlacer().toUtf8().constData());
- m_mltConsumer->set("rescale", KdenliveSettings::mltinterpolation().toUtf8().constData());
- m_mltConsumer->set("buffer", "1");
- m_mltConsumer->set("real_time", KdenliveSettings::mltthreads());
- }
- if (m_mltConsumer && m_mltConsumer->is_valid()) {
- return;
- }
- KMessageBox::information(qApp->activeWindow(), i18n("Your project's profile %1 is not compatible with the blackmagic output card. Please see supported profiles below. Switching to normal video display.", m_mltProfile->description()));
- }
- }
- externalConsumer = false;
- QString videoDriver = KdenliveSettings::videodrivername();
- if (!videoDriver.isEmpty()) {
- if (videoDriver == "x11_noaccel") {
- qputenv("SDL_VIDEO_YUV_HWACCEL", "0");
- videoDriver = "x11";
- } else {
- qunsetenv("SDL_VIDEO_YUV_HWACCEL");
- }
- }
- qputenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1");
-
- //m_mltConsumer->set("fullscreen", 1);
- if (m_winid == 0) {
- // OpenGL monitor
- if (!m_mltConsumer) {
- if (KdenliveSettings::external_display() && m_name != Kdenlive::ClipMonitor) {
- int device = KdenliveSettings::blackmagic_output_device();
- if (device >= 0) {
- QString decklink = "decklink:" + QString::number(KdenliveSettings::blackmagic_output_device());
- m_mltConsumer = new Mlt::Consumer(*m_mltProfile, decklink.toUtf8().constData());
- // Set defaults for decklink consumer
- if (m_mltConsumer) {
- m_mltConsumer->set("terminate_on_pause", 0);
- m_mltConsumer->set("deinterlace_method", KdenliveSettings::mltdeinterlacer().toUtf8().constData());
- externalConsumer = true;
- }
- }
- }
- if (!m_mltConsumer || !m_mltConsumer->is_valid()) {
- m_mltConsumer = new Mlt::Consumer(*m_mltProfile, "sdl_audio");
- m_mltConsumer->set("scrub_audio", 1);
- m_mltConsumer->set("preview_off", 1);
- m_mltConsumer->set("audio_buffer", 512);
- m_mltConsumer->set("preview_format", mlt_image_rgb24a);
- }
- m_mltConsumer->set("buffer", "1");
- m_showFrameEvent = m_mltConsumer->listen("consumer-frame-show", this, (mlt_listener) consumer_gl_frame_show);
- }
- } else {
- if (!m_mltConsumer) {
- m_mltConsumer = new Mlt::Consumer(*m_mltProfile, "sdl_preview");
- m_showFrameEvent = m_mltConsumer->listen("consumer-frame-show", this, (mlt_listener) consumer_frame_show);
- //m_pauseEvent = m_mltConsumer->listen("consumer-sdl-paused", this, (mlt_listener) consumer_paused);
- m_mltConsumer->set("progressive", 1);
- }
- m_mltConsumer->set("window_id", m_winid);
- }
- //m_mltConsumer->set("resize", 1);
- m_mltConsumer->set("window_background", KdenliveSettings::window_background().name().toUtf8().constData());
- m_mltConsumer->set("rescale", KdenliveSettings::mltinterpolation().toUtf8().constData());
- mlt_log_set_callback(kdenlive_callback);
-
- QString audioDevice = KdenliveSettings::audiodevicename();
- if (!audioDevice.isEmpty())
- m_mltConsumer->set("audio_device", audioDevice.toUtf8().constData());
-
- if (!videoDriver.isEmpty())
- m_mltConsumer->set("video_driver", videoDriver.toUtf8().constData());
-
- QString audioDriver = KdenliveSettings::audiodrivername();
-
- // Disabled because the "auto" detected driver was sometimes wrong
- //if (audioDriver.isEmpty())
- // audioDriver = KdenliveSettings::autoaudiodrivername();
-
-
- if (!audioDriver.isEmpty())
- m_mltConsumer->set("audio_driver", audioDriver.toUtf8().constData());
-
- m_mltConsumer->set("frequency", 48000);
- m_mltConsumer->set("real_time", KdenliveSettings::mltthreads());
-}*/
-
Mlt::Producer *Render::invalidProducer(const QString &id)
{
Mlt::Producer *clip;
@@ -1138,12 +1022,6 @@ void Render::loadUrl(const QString &url)
setProducer(producer, 0, true);
}
-int Render::setMonitorProducer(const QString &id, int position)
-{
- Mlt::Producer *prod = m_binController->getBinProducer(id);
- return setProducer(prod, position, true);
-}
-
int Render::updateProducer(Mlt::Producer *producer)
{
if (m_mltProducer) {
@@ -1377,96 +1255,6 @@ int Render::setSceneList(QString playlist, int position)
return error;
}
-
-int Render::reloadSceneList(QString playlist, int position)
-{
- requestedSeekPosition = SEEK_INACTIVE;
- m_refreshTimer.stop();
- QMutexLocker locker(&m_mutex);
- //if (m_winid == -1) return -1;
- int error = 0;
-
- //qDebug() << "////// RENDER, SET SCENE LIST:\n" << playlist <<"\n..........:::.";
-
- // Remove previous profile info
- /*QDomDocument doc;
- doc.setContent(playlist);
- QDomElement profile = doc.documentElement().firstChildElement("profile");
- doc.documentElement().removeChild(profile);
- playlist = doc.toString();*/
-
- if (m_mltConsumer) {
- if (!m_mltConsumer->is_stopped()) {
- m_mltConsumer->stop();
- }
- } else {
- qWarning() << "/////// ERROR, TRYING TO USE NULL MLT CONSUMER";
- error = -1;
- }
- m_requestList.clear();
- m_infoThread.waitForFinished();
-
- if (m_mltProducer) {
- m_mltProducer->set_speed(0);
- qDeleteAll(m_slowmotionProducers.values());
- m_slowmotionProducers.clear();
-
- delete m_mltProducer;
- m_mltProducer = NULL;
- emit stopped();
- }
- blockSignals(true);
- m_mltProducer = new Mlt::Producer(*m_qmlView->profile(), "xml-string", playlist.toUtf8().constData());
- if (!m_mltProducer || !m_mltProducer->is_valid()) {
- qDebug() << " WARNING - - - - -INVALID PLAYLIST: " << playlist.toUtf8().constData();
- m_mltProducer = m_blackClip->cut(0, 1);
- error = -1;
- }
- m_mltProducer->set("eof", "pause");
- checkMaxThreads();
- m_mltProducer->optimise();
-
- m_fps = m_mltProducer->get_fps();
- if (position != 0) {
- // Seek to correct place after opening project.
- m_mltProducer->seek(position);
- }
-
- // Fill Bin's playlist
- Mlt::Service service(m_mltProducer->parent().get_service());
- if (service.type() != tractor_type) {
- qWarning() << "// TRACTOR PROBLEM";
- }
- blockSignals(false);
- Mlt::Tractor tractor(service);
- Mlt::Properties retainList((mlt_properties) tractor.get_data("xml_retain"));
- if (retainList.is_valid() && retainList.get_data(m_binController->binPlaylistId().toUtf8().constData())) {
- Mlt::Playlist playlist((mlt_playlist) retainList.get_data(m_binController->binPlaylistId().toUtf8().constData()));
- if (playlist.is_valid() && playlist.type() == playlist_type) {
- // Load bin clips
- ProfileInfo info;
- info.profileSize = QSize(frameRenderWidth(), renderHeight());
- info.profileFps = m_fps;
- m_binController->initializeBin(playlist, info);
- }
- }
- // No Playlist found, create new one
- m_binController->createIfNeeded(m_qmlView->profile());
- QString retain = QString("xml_retain %1").arg(m_binController->binPlaylistId());
- tractor.set(retain.toUtf8().constData(), m_binController->service(), 0);
- //if (!m_binController->hasClip("black")) m_binController->addClipToBin("black", *m_blackClip);
-
- //qDebug() << "// NEW SCENE LIST DURATION SET TO: " << m_mltProducer->get_playtime();
- m_mltConsumer->connect(*m_mltProducer);
- m_mltProducer->set_speed(0);
- fillSlowMotionProducers();
- emit durationChanged(m_mltProducer->get_playtime());
-
- return error;
- ////qDebug()<<"// SETSCN LST, POS: "<<position;
- //if (position != 0) emit rendererPosition(position);
-}
-
void Render::checkMaxThreads()
{
// Make sure we don't use too much threads, MLT avformat does not cope with too much threads
@@ -1914,16 +1702,6 @@ void Render::slotCheckSeeking()
}
}
-void Render::disablePreview(bool disable)
-{
- if (m_mltConsumer) {
- m_mltConsumer->stop();
- m_mltConsumer->set("preview_off", (int) disable);
- m_mltConsumer->set("refresh", 0);
- m_mltConsumer->start();
- }
-}
-
void Render::showAudio(Mlt::Frame& frame)
{
if (!frame.is_valid() || frame.get_int("test_audio") != 0) {
@@ -2009,78 +1787,6 @@ void Render::mltCheckLength(Mlt::Tractor *tractor)
}
}
-
-int Render::mltInsertClip(ItemInfo info, const QString &clipId, bool overwrite, bool push)
-{
- m_refreshTimer.stop();
- if (m_mltProducer == NULL) {
- //qDebug() << "PLAYLIST NOT INITIALISED //////";
- return -1;
- }
-
- Mlt::Producer parentProd(m_mltProducer->parent());
- if (parentProd.get_producer() == NULL) {
- //qDebug() << "PLAYLIST BROKEN, CANNOT INSERT CLIP //////";
- return -1;
- }
-
- Mlt::Service service(parentProd.get_service());
- if (service.type() != tractor_type) {
- qWarning() << "// TRACTOR PROBLEM";
- return -1;
- }
- Mlt::Tractor tractor(service);
- if (info.track > tractor.count() - 1) {
- //qDebug() << "ERROR TRYING TO INSERT CLIP ON TRACK " << info.track << ", at POS: " << info.startPos.frames(25);
- return -1;
- }
- service.lock();
- Mlt::Producer trackProducer(tractor.track(info.track));
- int trackDuration = trackProducer.get_playtime() - 1;
- Mlt::Playlist trackPlaylist((mlt_playlist) trackProducer.get_service());
- Mlt::Producer *prod = getProducerForTrack(trackPlaylist, clipId);
- if (prod == NULL) {
- qDebug() << "Cannot insert clip without producer //////";
- service.unlock();
- return -1;
- }
-
- //qDebug()<<"/// INSERT cLIP: "<<prod->get("id")<<" : "<< info.cropStart.frames(m_fps)<<", "<<info.startPos.frames(m_fps)<<"-"<<info.endPos.frames(m_fps);
- //TODO: create new producer if speed effect is applied
- /*prod = checkSlowMotionProducer(prod, element);
- if (prod == NULL || !prod->is_valid()) {
- service.unlock();
- return -1;
- }*/
-
- int cutPos = (int) info.cropStart.frames(m_fps);
- if (cutPos < 0) cutPos = 0;
- int insertPos = (int) info.startPos.frames(m_fps);
- int cutDuration = (int)(info.endPos - info.startPos).frames(m_fps) - 1;
- Mlt::Producer *clip = prod->cut(cutPos, cutDuration + cutPos);
- if (overwrite && (insertPos < trackDuration)) {
- // Replace zone with blanks
- //trackPlaylist.split_at(insertPos, true);
- trackPlaylist.remove_region(insertPos, cutDuration + 1);
- int clipIndex = trackPlaylist.get_clip_index_at(insertPos);
- trackPlaylist.insert_blank(clipIndex, cutDuration);
- } else if (push) {
- trackPlaylist.split_at(insertPos, true);
- int clipIndex = trackPlaylist.get_clip_index_at(insertPos);
- trackPlaylist.insert_blank(clipIndex, cutDuration);
- }
- trackPlaylist.consolidate_blanks(0);
- int newIndex = trackPlaylist.insert_at(insertPos, clip, 1);
- delete clip;
- delete prod;
-
- if (info.track != 0 && (newIndex + 1 == trackPlaylist.count())) mltCheckLength(&tractor);
- service.unlock();
- /*tractor.multitrack()->refresh();
- tractor.refresh();*/
- return 0;
-}
-
Mlt::Producer *Render::getTrackProducer(const QString &id, int track, bool audioOnly, bool videoOnly)
{
Mlt::Service service(m_mltProducer->parent().get_service());
@@ -3866,104 +3572,6 @@ void Render::mltDeleteTrack(int ix)
#endif
}
-QString Render::updateSceneListFps(double current_fps, double new_fps, const QString &scene)
-{
- // Update all frame positions to the new fps value
- //WARNING: there are probably some effects or other that hold a frame value
- // as parameter and will also need to be updated here!
- QDomDocument doc;
- doc.setContent(scene);
-
- double factor = new_fps / current_fps;
- QDomNodeList producers = doc.elementsByTagName("producer");
- for (int i = 0; i < producers.count(); ++i) {
- QDomElement prod = producers.at(i).toElement();
- prod.removeAttribute("in");
- prod.removeAttribute("out");
-
- QDomNodeList props = prod.childNodes();
- for (int j = 0; j < props.count(); ++j) {
- QDomElement param = props.at(j).toElement();
- QString paramName = param.attribute("name");
- if (paramName.startsWith(QLatin1String("meta.")) || paramName == "length") {
- prod.removeChild(props.at(j));
- j--;
- }
- }
- }
-
- QDomNodeList entries = doc.elementsByTagName("entry");
- for (int i = 0; i < entries.count(); ++i) {
- QDomElement entry = entries.at(i).toElement();
- int in = entry.attribute("in").toInt();
- int out = entry.attribute("out").toInt();
- in = factor * in + 0.5;
- out = factor * out + 0.5;
- entry.setAttribute("in", in);
- entry.setAttribute("out", out);
- }
-
- QDomNodeList blanks = doc.elementsByTagName("blank");
- for (int i = 0; i < blanks.count(); ++i) {
- QDomElement blank = blanks.at(i).toElement();
- int length = blank.attribute("length").toInt();
- length = factor * length + 0.5;
- blank.setAttribute("length", QString::number(length));
- }
-
- QDomNodeList filters = doc.elementsByTagName("filter");
- for (int i = 0; i < filters.count(); ++i) {
- QDomElement filter = filters.at(i).toElement();
- int in = filter.attribute("in").toInt();
- int out = filter.attribute("out").toInt();
- in = factor * in + 0.5;
- out = factor * out + 0.5;
- filter.setAttribute("in", in);
- filter.setAttribute("out", out);
- }
-
- QDomNodeList transitions = doc.elementsByTagName("transition");
- for (int i = 0; i < transitions.count(); ++i) {
- QDomElement transition = transitions.at(i).toElement();
- int in = transition.attribute("in").toInt();
- int out = transition.attribute("out").toInt();
- in = factor * in + 0.5;
- out = factor * out + 0.5;
- transition.setAttribute("in", in);
- transition.setAttribute("out", out);
- QDomNodeList props = transition.childNodes();
- for (int j = 0; j < props.count(); ++j) {
- QDomElement param = props.at(j).toElement();
- QString paramName = param.attribute("name");
- if (paramName == "geometry") {
- QString geom = param.firstChild().nodeValue();
- QStringList keys = geom.split(';');
- QStringList newKeys;
- for (int k = 0; k < keys.size(); ++k) {
- if (keys.at(k).contains('=')) {
- int pos = keys.at(k).section('=', 0, 0).toInt();
- pos = factor * pos + 0.5;
- newKeys.append(QString::number(pos) + '=' + keys.at(k).section('=', 1));
- } else newKeys.append(keys.at(k));
- }
- param.firstChild().setNodeValue(newKeys.join(";"));
- }
- }
- }
- QDomElement root = doc.documentElement();
- if (!root.isNull()) {
- QDomElement tractor = root.firstChildElement("tractor");
- int out = tractor.attribute("out").toInt();
- out = factor * out + 0.5;
- tractor.setAttribute("out", out);
- emit durationChanged(out);
- }
-
- ////qDebug() << "///////////////////////////// " << out << " \n" << doc.toString() << "\n-------------------------";
- return doc.toString();
-}
-
-
void Render::sendFrameUpdate()
{
if (m_mltProducer) {
diff --git a/src/renderer.h b/src/renderer.h
index 0e3e579..5865f00 100644
--- a/src/renderer.h
+++ b/src/renderer.h
@@ -117,11 +117,6 @@ class Render: public AbstractRender
* @param list The xml describing the playlist
* @param position (optional) time to seek to */
int setSceneList(const QDomDocument &list, int position = 0);
-
- /** @brief Reloads the current project's scenlist from xml.
- * @param list The xml describing the playlist
- * @param position (optional) time to seek to */
- int reloadSceneList(QString playlist, int position);
/** @brief Sets the current MLT producer playlist.
* @param list new playlist
@@ -130,7 +125,6 @@ class Render: public AbstractRender
*
* Creates the producer from the text playlist. */
int setSceneList(QString playlist, int position = 0);
- int setMonitorProducer(const QString &id, int position);
int updateProducer(Mlt::Producer *producer);
int setProducer(Mlt::Producer *producer, int position, bool isActive);
@@ -203,7 +197,6 @@ class Render: public AbstractRender
*/
void mltCheckLength(Mlt::Tractor *tractor);
Mlt::Producer *getSlowmotionProducer(const QString &url);
- int mltInsertClip(ItemInfo info, const QString &clipId, bool overwrite = false, bool push = false);
void mltInsertSpace(QMap <int, int> trackClipStartList, QMap <int, int> trackTransitionStartList, int track, const GenTime &duration, const GenTime &timeOffset);
int mltGetSpaceLength(const GenTime &pos, int track, bool fromBlankStart);
@@ -268,7 +261,6 @@ class Render: public AbstractRender
void setDropFrames(bool show);
/** @brief Sets an MLT consumer property. */
void setConsumerProperty(const QString &name, const QString &value);
- QString updateSceneListFps(double current_fps, double new_fps, const QString &scene);
void showAudio(Mlt::Frame&);
@@ -293,8 +285,6 @@ class Render: public AbstractRender
/** @brief Fill a combobox with the found blackmagic devices */
static bool getBlackMagicDeviceList(KComboBox *devicelist, bool force = false);
static bool getBlackMagicOutputDeviceList(KComboBox *devicelist, bool force = false);
- /** @brief Frame rendering is handeled by Kdenlive, don't show video through SDL display */
- void disablePreview(bool disable);
/** @brief Get current seek pos requested of SEEK_INACTIVE if we are not currently seeking */
int requestedSeekPosition;
/** @brief Get current seek pos requested of current producer pos if not seeking */
diff --git a/src/statusbarmessagelabel.cpp b/src/statusbarmessagelabel.cpp
index 46e7c21..bf466e6 100644
--- a/src/statusbarmessagelabel.cpp
+++ b/src/statusbarmessagelabel.cpp
@@ -202,17 +202,6 @@ void StatusBarMessageLabel::confirmErrorMessage()
m_queueTimer.start(0);
}
-void StatusBarMessageLabel::setMinimumTextHeight(int min)
-{
- if (min != m_minTextHeight) {
- m_minTextHeight = min;
- setMinimumHeight(min);
- if (m_closeButton->height() > min) {
- m_closeButton->setFixedHeight(min);
- }
- }
-}
-
void StatusBarMessageLabel::paintEvent(QPaintEvent*)
{
QPainter painter(this);
diff --git a/src/statusbarmessagelabel.h b/src/statusbarmessagelabel.h
index a039c0d..ed7de8b 100644
--- a/src/statusbarmessagelabel.h
+++ b/src/statusbarmessagelabel.h
@@ -81,10 +81,6 @@ public:
explicit StatusBarMessageLabel(QWidget* parent);
virtual ~StatusBarMessageLabel();
- // TODO: maybe a better approach is possible with the size hint
- void setMinimumTextHeight(int min);
- int minimumTextHeight() const;
-
protected:
/** @see QWidget::paintEvent() */
void paintEvent(QPaintEvent* event);
@@ -146,10 +142,4 @@ private:
QPushButton* m_closeButton;
};
-inline int StatusBarMessageLabel::minimumTextHeight() const
-{
- return m_minTextHeight;
-}
-
-
#endif
diff --git a/src/stopmotion/stopmotion.cpp b/src/stopmotion/stopmotion.cpp
index 3bff0e2..370ff50 100644
--- a/src/stopmotion/stopmotion.cpp
+++ b/src/stopmotion/stopmotion.cpp
@@ -805,38 +805,6 @@ void StopmotionWidget::slotAnimate()
}
-QListWidgetItem* StopmotionWidget::getFrameFromIndex(int ix)
-{
- QListWidgetItem* item = NULL;
- int pos = ix;
- if (ix >= frame_list->count()) {
- pos = frame_list->count() - 1;
- }
- if (ix < 0) pos = 0;
- item = frame_list->item(pos);
-
- int value = item->data(Qt::UserRole).toInt();
- if (value == ix) return item;
- else if (value < ix) {
- pos++;
- while (pos < frame_list->count()) {
- item = frame_list->item(pos);
- value = item->data(Qt::UserRole).toInt();
- if (value == ix) return item;
- pos++;
- }
- } else {
- pos --;
- while (pos >= 0) {
- item = frame_list->item(pos);
- value = item->data(Qt::UserRole).toInt();
- if (value == ix) return item;
- pos --;
- }
- }
- return NULL;
-}
-
void StopmotionWidget::slotSeekFrame(bool forward)
{
int ix = frame_list->currentRow();
diff --git a/src/stopmotion/stopmotion.h b/src/stopmotion/stopmotion.h
index 0e5e7a3..e5395c0 100644
--- a/src/stopmotion/stopmotion.h
+++ b/src/stopmotion/stopmotion.h
@@ -129,9 +129,6 @@ private:
/** @brief Holds the state of the threaded thumbnail generation. */
QFuture<void> m_future;
- /** @brief Get the frame number ix. */
- QListWidgetItem* getFrameFromIndex(int ix);
-
/** @brief The action triggering display of last frame over current live video feed. */
QAction* m_showOverlay;
diff --git a/src/timeline/abstractclipitem.cpp b/src/timeline/abstractclipitem.cpp
index eb72818..c549673 100644
--- a/src/timeline/abstractclipitem.cpp
+++ b/src/timeline/abstractclipitem.cpp
@@ -232,11 +232,6 @@ GenTime AbstractClipItem::startPos() const
return m_info.startPos;
}
-void AbstractClipItem::setTrack(int track)
-{
- m_info.track = track;
-}
-
double AbstractClipItem::fps() const
{
return m_fps;
@@ -419,11 +414,6 @@ int AbstractClipItem::selectedKeyFramePos() const
return m_selectedKeyframe;
}
-double AbstractClipItem::selectedKeyFrameValue() const
-{
- return m_keyframes.value(m_selectedKeyframe);
-}
-
void AbstractClipItem::updateKeyFramePos(const GenTime &pos, const double value)
{
if (!m_keyframes.contains(m_editedKeyframe))
@@ -456,11 +446,6 @@ void AbstractClipItem::updateKeyFramePos(const GenTime &pos, const double value)
update();
}
-double AbstractClipItem::keyFrameFactor() const
-{
- return m_keyframeFactor;
-}
-
int AbstractClipItem::keyFrameNumber() const
{
return m_keyframes.count();
diff --git a/src/timeline/abstractclipitem.h b/src/timeline/abstractclipitem.h
index b5d4ed9..46d2231 100644
--- a/src/timeline/abstractclipitem.h
+++ b/src/timeline/abstractclipitem.h
@@ -61,9 +61,7 @@ public:
bool hasKeyFrames() const;
int editedKeyFramePos() const;
int selectedKeyFramePos() const;
- double selectedKeyFrameValue() const;
double editedKeyFrameValue() const;
- double keyFrameFactor() const;
/** @brief Returns the number of keyframes the selected effect has. */
int keyFrameNumber() const;
ItemInfo info() const;
@@ -76,7 +74,6 @@ public:
virtual OperationType operationMode(const QPointF &pos) = 0;
virtual GenTime startPos() const ;
- virtual void setTrack(int track);
virtual GenTime endPos() const ;
virtual int track() const ;
virtual GenTime cropStart() const ;
diff --git a/src/timeline/clipitem.cpp b/src/timeline/clipitem.cpp
index 453ae17..fb817a5 100644
--- a/src/timeline/clipitem.cpp
+++ b/src/timeline/clipitem.cpp
@@ -396,28 +396,6 @@ QStringList ClipItem::keyframes(const int index)
return result;
}
-void ClipItem::updateKeyframeEffect()
-{
- // regenerate xml parameter from the clip keyframes
- QDomElement effect = getEffectAtIndex(m_selectedEffect);
- if (effect.attribute("disable") == "1") return;
- QDomNodeList params = effect.elementsByTagName("parameter");
- QDomElement e = params.item(m_visibleParam).toElement();
-
- if (!e.isNull()) {
- QString keyframes;
- if (m_keyframes.count() > 0) {
- QMap<int, int>::const_iterator i = m_keyframes.constBegin();
- while (i != m_keyframes.constEnd()) {
- keyframes.append(QString::number(i.key()) + '=' + QString::number(i.value()) + ';');
- ++i;
- }
- }
- // Effect has a keyframe type parameter, we need to set the values
- e.setAttribute("keyframes", keyframes);
- }
-}
-
QDomElement ClipItem::selectedEffect()
{
if (m_selectedEffect == -1 || m_effectList.isEmpty())
diff --git a/src/timeline/clipitem.h b/src/timeline/clipitem.h
index 368ef21..5f0f7b9 100644
--- a/src/timeline/clipitem.h
+++ b/src/timeline/clipitem.h
@@ -132,7 +132,6 @@ public:
/** @brief Gets the position of the fade out effect. */
int fadeOut() const;
void setSelectedEffect(const int ix);
- void updateKeyframeEffect();
QDomElement selectedEffect();
int selectedEffectIndex() const;
void initEffect(ProfileInfo info, QDomElement effect, int diff = 0, int offset = 0);
diff --git a/src/timeline/customtrackview.cpp b/src/timeline/customtrackview.cpp
index 54956f4..eba0194 100644
--- a/src/timeline/customtrackview.cpp
+++ b/src/timeline/customtrackview.cpp
@@ -344,11 +344,6 @@ void CustomTrackView::wheelEvent(QWheelEvent * e)
}
}
-void CustomTrackView::setOperation(OperationType op)
-{
- m_operationMode = op;
-}
-
int CustomTrackView::getPreviousVideoTrack(int track)
{
int i = track + 1;
@@ -1463,7 +1458,6 @@ void CustomTrackView::mouseDoubleClickEvent(QMouseEvent *event)
}
//QString previous = item->keyframes(item->selectedEffectIndex());
item->insertKeyframe(item->getEffectAtIndex(item->selectedEffectIndex()), keyFramePos.frames(m_document->fps()), val);
- //item->updateKeyframeEffect();
//QString next = item->keyframes(item->selectedEffectIndex());
QDomElement newEffect = item->selectedEffect().cloneNode().toElement();
EditEffectCommand *command = new EditEffectCommand(this, m_timeline->tracksCount() - item->track(), item->startPos(), oldEffect, newEffect, item->selectedEffectIndex(), false, false);
@@ -2517,12 +2511,6 @@ ClipItem *CustomTrackView::cutClip(const ItemInfo &info, const GenTime &cutTime,
KdenliveSettings::setSnaptopoints(snap);
return item;
}
- //QTimer::singleShot(3000, this, SLOT(slotEnableRefresh()));
-}
-
-void CustomTrackView::slotEnableRefresh()
-{
- m_blockRefresh = false;
}
void CustomTrackView::slotAddTransitionToSelectedClips(QDomElement transition)
@@ -3524,11 +3512,6 @@ void CustomTrackView::setCursorPos(int pos)
//else emit updateRuler();
}
-void CustomTrackView::updateCursorPos()
-{
- m_cursorLine->setPos(m_cursorPos + 0.5, 0);
-}
-
int CustomTrackView::cursorPos() const
{
return m_cursorPos;
@@ -4512,13 +4495,6 @@ void CustomTrackView::addClip(const QString &clipId, ItemInfo info, EffectsList
//TODO: notify bin ?
//baseclip->addReference();
- //m_document->updateClip(baseclip->getId());
- //int producerTrack = info.track;
- //m_document->renderer()->mltInsertClip(info, xml, item->getProducer(producerTrack), overwrite, push);
- //m_document->renderer()->mltInsertClip(info /*, xml*/, clipId, overwrite, push);
- /*Mlt::Producer *prod = m_document->renderer()->getTrackProducer(item->getBinId(), info.track, item->isAudioOnly(), item->isVideoOnly());
- //prod = prod->cut(info.cropStart.frames(fps()), (info.cropStart + info.cropDuration).frames(fps()) - 1);
- prod->set_in_and_out(info.cropStart.frames(fps()), (info.cropStart + info.cropDuration).frames(fps()) - 1);*/
Mlt::Producer *prod;
if (item->clipState() == PlaylistState::VideoOnly) {
prod = m_document->renderer()->getBinVideoProducer(clipId);
@@ -4622,13 +4598,6 @@ ClipItem *CustomTrackView::getClipItemAtMiddlePoint(int pos, int track)
return clip;
}
-Transition *CustomTrackView::getTransitionItem(TransitionInfo info)
-{
- int pos = info.startPos.frames(m_document->fps());
- int track = m_timeline->tracksCount() - info.b_track;
- return getTransitionItemAt(pos, track);
-}
-
Transition *CustomTrackView::getTransitionItemAt(int pos, int track)
{
const QPointF p(pos, track * m_tracksHeight + Transition::itemOffset() + 1);
@@ -4825,11 +4794,6 @@ void CustomTrackView::moveGroup(QList<ItemInfo> startClip, QList<ItemInfo> start
if (item->type() == AVWidget) {
ClipItem *clip = static_cast <ClipItem*>(item);
- //m_document->renderer()->mltInsertClip(info /*, clip->xml()*/, clip->getBinId());
- /*Mlt::Producer *prod = m_document->renderer()->getTrackProducer(clip->getBinId(), info.track, clip->isAudioOnly(), clip->isVideoOnly());
- prod->set_in_and_out(info.cropStart.frames(fps()), (info.cropStart + info.cropDuration).frames(fps()) - 1);
- //prod = prod->cut(info.cropStart.frames(fps()), (info.cropStart + info.cropDuration).frames(fps()) - 1);
- m_timeline->track(info.track)->add(info.startPos.seconds(), prod, m_scene->editMode());*/
Mlt::Producer *prod;
if (clip->clipState() == PlaylistState::VideoOnly) {
prod = m_document->renderer()->getBinVideoProducer(clip->getBinId());
@@ -6871,18 +6835,6 @@ QStringList CustomTrackView::selectedClips() const
return clipIds;
}
-QList<ClipItem *> CustomTrackView::selectedClipItems() const
-{
- QList<ClipItem *> clips;
- QList<QGraphicsItem *> selection = m_scene->selectedItems();
- for (int i = 0; i < selection.count(); ++i) {
- if (selection.at(i)->type() == AVWidget) {
- clips.append(static_cast<ClipItem*>(selection.at(i)));
- }
- }
- return clips;
-}
-
void CustomTrackView::slotSelectTrack(int ix)
{
m_selectedTrack = qMax(0, ix);
diff --git a/src/timeline/customtrackview.h b/src/timeline/customtrackview.h
index 04abb26..525aaf6 100644
--- a/src/timeline/customtrackview.h
+++ b/src/timeline/customtrackview.h
@@ -168,7 +168,6 @@ public:
double fps() const;
int selectedTrack() const;
QStringList selectedClips() const;
- QList<ClipItem *> selectedClipItems() const;
/** @brief Checks whether an item can be inserted (make sure it does not overlap another item) */
bool canBePastedTo(ItemInfo info, int type) const;
@@ -221,8 +220,6 @@ public:
void resetSelectionGroup(bool selectItems = true);
/** @brief Returns all infos necessary to save guides. */
QMap <double, QString> guidesData() const;
- /** @brief We are performing a timeline operation. */
- void setOperation(OperationType op);
public slots:
/** @brief Send seek request to MLT. */
@@ -230,7 +227,6 @@ public slots:
/** @brief Move timeline cursor to new position. */
void setCursorPos(int pos);
void moveCursorPos(int delta);
- void updateCursorPos();
void slotDeleteEffect(ClipItem *clip, int track, QDomElement effect, bool affectGroup = true);
void slotChangeEffectState(ClipItem *clip, int track, QList <int> effectIndexes, bool disable);
void slotChangeEffectPosition(ClipItem *clip, int track, QList <int> currentPos, int newPos);
@@ -348,7 +344,6 @@ private:
ClipItem *getClipItemAtMiddlePoint(int pos, int track);
ClipItem *getClipItemAtEnd(GenTime pos, int track);
ClipItem *getClipItemAtStart(GenTime pos, int track);
- Transition *getTransitionItem(TransitionInfo info);
Transition *getTransitionItemAt(int pos, int track);
Transition *getTransitionItemAt(GenTime pos, int track);
Transition *getTransitionItemAtEnd(GenTime pos, int track);
@@ -482,7 +477,6 @@ private:
private slots:
void slotRefreshGuides();
- void slotEnableRefresh();
void slotCheckMouseScrolling();
void slotEditTimeLineGuide();
void slotDeleteTimeLineGuide();