Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
258
Issues
258
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
1ab17ea6
Commit
1ab17ea6
authored
May 04, 2018
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete unused clipmanager
parent
e8642c24
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
0 additions
and
355 deletions
+0
-355
src/bin/bin.cpp
src/bin/bin.cpp
+0
-1
src/doc/kdenlivedoc.cpp
src/doc/kdenlivedoc.cpp
+0
-10
src/doc/kdenlivedoc.h
src/doc/kdenlivedoc.h
+0
-3
src/mainwindow.cpp
src/mainwindow.cpp
+0
-1
src/project/CMakeLists.txt
src/project/CMakeLists.txt
+0
-1
src/project/clipmanager.cpp
src/project/clipmanager.cpp
+0
-218
src/project/clipmanager.h
src/project/clipmanager.h
+0
-121
No files found.
src/bin/bin.cpp
View file @
1ab17ea6
...
@@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
...
@@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "mltcontroller/clipcontroller.h"
#include "mltcontroller/clipcontroller.h"
#include "mltcontroller/clippropertiescontroller.h"
#include "mltcontroller/clippropertiescontroller.h"
#include "monitor/monitor.h"
#include "monitor/monitor.h"
#include "project/clipmanager.h"
#include "project/dialogs/slideshowclip.h"
#include "project/dialogs/slideshowclip.h"
#include "project/invaliddialog.h"
#include "project/invaliddialog.h"
#include "project/projectcommands.h"
#include "project/projectcommands.h"
...
...
src/doc/kdenlivedoc.cpp
View file @
1ab17ea6
...
@@ -37,7 +37,6 @@
...
@@ -37,7 +37,6 @@
#include "mltcontroller/effectscontroller.h"
#include "mltcontroller/effectscontroller.h"
#include "profiles/profilemodel.hpp"
#include "profiles/profilemodel.hpp"
#include "profiles/profilerepository.hpp"
#include "profiles/profilerepository.hpp"
#include "project/clipmanager.h"
#include "project/projectcommands.h"
#include "project/projectcommands.h"
#include "renderer.h"
#include "renderer.h"
#include "titler/titlewidget.h"
#include "titler/titlewidget.h"
...
@@ -86,9 +85,6 @@ KdenliveDoc::KdenliveDoc(const QUrl &url, const QString &projectFolder, QUndoGro
...
@@ -86,9 +85,6 @@ KdenliveDoc::KdenliveDoc(const QUrl &url, const QString &projectFolder, QUndoGro
m_commandStack
=
std
::
make_shared
<
DocUndoStack
>
(
undoGroup
);
m_commandStack
=
std
::
make_shared
<
DocUndoStack
>
(
undoGroup
);
m_guideModel
.
reset
(
new
MarkerListModel
(
m_commandStack
,
this
));
m_guideModel
.
reset
(
new
MarkerListModel
(
m_commandStack
,
this
));
connect
(
m_guideModel
.
get
(),
&
MarkerListModel
::
modelChanged
,
this
,
&
KdenliveDoc
::
guidesChanged
);
connect
(
m_guideModel
.
get
(),
&
MarkerListModel
::
modelChanged
,
this
,
&
KdenliveDoc
::
guidesChanged
);
m_clipManager
=
new
ClipManager
(
this
);
connect
(
m_clipManager
,
SIGNAL
(
displayMessage
(
QString
,
int
)),
parent
,
SLOT
(
slotGotProgressInfo
(
QString
,
int
)));
connect
(
this
,
SIGNAL
(
updateCompositionMode
(
int
)),
parent
,
SLOT
(
slotUpdateCompositeAction
(
int
)));
connect
(
this
,
SIGNAL
(
updateCompositionMode
(
int
)),
parent
,
SLOT
(
slotUpdateCompositeAction
(
int
)));
bool
success
=
false
;
bool
success
=
false
;
connect
(
m_commandStack
.
get
(),
&
QUndoStack
::
indexChanged
,
this
,
&
KdenliveDoc
::
slotModified
);
connect
(
m_commandStack
.
get
(),
&
QUndoStack
::
indexChanged
,
this
,
&
KdenliveDoc
::
slotModified
);
...
@@ -287,7 +283,6 @@ KdenliveDoc::~KdenliveDoc()
...
@@ -287,7 +283,6 @@ KdenliveDoc::~KdenliveDoc()
// qCDebug(KDENLIVE_LOG) << "// DEL CLP MAN";
// qCDebug(KDENLIVE_LOG) << "// DEL CLP MAN";
// Clean up guide model
// Clean up guide model
m_guideModel
.
reset
();
m_guideModel
.
reset
();
delete
m_clipManager
;
// qCDebug(KDENLIVE_LOG) << "// DEL CLP MAN done";
// qCDebug(KDENLIVE_LOG) << "// DEL CLP MAN done";
if
(
m_autosave
)
{
if
(
m_autosave
)
{
if
(
!
m_autosave
->
fileName
().
isEmpty
())
{
if
(
!
m_autosave
->
fileName
().
isEmpty
())
{
...
@@ -596,11 +591,6 @@ bool KdenliveDoc::saveSceneList(const QString &path, const QString &scene)
...
@@ -596,11 +591,6 @@ bool KdenliveDoc::saveSceneList(const QString &path, const QString &scene)
return
true
;
return
true
;
}
}
ClipManager
*
KdenliveDoc
::
clipManager
()
{
return
m_clipManager
;
}
QString
KdenliveDoc
::
projectTempFolder
()
const
QString
KdenliveDoc
::
projectTempFolder
()
const
{
{
if
(
m_projectFolder
.
isEmpty
())
{
if
(
m_projectFolder
.
isEmpty
())
{
...
...
src/doc/kdenlivedoc.h
View file @
1ab17ea6
...
@@ -39,7 +39,6 @@
...
@@ -39,7 +39,6 @@
#include "mltcontroller/effectscontroller.h"
#include "mltcontroller/effectscontroller.h"
#include "timecode.h"
#include "timecode.h"
class
ClipManager
;
class
MainWindow
;
class
MainWindow
;
class
TrackInfo
;
class
TrackInfo
;
class
ProjectClip
;
class
ProjectClip
;
...
@@ -76,7 +75,6 @@ public:
...
@@ -76,7 +75,6 @@ public:
Timecode
timecode
()
const
;
Timecode
timecode
()
const
;
QDomDocument
toXml
();
QDomDocument
toXml
();
std
::
shared_ptr
<
DocUndoStack
>
commandStack
();
std
::
shared_ptr
<
DocUndoStack
>
commandStack
();
ClipManager
*
clipManager
();
int
getFramePos
(
const
QString
&
duration
);
int
getFramePos
(
const
QString
&
duration
);
/** @brief Get a bin's clip from its id. */
/** @brief Get a bin's clip from its id. */
...
@@ -165,7 +163,6 @@ private:
...
@@ -165,7 +163,6 @@ private:
QString
m_documentRoot
;
QString
m_documentRoot
;
Timecode
m_timecode
;
Timecode
m_timecode
;
std
::
shared_ptr
<
DocUndoStack
>
m_commandStack
;
std
::
shared_ptr
<
DocUndoStack
>
m_commandStack
;
ClipManager
*
m_clipManager
;
QString
m_searchFolder
;
QString
m_searchFolder
;
/** @brief Tells whether the current document has been changed after being saved. */
/** @brief Tells whether the current document has been changed after being saved. */
...
...
src/mainwindow.cpp
View file @
1ab17ea6
...
@@ -52,7 +52,6 @@
...
@@ -52,7 +52,6 @@
#include "monitor/monitormanager.h"
#include "monitor/monitormanager.h"
#include "monitor/scopes/audiographspectrum.h"
#include "monitor/scopes/audiographspectrum.h"
#include "profiles/profilemodel.hpp"
#include "profiles/profilemodel.hpp"
#include "project/clipmanager.h"
#include "project/cliptranscode.h"
#include "project/cliptranscode.h"
#include "project/dialogs/archivewidget.h"
#include "project/dialogs/archivewidget.h"
#include "project/dialogs/projectsettings.h"
#include "project/dialogs/projectsettings.h"
...
...
src/project/CMakeLists.txt
View file @
1ab17ea6
add_subdirectory
(
dialogs
)
add_subdirectory
(
dialogs
)
set
(
kdenlive_SRCS
set
(
kdenlive_SRCS
${
kdenlive_SRCS
}
${
kdenlive_SRCS
}
project/clipmanager.cpp
project/clipstabilize.cpp
project/clipstabilize.cpp
project/cliptranscode.cpp
project/cliptranscode.cpp
project/invaliddialog.cpp
project/invaliddialog.cpp
...
...
src/project/clipmanager.cpp
deleted
100644 → 0
View file @
e8642c24
/***************************************************************************
* Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "clipmanager.h"
#include "bin/bin.h"
#include "bin/bincommands.h"
#include "core.h"
#include "dialogs/slideshowclip.h"
#include "doc/docundostack.hpp"
#include "doc/kdenlivedoc.h"
#include "doc/kthumb.h"
#include "kdenlivesettings.h"
#include "mltcontroller/bincontroller.h"
#include "mltcontroller/clipcontroller.h"
#include "project/projectmanager.h"
#include "renderer.h"
#include "titler/titledocument.h"
#include <mlt++/Mlt.h>
#include <KIO/JobUiDelegate>
#include <KIO/MkdirJob>
#include <KJobWidgets/KJobWidgets>
#include <klocalizedstring.h>
#include <QApplication>
#include <QCheckBox>
#include <QGraphicsItemGroup>
#include <QtConcurrent>
ClipManager
::
ClipManager
(
KdenliveDoc
*
doc
)
:
QObject
()
,
m_audioThumbsQueue
()
,
m_doc
(
doc
)
,
m_abortThumb
(
false
)
,
m_closing
(
false
)
,
m_abortAudioThumb
(
false
)
{
}
ClipManager
::~
ClipManager
()
{
m_closing
=
true
;
m_abortThumb
=
true
;
m_abortAudioThumb
=
true
;
m_thumbsThread
.
waitForFinished
();
m_audioThumbsThread
.
waitForFinished
();
m_thumbsMutex
.
lock
();
m_requestedThumbs
.
clear
();
m_audioThumbsQueue
.
clear
();
m_thumbsMutex
.
unlock
();
}
void
ClipManager
::
clear
()
{
m_abortThumb
=
true
;
m_abortAudioThumb
=
true
;
m_thumbsThread
.
waitForFinished
();
m_audioThumbsThread
.
waitForFinished
();
m_thumbsMutex
.
lock
();
m_requestedThumbs
.
clear
();
m_audioThumbsQueue
.
clear
();
m_thumbsMutex
.
unlock
();
m_abortThumb
=
false
;
m_abortAudioThumb
=
false
;
m_folderList
.
clear
();
m_modifiedClips
.
clear
();
}
void
ClipManager
::
slotRequestThumbs
(
const
QString
&
id
,
const
QList
<
int
>
&
frames
)
{
m_thumbsMutex
.
lock
();
for
(
int
frame
:
frames
)
{
m_requestedThumbs
.
insertMulti
(
id
,
frame
);
}
m_thumbsMutex
.
unlock
();
if
(
!
m_thumbsThread
.
isRunning
()
&&
!
m_abortThumb
)
{
m_thumbsThread
=
QtConcurrent
::
run
(
this
,
&
ClipManager
::
slotGetThumbs
);
}
}
void
ClipManager
::
stopThumbs
(
const
QString
&
id
)
{
if
(
m_closing
||
(
m_requestedThumbs
.
isEmpty
()
&&
m_processingThumbId
!=
id
&&
m_audioThumbsQueue
.
isEmpty
()
&&
m_processingAudioThumbId
!=
id
))
{
return
;
}
// Abort video thumbs for this clip
m_abortThumb
=
true
;
m_thumbsThread
.
waitForFinished
();
m_thumbsMutex
.
lock
();
m_requestedThumbs
.
remove
(
id
);
m_audioThumbsQueue
.
removeAll
(
id
);
m_thumbsMutex
.
unlock
();
m_abortThumb
=
false
;
// Abort audio thumbs for this clip
if
(
m_processingAudioThumbId
==
id
)
{
m_abortAudioThumb
=
true
;
m_audioThumbsThread
.
waitForFinished
();
m_abortAudioThumb
=
false
;
}
if
(
!
m_thumbsThread
.
isRunning
()
&&
!
m_requestedThumbs
.
isEmpty
())
{
m_thumbsThread
=
QtConcurrent
::
run
(
this
,
&
ClipManager
::
slotGetThumbs
);
}
}
void
ClipManager
::
slotGetThumbs
()
{
QMap
<
QString
,
int
>::
const_iterator
i
;
while
(
!
m_requestedThumbs
.
isEmpty
()
&&
!
m_abortThumb
)
{
m_thumbsMutex
.
lock
();
i
=
m_requestedThumbs
.
constBegin
();
m_processingThumbId
=
i
.
key
();
QList
<
int
>
values
=
m_requestedThumbs
.
values
(
m_processingThumbId
);
m_requestedThumbs
.
remove
(
m_processingThumbId
);
// TODO int thumbType = 0; // 0 = timeline thumb, 1 = project clip zone thumb, 2 = clip properties thumb
if
(
m_processingThumbId
.
startsWith
(
QLatin1String
(
"?"
)))
{
// if id starts with ?, it means the request comes from a clip property widget
// TODO thumbType = 2;
m_processingThumbId
.
remove
(
0
,
1
);
}
if
(
m_processingThumbId
.
startsWith
(
QLatin1String
(
"#"
)))
{
// if id starts with #, it means the request comes from project tree
// TODO thumbType = 1;
m_processingThumbId
.
remove
(
0
,
1
);
}
m_thumbsMutex
.
unlock
();
qSort
(
values
);
// TODO
/*
DocClipBase *clip = getClipById(m_processingThumbId);
if (!clip) continue;
max = m_requestedThumbs.size() + values.count();
// keep in sync with declaration un projectitem.cpp and subprojectitem.cpp
int minHeight = qMax(38, QFontMetrics(QApplication::font()).lineSpacing() * 2);
while (!values.isEmpty() && clip->thumbProducer() && !m_abortThumb) {
int pos = values.takeFirst();
switch (thumbType) {
case 1:
clip->thumbProducer()->getGenericThumb(pos, minHeight, thumbType);
break;
case 2:
clip->thumbProducer()->getGenericThumb(pos, 180, thumbType);
break;
default:
clip->thumbProducer()->getThumb(pos);
}
done++;
if (max > 3) emit displayMessage(i18n("Loading thumbnails"), 100 * done / max);
}
*/
}
m_processingThumbId
.
clear
();
emit
displayMessage
(
QString
(),
-
1
);
}
void
ClipManager
::
slotAddCopiedClip
(
KIO
::
Job
*
,
const
QUrl
&
,
const
QUrl
&
dst
)
{
pCore
->
bin
()
->
droppedUrls
(
QList
<
QUrl
>
()
<<
dst
);
}
int
ClipManager
::
lastClipId
()
const
{
return
pCore
->
bin
()
->
lastClipId
();
}
/*
void ClipManager::slotClipMissing(const QString &path)
{
qCDebug(KDENLIVE_LOG) << "// CLIP: " << path << " WAS MISSING";
//TODO
const QList<DocClipBase *> list = getClipByResource(path);
for (int i = 0; i < list.count(); ++i) {
DocClipBase *clip = list.at(i);
if (clip != nullptr) emit missingClip(clip->getId());
}
}
void ClipManager::slotClipAvailable(const QString &path)
{
qCDebug(KDENLIVE_LOG) << "// CLIP: " << path << " WAS ADDED";
//TODO
const QList<DocClipBase *> list = getClipByResource(path);
for (int i = 0; i < list.count(); ++i) {
DocClipBase *clip = list.at(i);
if (clip != nullptr) emit availableClip(clip->getId());
}
}
*/
void
ClipManager
::
projectTreeThumbReady
(
const
QString
&
id
,
int
frame
,
const
QImage
&
img
,
int
type
)
{
switch
(
type
)
{
case
2
:
emit
gotClipPropertyThumbnail
(
id
,
img
);
break
;
default:
emit
thumbReady
(
id
,
frame
,
img
);
}
}
src/project/clipmanager.h
deleted
100644 → 0
View file @
e8642c24
/***************************************************************************
* Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#ifndef CLIPMANAGER_H
#define CLIPMANAGER_H
#include <QFuture>
#include <QMutex>
#include <QObject>
#include <qdom.h>
#include <KIO/CopyJob>
#include <QUrl>
#include "definitions.h"
#include "gentime.h"
class
KdenliveDoc
;
class
AbstractGroupItem
;
class
QUndoCommand
;
class
SolidVolumeInfo
{
public:
QString
path
;
// mount path of volume, with trailing slash
QString
uuid
;
// UUID as from Solid
QString
label
;
// volume label (think of CDs)
bool
isRemovable
;
// may be removed
bool
isMounted
;
bool
isNull
()
const
{
return
path
.
isNull
();
}
};
namespace
Mlt
{
}
/**
* @class ClipManager
* @brief Takes care of clip operations that might affect timeline and bin
*/
class
ClipManager
:
public
QObject
{
Q_OBJECT
public
:
explicit
ClipManager
(
KdenliveDoc
*
doc
);
virtual
~
ClipManager
();
int
lastClipId
()
const
;
/** @brief Prepare deletion of clips and folders from the Bin. */
void
clear
();
/** @brief remove a clip id from the queue list. */
void
stopThumbs
(
const
QString
&
id
);
void
projectTreeThumbReady
(
const
QString
&
id
,
int
frame
,
const
QImage
&
img
,
int
type
);
public
slots
:
/** @brief Request creation of a clip thumbnail for specified frames. */
void
slotRequestThumbs
(
const
QString
&
id
,
const
QList
<
int
>
&
frames
);
private
slots
:
void
slotGetThumbs
();
/** @brief Clip has been copied, add it now. */
void
slotAddCopiedClip
(
KIO
::
Job
*
,
const
QUrl
&
,
const
QUrl
&
dst
);
private:
// Private attributes
/** @brief the list of groups in the document */
QList
<
AbstractGroupItem
*>
m_groupsList
;
QMap
<
QString
,
QString
>
m_folderList
;
QList
<
QString
>
m_audioThumbsQueue
;
/** the document undo stack*/
KdenliveDoc
*
m_doc
;
/** List of the clip IDs that need to be reloaded after being externally modified */
QMap
<
QString
,
QTime
>
m_modifiedClips
;
/** Struct containing the list of clip thumbnails to request (clip id and frames) */
QMap
<
QString
,
int
>
m_requestedThumbs
;
QMutex
m_thumbsMutex
;
QFuture
<
void
>
m_thumbsThread
;
/** @brief The id of currently processed clip for thumbs creation. */
QString
m_processingThumbId
;
/** @brief If true, abort processing of clip thumbs before removing a clip. */
bool
m_abortThumb
;
/** @brief We are about to delete the clip producer, stop processing thumbs. */
bool
m_closing
;
QFuture
<
void
>
m_audioThumbsThread
;
/** @brief If true, abort processing of audio thumbs. */
bool
m_abortAudioThumb
;
/** @brief The id of currently processed clip for audio thumbs creation. */
QString
m_processingAudioThumbId
;
QMutex
m_groupsMutex
;
QPoint
m_projectTreeThumbSize
;
signals:
void
reloadClip
(
const
QString
&
);
void
modifiedClip
(
const
QString
&
);
void
missingClip
(
const
QString
&
);
void
availableClip
(
const
QString
&
);
void
checkAllClips
(
bool
displayRatioChanged
,
bool
fpsChanged
,
const
QStringList
&
brokenClips
);
void
displayMessage
(
const
QString
&
,
int
);
void
thumbReady
(
const
QString
&
id
,
int
,
const
QImage
&
);
void
gotClipPropertyThumbnail
(
const
QString
&
id
,
const
QImage
&
);
};
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment