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
261
Issues
261
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
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
dc660656
Commit
dc660656
authored
Mar 14, 2018
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated timeline 1 files
parent
cb1a0bc5
Changes
61
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
61 changed files
with
0 additions
and
27499 deletions
+0
-27499
src/timeline/CMakeLists.txt
src/timeline/CMakeLists.txt
+0
-4
src/timeline/abstractclipitem.cpp
src/timeline/abstractclipitem.cpp
+0
-686
src/timeline/abstractclipitem.h
src/timeline/abstractclipitem.h
+0
-129
src/timeline/abstractgroupitem.cpp
src/timeline/abstractgroupitem.cpp
+0
-607
src/timeline/abstractgroupitem.h
src/timeline/abstractgroupitem.h
+0
-81
src/timeline/clip.cpp
src/timeline/clip.cpp
+0
-203
src/timeline/clip.h
src/timeline/clip.h
+0
-64
src/timeline/clipdurationdialog.cpp
src/timeline/clipdurationdialog.cpp
+0
-172
src/timeline/clipdurationdialog.h
src/timeline/clipdurationdialog.h
+0
-62
src/timeline/clipitem.cpp
src/timeline/clipitem.cpp
+0
-1728
src/timeline/clipitem.h
src/timeline/clipitem.h
+0
-260
src/timeline/customruler.cpp
src/timeline/customruler.cpp
+0
-690
src/timeline/customruler.h
src/timeline/customruler.h
+0
-123
src/timeline/customtrackscene.cpp
src/timeline/customtrackscene.cpp
+0
-110
src/timeline/customtrackscene.h
src/timeline/customtrackscene.h
+0
-62
src/timeline/customtrackview.cpp
src/timeline/customtrackview.cpp
+0
-9125
src/timeline/customtrackview.h
src/timeline/customtrackview.h
+0
-631
src/timeline/effectmanager.cpp
src/timeline/effectmanager.cpp
+0
-474
src/timeline/effectmanager.h
src/timeline/effectmanager.h
+0
-58
src/timeline/guide.cpp
src/timeline/guide.cpp
+0
-175
src/timeline/guide.h
src/timeline/guide.h
+0
-61
src/timeline/headertrack.cpp
src/timeline/headertrack.cpp
+0
-352
src/timeline/headertrack.h
src/timeline/headertrack.h
+0
-89
src/timeline/keyframeview.cpp
src/timeline/keyframeview.cpp
+0
-1120
src/timeline/keyframeview.h
src/timeline/keyframeview.h
+0
-135
src/timeline/managers/abstracttoolmanager.cpp
src/timeline/managers/abstracttoolmanager.cpp
+0
-118
src/timeline/managers/abstracttoolmanager.h
src/timeline/managers/abstracttoolmanager.h
+0
-65
src/timeline/managers/guidemanager.cpp
src/timeline/managers/guidemanager.cpp
+0
-94
src/timeline/managers/guidemanager.h
src/timeline/managers/guidemanager.h
+0
-58
src/timeline/managers/movemanager.cpp
src/timeline/managers/movemanager.cpp
+0
-400
src/timeline/managers/movemanager.h
src/timeline/managers/movemanager.h
+0
-58
src/timeline/managers/previewmanager.cpp
src/timeline/managers/previewmanager.cpp
+0
-667
src/timeline/managers/previewmanager.h
src/timeline/managers/previewmanager.h
+0
-143
src/timeline/managers/razormanager.cpp
src/timeline/managers/razormanager.cpp
+0
-144
src/timeline/managers/razormanager.h
src/timeline/managers/razormanager.h
+0
-67
src/timeline/managers/resizemanager.cpp
src/timeline/managers/resizemanager.cpp
+0
-227
src/timeline/managers/resizemanager.h
src/timeline/managers/resizemanager.h
+0
-46
src/timeline/managers/selectmanager.cpp
src/timeline/managers/selectmanager.cpp
+0
-406
src/timeline/managers/selectmanager.h
src/timeline/managers/selectmanager.h
+0
-59
src/timeline/managers/spacermanager.cpp
src/timeline/managers/spacermanager.cpp
+0
-99
src/timeline/managers/spacermanager.h
src/timeline/managers/spacermanager.h
+0
-49
src/timeline/managers/trimmanager.cpp
src/timeline/managers/trimmanager.cpp
+0
-247
src/timeline/managers/trimmanager.h
src/timeline/managers/trimmanager.h
+0
-73
src/timeline/spacerdialog.cpp
src/timeline/spacerdialog.cpp
+0
-76
src/timeline/spacerdialog.h
src/timeline/spacerdialog.h
+0
-49
src/timeline/timeline.cpp
src/timeline/timeline.cpp
+0
-2164
src/timeline/timeline.h
src/timeline/timeline.h
+0
-301
src/timeline/timelinecommands.cpp
src/timeline/timelinecommands.cpp
+0
-899
src/timeline/timelinecommands.h
src/timeline/timelinecommands.h
+0
-497
src/timeline/timelinesearch.cpp
src/timeline/timelinesearch.cpp
+0
-117
src/timeline/timelinesearch.h
src/timeline/timelinesearch.h
+0
-54
src/timeline/track.cpp
src/timeline/track.cpp
+0
-1070
src/timeline/track.h
src/timeline/track.h
+0
-237
src/timeline/trackdialog.cpp
src/timeline/trackdialog.cpp
+0
-38
src/timeline/trackdialog.h
src/timeline/trackdialog.h
+0
-35
src/timeline/tracksconfigdialog.cpp
src/timeline/tracksconfigdialog.cpp
+0
-213
src/timeline/tracksconfigdialog.h
src/timeline/tracksconfigdialog.h
+0
-81
src/timeline/transition.cpp
src/timeline/transition.cpp
+0
-573
src/timeline/transition.h
src/timeline/transition.h
+0
-98
src/timeline/transitionhandler.cpp
src/timeline/transitionhandler.cpp
+0
-702
src/timeline/transitionhandler.h
src/timeline/transitionhandler.h
+0
-74
No files found.
src/timeline/CMakeLists.txt
deleted
100644 → 0
View file @
cb1a0bc5
set
(
kdenlive_SRCS
${
kdenlive_SRCS
}
PARENT_SCOPE
)
src/timeline/abstractclipitem.cpp
deleted
100644 → 0
View file @
cb1a0bc5
This diff is collapsed.
Click to expand it.
src/timeline/abstractclipitem.h
deleted
100644 → 0
View file @
cb1a0bc5
/***************************************************************************
* Copyright (C) 2008 by Marco Gittler (g.marco@freenet.de) *
* 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 ABSTRACTCLIPITEM_H
#define ABSTRACTCLIPITEM_H
#include "definitions.h"
#include "gentime.h"
#include "keyframeview.h"
#include "mlt++/MltAnimation.h"
#include "mlt++/MltProperties.h"
#include <QGraphicsRectItem>
#include <QGraphicsWidget>
#include <QTimer>
class
CustomTrackScene
;
class
QGraphicsSceneMouseEvent
;
class
AbstractClipItem
:
public
QObject
,
public
QGraphicsRectItem
{
Q_OBJECT
Q_PROPERTY
(
QRectF
rect
READ
rect
WRITE
setRect
)
Q_PROPERTY
(
qreal
opacity
READ
opacity
WRITE
setOpacity
)
public:
AbstractClipItem
(
const
ItemInfo
&
info
,
const
QRectF
&
rect
,
double
fps
);
virtual
~
AbstractClipItem
();
ItemInfo
info
()
const
;
CustomTrackScene
*
projectScene
();
void
updateRectGeometry
();
void
updateItem
(
int
track
);
void
setItemLocked
(
bool
locked
);
bool
isItemLocked
()
const
;
void
closeAnimation
();
virtual
OperationType
operationMode
(
const
QPointF
&
pos
,
Qt
::
KeyboardModifiers
modifiers
)
=
0
;
virtual
void
updateKeyframes
(
const
QDomElement
&
effect
)
=
0
;
virtual
GenTime
startPos
()
const
;
virtual
GenTime
endPos
()
const
;
virtual
int
track
()
const
;
virtual
GenTime
cropStart
()
const
;
virtual
GenTime
cropDuration
()
const
;
/** @brief Return the current item's height */
static
int
itemHeight
();
/** @brief Return the current item's vertical offset
* For example transitions are drawn at 1/3 of track height */
static
int
itemOffset
();
/** @brief Resizes the clip from the start.
* @param posx Absolute position of new in point
* @param hasSizeLimit (optional) Whether the clip has a maximum size */
virtual
void
resizeStart
(
int
posx
,
bool
hasSizeLimit
=
true
,
bool
emitChange
=
true
);
void
updateKeyFramePos
(
int
frame
,
const
double
y
);
int
selectedKeyFramePos
()
const
;
int
originalKeyFramePos
()
const
;
void
prepareKeyframeMove
();
int
keyframesCount
();
double
editedKeyFrameValue
();
double
getKeyFrameClipHeight
(
const
double
y
);
QAction
*
parseKeyframeActions
(
const
QList
<
QAction
*>
&
list
);
void
editKeyframeType
(
const
QDomElement
&
effect
,
int
type
);
void
attachKeyframeToEnd
(
const
QDomElement
&
effect
,
bool
attach
);
bool
isAttachedToEnd
()
const
;
/** @brief Resizes the clip from the end.
* @param posx Absolute position of new out point */
virtual
void
resizeEnd
(
int
posx
,
bool
emitChange
=
true
);
virtual
double
fps
()
const
;
virtual
void
updateFps
(
double
fps
);
virtual
GenTime
maxDuration
()
const
;
virtual
void
setCropStart
(
const
GenTime
&
pos
);
/** @brief Set this clip as the main selected clip (or not). */
void
setMainSelectedClip
(
bool
selected
);
/** @brief Is this clip selected as the main clip. */
bool
isMainSelectedClip
();
void
insertKeyframe
(
QDomElement
effect
,
int
pos
,
double
val
,
bool
defaultValue
=
false
);
void
movedKeyframe
(
QDomElement
effect
,
int
newpos
,
int
oldpos
=
-
1
,
double
value
=
-
1
);
void
removeKeyframe
(
QDomElement
effect
,
int
frame
);
private
slots
:
void
doUpdate
(
const
QRectF
&
r
);
void
slotSelectItem
();
protected:
ItemInfo
m_info
;
GenTime
m_maxDuration
;
int
m_visibleParam
;
int
m_selectedEffect
;
QTimer
m_selectionTimer
;
double
m_fps
;
/** @brief True if this is the last clip the user selected */
bool
m_isMainSelectedClip
;
KeyframeView
m_keyframeView
;
void
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
)
override
;
void
mouseReleaseEvent
(
QGraphicsSceneMouseEvent
*
event
)
override
;
void
mouseMoveEvent
(
QGraphicsSceneMouseEvent
*
event
)
override
;
int
trackForPos
(
int
position
);
int
posForTrack
(
int
track
);
bool
resizeGeometries
(
QDomElement
effect
,
int
width
,
int
height
,
int
previousDuration
,
int
start
,
int
duration
,
int
cropstart
);
QString
resizeAnimations
(
QDomElement
effect
,
int
previousDuration
,
int
start
,
int
duration
,
int
cropstart
);
bool
switchKeyframes
(
QDomElement
param
,
int
in
,
int
oldin
,
int
out
,
int
oldout
);
signals:
void
selectItem
(
AbstractClipItem
*
);
};
#endif
src/timeline/abstractgroupitem.cpp
deleted
100644 → 0
View file @
cb1a0bc5
This diff is collapsed.
Click to expand it.
src/timeline/abstractgroupitem.h
deleted
100644 → 0
View file @
cb1a0bc5
/***************************************************************************
* Copyright (C) 2008 by Marco Gittler (g.marco@freenet.de) *
* 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 ABSTRACTGROUPITEM
#define ABSTRACTGROUPITEM
#include "definitions.h"
#include <QGraphicsItemGroup>
#include <QGraphicsSceneMouseEvent>
class
CustomTrackScene
;
class
AbstractClipItem
;
class
QGraphicsSceneMouseEvent
;
class
AbstractGroupItem
:
public
QObject
,
public
QGraphicsItemGroup
{
Q_OBJECT
public:
explicit
AbstractGroupItem
(
double
fps
);
int
type
()
const
override
;
CustomTrackScene
*
projectScene
();
void
addItem
(
QGraphicsItem
*
item
);
void
removeItem
(
QGraphicsItem
*
item
);
int
track
()
const
;
QPainterPath
clipGroupShape
(
const
QPointF
&
offset
)
const
;
QPainterPath
clipGroupSpacerShape
(
const
QPointF
&
offset
)
const
;
QPainterPath
transitionGroupShape
(
const
QPointF
&
offset
)
const
;
void
setItemLocked
(
bool
locked
);
bool
isItemLocked
()
const
;
QList
<
AbstractClipItem
*>
childClips
()
const
;
// ItemInfo info() const;
/** @brief Resizes all clips in this group from start.
*@param diff Difference to startPos stored in m_resizeInfos */
void
resizeStart
(
int
diff
);
/** @brief Resizes all clips in this group from end.
* @param diff Difference to endPos stored in m_resizeInfos */
void
resizeEnd
(
int
diff
);
/** @brief Gets the duration (length) of the group. */
GenTime
duration
()
const
;
/** @brief Gets the start frame of the group. */
GenTime
startPos
()
const
;
QGraphicsItem
*
otherClip
(
QGraphicsItem
*
item
);
protected:
QVariant
itemChange
(
GraphicsItemChange
change
,
const
QVariant
&
value
)
override
;
void
paint
(
QPainter
*
,
const
QStyleOptionGraphicsItem
*
,
QWidget
*
)
override
;
void
dragEnterEvent
(
QGraphicsSceneDragDropEvent
*
event
)
override
;
void
dragLeaveEvent
(
QGraphicsSceneDragDropEvent
*
event
)
override
;
void
dropEvent
(
QGraphicsSceneDragDropEvent
*
event
)
override
;
void
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
)
override
;
void
mouseReleaseEvent
(
QGraphicsSceneMouseEvent
*
event
)
override
;
void
mouseMoveEvent
(
QGraphicsSceneMouseEvent
*
event
)
override
;
int
trackForPos
(
int
position
);
int
posForTrack
(
int
track
);
private:
QPainterPath
groupShape
(
GraphicsRectItem
type
,
const
QPointF
&
offset
)
const
;
QPainterPath
spacerGroupShape
(
GraphicsRectItem
type
,
const
QPointF
&
offset
)
const
;
};
#endif
src/timeline/clip.cpp
deleted
100644 → 0
View file @
cb1a0bc5
/*
* Kdenlive timeline clip handling MLT producer
* Copyright 2015 Kdenlive team <kdenlive@kde.org>
* Author: Vincent Pinon <vpinon@kde.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "clip.h"
#include <QDebug>
#include <QDomDocument>
#include <mlt++/Mlt.h>
Clip
::
Clip
(
Mlt
::
Producer
&
producer
)
:
QObject
()
,
m_producer
(
producer
)
{
}
Clip
::
Clip
(
Clip
&
other
)
:
QObject
()
{
m_producer
=
other
.
producer
();
}
Clip
::~
Clip
()
=
default
;
Clip
&
Clip
::
operator
=
(
Clip
&
other
)
{
m_producer
=
other
.
producer
();
return
*
this
;
}
Mlt
::
Producer
&
Clip
::
producer
()
{
return
m_producer
;
}
void
Clip
::
setProducer
(
Mlt
::
Producer
&
producer
)
{
m_producer
=
producer
;
}
void
Clip
::
adjustEffectsLength
()
{
int
ct
=
0
;
Mlt
::
Filter
*
filter
=
m_producer
.
filter
(
ct
);
while
(
filter
!=
nullptr
)
{
if
(
filter
->
get_int
(
"kdenlive:sync_in_out"
)
==
1
)
{
filter
->
set_in_and_out
(
m_producer
.
get_in
(),
m_producer
.
get_out
());
}
ct
++
;
delete
filter
;
filter
=
m_producer
.
filter
(
ct
);
}
}
void
Clip
::
addEffects
(
Mlt
::
Service
&
service
,
bool
skipFades
)
{
for
(
int
ix
=
0
;
ix
<
service
.
filter_count
();
++
ix
)
{
QScopedPointer
<
Mlt
::
Filter
>
effect
(
service
.
filter
(
ix
));
// Only duplicate Kdenlive filters, and skip the fade in effects
if
(
effect
->
is_valid
())
{
QString
effectId
=
QString
::
fromLatin1
(
effect
->
get
(
"kdenlive_id"
));
if
(
effectId
.
isEmpty
()
||
(
skipFades
&&
(
effectId
==
QLatin1String
(
"fadein"
)
||
effectId
==
QLatin1String
(
"fade_from_black"
))))
{
continue
;
}
// no easy filter copy: do it by hand!
auto
*
copy
=
new
Mlt
::
Filter
(
*
effect
->
profile
(),
effect
->
get
(
"mlt_service"
));
if
((
copy
!=
nullptr
)
&&
copy
->
is_valid
())
{
for
(
int
i
=
0
;
i
<
effect
->
count
();
++
i
)
{
QString
paramName
=
QString
::
fromLatin1
(
effect
->
get_name
(
i
));
if
(
paramName
==
QLatin1String
(
"kdenlive:sync_in_out"
)
&&
QString
::
fromLatin1
(
effect
->
get
(
i
))
==
QLatin1String
(
"1"
))
{
// Effect in/out must be synced with clip in/out
copy
->
set_in_and_out
(
m_producer
.
get_in
(),
m_producer
.
get_out
());
}
if
(
paramName
.
at
(
0
)
!=
QLatin1Char
(
'_'
))
{
copy
->
set
(
effect
->
get_name
(
i
),
effect
->
get
(
i
));
}
}
m_producer
.
attach
(
*
copy
);
}
delete
copy
;
}
}
}
void
Clip
::
replaceEffects
(
Mlt
::
Service
&
service
)
{
// remove effects first
int
ct
=
0
;
Mlt
::
Filter
*
filter
=
m_producer
.
filter
(
ct
);
while
(
filter
!=
nullptr
)
{
QString
ix
=
QString
::
fromLatin1
(
filter
->
get
(
"kdenlive_ix"
));
if
(
!
ix
.
isEmpty
())
{
if
(
m_producer
.
detach
(
*
filter
)
==
0
)
{
}
else
{
ct
++
;
}
}
else
{
ct
++
;
}
delete
filter
;
filter
=
m_producer
.
filter
(
ct
);
}
addEffects
(
service
);
}
void
Clip
::
deleteEffects
()
{
// remove effects
int
ct
=
0
;
Mlt
::
Filter
*
filter
=
m_producer
.
filter
(
ct
);
while
(
filter
!=
nullptr
)
{
QString
ix
=
QString
::
fromLatin1
(
filter
->
get
(
"kdenlive_id"
));
if
(
!
ix
.
isEmpty
())
{
if
(
m_producer
.
detach
(
*
filter
)
==
0
)
{
}
else
{
ct
++
;
}
}
else
{
ct
++
;
}
delete
filter
;
filter
=
m_producer
.
filter
(
ct
);
}
}
void
Clip
::
disableEffects
(
bool
disable
)
{
int
ct
=
0
;
Mlt
::
Filter
*
filter
=
m_producer
.
filter
(
ct
);
while
(
filter
!=
nullptr
)
{
QString
ix
=
QString
::
fromLatin1
(
filter
->
get
(
"kdenlive_ix"
));
if
(
!
ix
.
isEmpty
())
{
if
(
disable
&&
filter
->
get_int
(
"disable"
)
==
0
)
{
filter
->
set
(
"disable"
,
1
);
filter
->
set
(
"auto_disable"
,
1
);
}
else
if
(
!
disable
&&
filter
->
get_int
(
"auto_disable"
)
==
1
)
{
filter
->
set
(
"disable"
,
(
char
*
)
nullptr
);
filter
->
set
(
"auto_disable"
,
(
char
*
)
nullptr
);
}
}
ct
++
;
delete
filter
;
filter
=
m_producer
.
filter
(
ct
);
}
}
const
QByteArray
Clip
::
xml
()
{
Mlt
::
Consumer
c
(
*
m_producer
.
profile
(),
"xml"
,
"string"
);
Mlt
::
Service
s
(
m_producer
.
get_service
());
int
ignore
=
s
.
get_int
(
"ignore_points"
);
if
(
ignore
!=
0
)
{
s
.
set
(
"ignore_points"
,
0
);
}
c
.
connect
(
s
);
c
.
set
(
"time_format"
,
"frames"
);
c
.
set
(
"no_meta"
,
1
);
c
.
set
(
"no_root"
,
1
);
c
.
set
(
"no_profile"
,
1
);
c
.
set
(
"root"
,
"/"
);
c
.
set
(
"store"
,
"kdenlive"
);
c
.
start
();
if
(
ignore
!=
0
)
{
s
.
set
(
"ignore_points"
,
ignore
);
}
return
c
.
get
(
"string"
);
}
Mlt
::
Producer
*
Clip
::
clone
()
{
QByteArray
prodXml
=
xml
();
Mlt
::
Producer
*
clone
=
new
Mlt
::
Producer
(
*
m_producer
.
profile
(),
"xml-string"
,
prodXml
);
return
clone
;
}
Mlt
::
Producer
*
Clip
::
softClone
(
const
char
*
list
)
{
QString
service
=
QString
::
fromLatin1
(
m_producer
.
get
(
"mlt_service"
));
QString
resource
=
QString
::
fromLatin1
(
m_producer
.
get
(
"resource"
));
Mlt
::
Producer
*
clone
=
new
Mlt
::
Producer
(
*
m_producer
.
profile
(),
service
.
toUtf8
().
constData
(),
resource
.
toUtf8
().
constData
());
Mlt
::
Properties
original
(
m_producer
.
get_properties
());
Mlt
::
Properties
cloneProps
(
clone
->
get_properties
());
cloneProps
.
pass_list
(
original
,
list
);
return
clone
;
}
src/timeline/clip.h
deleted
100644 → 0
View file @
cb1a0bc5
/*
* Kdenlive timeline clip handling MLT producer
* Copyright 2015 Kdenlive team <kdenlive@kde.org>
* Author: Vincent Pinon <vpinon@kde.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef CLIP_H
#define CLIP_H
#include <QObject>
#include <mlt++/MltProducer.h>
#include <mlt++/MltService.h>
class
Clip
:
public
QObject
{
Q_OBJECT
Q_PROPERTY
(
Mlt
::
Producer
producer
READ
producer
WRITE
setProducer
)
public:
explicit
Clip
(
Mlt
::
Producer
&
producer
);
Clip
(
Clip
&
other
);
~
Clip
();
Clip
&
operator
=
(
Clip
&
other
);
const
QByteArray
xml
();
/** @brief: Clone a producer (creates a completely independent copy). */
Mlt
::
Producer
*
clone
();
/** @brief: Clone a producer without using xml-string producer.
* When Movit is used, we must use this because xml-string crashes (probably attaches some normalizers)
*/
Mlt
::
Producer
*
softClone
(
const
char
*
list
);
void
deleteEffects
();
void
addEffects
(
Mlt
::
Service
&
service
,
bool
skipFades
=
false
);
void
replaceEffects
(
Mlt
::
Service
&
service
);
void
delEffect
(
int
index
);
/** @brief: Dis/enable all kdenlive effects on a clip. */
void
disableEffects
(
bool
disable
);
void
adjustEffectsLength
();
Mlt
::
Producer
&
producer
();
public
Q_SLOTS
:
void
setProducer
(
Mlt
::
Producer
&
producer
);
private:
Mlt
::
Producer
m_producer
;
};
#endif // CLIP_H
src/timeline/clipdurationdialog.cpp
deleted
100644 → 0
View file @
cb1a0bc5
/***************************************************************************
* 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 "clipdurationdialog.h"
#include "clipitem.h"
#include <QFontDatabase>
#include <QWheelEvent>
ClipDurationDialog
::
ClipDurationDialog
(
AbstractClipItem
*
clip
,
const
Timecode
&
tc
,
const
GenTime
&
min
,
const
GenTime
&
max
,
QWidget
*
parent
)
:
QDialog
(
parent
)
,
m_clip
(
clip
)
,
m_min
(
min
)
,
m_max
(
max
)
{
setFont
(
QFontDatabase
::
systemFont
(
QFontDatabase
::
SmallestReadableFont
));
setupUi
(
this
);
m_pos
=
new
TimecodeDisplay
(
tc
);
m_cropStart
=
new
TimecodeDisplay
(
tc
);
m_dur
=
new
TimecodeDisplay
(
tc
);
m_cropEnd
=
new
TimecodeDisplay
(
tc
);
clip_position_box
->
addWidget
(
m_pos
);
crop_start_box
->
addWidget
(
m_cropStart
);
clip_duration_box
->
addWidget
(
m_dur
);
crop_end_box
->
addWidget
(
m_cropEnd
);
bool
allowCrop
=
true
;
if
(
clip
->
type
()
==
AVWidget
)
{
ClipItem
*
item
=
static_cast
<
ClipItem
*>
(
clip
);
const
int
t
=
item
->
clipType
();
if
(
t
==
Color
||
t
==
Image
||
t
==
Text
)
{
allowCrop
=
false
;
}
}
if
(
!
allowCrop
||
clip
->
type
()
==
TransitionWidget
)
{
m_cropStart
->
setHidden
(
true
);
crop_label
->
hide
();
m_cropEnd
->
setHidden
(
true
),
end_label
->
hide
();
}
m_crop
=
m_clip
->
cropStart
();
m_pos
->
setValue
(
m_clip
->
startPos
());
m_dur
->
setValue
(
m_clip
->
cropDuration
());
m_cropStart
->
setValue
(
m_clip
->
cropStart
());
m_cropEnd
->
setValue
(
m_clip
->
maxDuration
()
-
m_clip
->
cropDuration
()
-
m_clip
->
cropStart
());
connect
(
m_pos
,
&
TimecodeDisplay
::
timeCodeEditingFinished
,
this
,
&
ClipDurationDialog
::
slotCheckStart
);
connect
(
m_dur
,
&
TimecodeDisplay
::
timeCodeEditingFinished
,
this
,
&
ClipDurationDialog
::
slotCheckDuration
);
connect
(
m_cropStart
,
&
TimecodeDisplay
::
timeCodeEditingFinished
,
this
,
&
ClipDurationDialog
::
slotCheckCrop
);
connect
(
m_cropEnd
,
&
TimecodeDisplay
::
timeCodeEditingFinished
,
this
,
&
ClipDurationDialog
::
slotCheckEnd
);
adjustSize
();
}
ClipDurationDialog
::~
ClipDurationDialog
()
{
delete
m_pos
;
delete
m_dur
;
delete
m_cropStart
;
delete
m_cropEnd
;
}
void
ClipDurationDialog
::
slotCheckStart
()
{
GenTime
start
=
m_pos
->
gentime
();
GenTime
duration
=
m_dur
->
gentime
();
if
(
m_min
!=
GenTime
()
&&
start
<
m_min
)
{
m_pos
->
setValue
(
m_min
);
}
else
if
(
m_max
!=
GenTime
()
&&
start
+
duration
>
m_max
)
{
m_pos
->
setValue
(
m_max
-
duration
);
}
}
void
ClipDurationDialog
::
slotCheckDuration
()
{
GenTime
start
=
m_pos
->
gentime
();
GenTime
duration
=
m_dur
->
gentime
();
GenTime
cropStart
=
m_cropStart
->
gentime
();