Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
3dcf8667
Commit
3dcf8667
authored
Apr 18, 2021
by
Jean-Baptiste Mardelle
Browse files
Compile and run on MLT-7 (some TODO's left)
parent
9917df1a
Changes
8
Hide whitespace changes
Inline
Side-by-side
cmake/modules/FindMLT.cmake
View file @
3dcf8667
...
...
@@ -6,7 +6,7 @@
# Redistribution and use is allowed according to the terms of the BSD license.
find_package
(
PkgConfig QUIET
)
pkg_check_modules
(
PC_MLT mlt++
)
pkg_check_modules
(
PC_MLT mlt++
-7
)
# Workaround cmake 3.17 issue (dropped .dll extension for library search)
if
(
WIN32
)
...
...
@@ -21,11 +21,11 @@ find_path(MLT_INCLUDE_DIR
PATHS
/usr/local/include
/usr/include
PATH_SUFFIXES mlt
PATH_SUFFIXES mlt
-7
)
find_library
(
MLT_LIBRARIES
NAMES mlt
NAMES mlt
-7
HINTS
${
PC_MLT_LIBDIR
}
${
PC_MLT_PREFIX
}
/lib
...
...
@@ -42,10 +42,11 @@ find_path(MLTPP_INCLUDE_DIR
PATHS
/usr/local/include
/usr/include
PATH_SUFFIXES mlt-7
)
find_library
(
MLTPP_LIBRARIES
NAMES mlt++
NAMES mlt++
-7
HINTS
${
PC_MLT_LIBDIR
}
${
PC_MLT_PREFIX
}
/lib
...
...
src/CMakeLists.txt
View file @
3dcf8667
...
...
@@ -9,7 +9,7 @@ set_package_properties(LibV4L2 PROPERTIES
if
(
NOT WIN32
)
find_package
(
PkgConfig QUIET
)
execute_process
(
COMMAND
${
PKG_CONFIG_EXECUTABLE
}
--variable=mltdatadir mlt-framework
COMMAND
${
PKG_CONFIG_EXECUTABLE
}
--variable=mltdatadir mlt-framework
-7
OUTPUT_VARIABLE MLT_DATADIR
RESULT_VARIABLE MLT_DATADIR_failed
)
if
(
NOT MLT_DATADIR_failed
)
...
...
@@ -17,7 +17,7 @@ if(NOT WIN32)
endif
()
execute_process
(
COMMAND
${
PKG_CONFIG_EXECUTABLE
}
--variable=meltbin mlt-framework
COMMAND
${
PKG_CONFIG_EXECUTABLE
}
--variable=meltbin mlt-framework
-7
OUTPUT_VARIABLE MLT_MELTBIN
RESULT_VARIABLE MLT_MELTBIN_failed
)
if
(
NOT MLT_MELTBIN_failed
)
...
...
src/assets/view/widgets/geometryeditwidget.cpp
View file @
3dcf8667
...
...
@@ -27,7 +27,8 @@
#include "monitor/monitormanager.h"
#include "timecodedisplay.h"
#include "widgets/geometrywidget.h"
#include <mlt++/MltGeometry.h>
#include <mlt++/MltProperties.h>
#include <framework/mlt_types.h>
#include <QVBoxLayout>
GeometryEditWidget
::
GeometryEditWidget
(
std
::
shared_ptr
<
AssetParameterModel
>
model
,
QModelIndex
index
,
QSize
frameSize
,
QWidget
*
parent
)
...
...
@@ -38,13 +39,12 @@ GeometryEditWidget::GeometryEditWidget(std::shared_ptr<AssetParameterModel> mode
const
QString
value
=
m_model
->
data
(
m_index
,
AssetParameterModel
::
ValueRole
).
toString
().
simplified
();
int
start
=
m_model
->
data
(
m_index
,
AssetParameterModel
::
ParentInRole
).
toInt
();
int
end
=
start
+
m_model
->
data
(
m_index
,
AssetParameterModel
::
ParentDurationRole
).
toInt
();
QSize
profileSize
=
pCore
->
getCurrentFrameSize
();
Mlt
::
Geometry
geometry
(
value
.
toUtf8
().
data
(),
end
,
profileSize
.
width
(),
profileSize
.
height
());
Mlt
::
GeometryItem
item
;
QRect
rect
;
if
(
geometry
.
fetch
(
&
item
,
0
)
==
0
)
{
rect
=
QRect
(
int
(
item
.
x
()),
int
(
item
.
y
()),
int
(
item
.
w
()),
int
(
item
.
h
()));
}
else
{
Mlt
::
Properties
mlt_prop
;
m_model
->
passProperties
(
mlt_prop
);
mlt_prop
.
set
(
"rect"
,
value
.
toUtf8
().
data
());
mlt_rect
r
=
mlt_prop
.
get_rect
(
"rect"
);
QRect
rect
=
QRect
(
int
(
r
.
x
),
int
(
r
.
y
),
int
(
r
.
w
),
int
(
r
.
h
));;
if
(
rect
.
isNull
())
{
// Cannot read value, use random default
rect
=
QRect
(
50
,
50
,
200
,
200
);
}
...
...
src/bin/projectclip.cpp
View file @
3dcf8667
...
...
@@ -1548,7 +1548,8 @@ QStringList ProjectClip::updatedAnalysisData(const QString &name, const QString
if
(
KMessageBox
::
questionYesNo
(
QApplication
::
activeWindow
(),
i18n
(
"Clip already contains analysis data %1"
,
name
),
QString
(),
KGuiItem
(
i18n
(
"Merge"
)),
KGuiItem
(
i18n
(
"Add"
)))
==
KMessageBox
::
Yes
)
{
// Merge data
auto
&
profile
=
pCore
->
getCurrentProfile
();
//TODO MLT7: convert to Mlt::Animation
/*auto &profile = pCore->getCurrentProfile();
Mlt::Geometry geometry(current.toUtf8().data(), duration().frames(profile->fps()), profile->width(), profile->height());
Mlt::Geometry newGeometry(data.toUtf8().data(), duration().frames(profile->fps()), profile->width(), profile->height());
Mlt::GeometryItem item;
...
...
@@ -1559,7 +1560,7 @@ QStringList ProjectClip::updatedAnalysisData(const QString &name, const QString
pos++;
geometry.insert(item);
}
return
QStringList
()
<<
QString
(
"kdenlive:clipanalysis."
+
name
)
<<
geometry
.
serialise
();
return QStringList() << QString("kdenlive:clipanalysis." + name) << geometry.serialise();
*/
// m_controller->setProperty("kdenlive:clipanalysis." + name, geometry.serialise());
}
// Add data with another name
...
...
@@ -1587,7 +1588,8 @@ const QString ProjectClip::geometryWithOffset(const QString &data, int offset)
return
data
;
}
auto
&
profile
=
pCore
->
getCurrentProfile
();
Mlt
::
Geometry
geometry
(
data
.
toUtf8
().
data
(),
duration
().
frames
(
profile
->
fps
()),
profile
->
width
(),
profile
->
height
());
// TODO MLT7: port to Mlt::Animation
/*Mlt::Geometry geometry(data.toUtf8().data(), duration().frames(profile->fps()), profile->width(), profile->height());
Mlt::Geometry newgeometry(nullptr, duration().frames(profile->fps()), profile->width(), profile->height());
Mlt::GeometryItem item;
int pos = 0;
...
...
@@ -1598,6 +1600,8 @@ const QString ProjectClip::geometryWithOffset(const QString &data, int offset)
newgeometry.insert(item);
}
return newgeometry.serialise();
*/
return
QString
();
}
bool
ProjectClip
::
isSplittable
()
const
...
...
src/capture/CMakeLists.txt
View file @
3dcf8667
...
...
@@ -7,7 +7,7 @@ endif()
set
(
kdenlive_SRCS
${
kdenlive_SRCS
}
capture/managecapturesdialog.cpp
capture/mltdevicecapture.cpp
#
capture/mltdevicecapture.cpp
capture/mediacapture.cpp
PARENT_SCOPE
)
...
...
src/doc/documentvalidator.cpp
View file @
3dcf8667
...
...
@@ -866,6 +866,8 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
QDomElement
trans
=
transitions
.
at
(
i
).
toElement
();
int
out
=
trans
.
attribute
(
QStringLiteral
(
"out"
)).
toInt
()
-
trans
.
attribute
(
QStringLiteral
(
"in"
)).
toInt
();
QString
geom
=
Xml
::
getXmlProperty
(
trans
,
QStringLiteral
(
"geometry"
));
//TODO MLT7: port?
/*
Mlt::Geometry *g = new Mlt::Geometry(geom.toUtf8().data(), out, profileWidth, profileHeight);
Mlt::GeometryItem item;
if (g->next_key(&item, out) == 0) {
...
...
@@ -878,6 +880,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
}
}
delete g;
*/
}
}
...
...
src/monitor/glwidget.cpp
View file @
3dcf8667
...
...
@@ -1128,7 +1128,7 @@ int GLWidget::reconfigure()
delete
m_threadCreateEvent
;
delete
m_threadJoinEvent
;
if
(
m_
consum
er
)
{
if
(
m_
glslManag
er
)
{
m_threadCreateEvent
=
m_consumer
->
listen
(
"consumer-thread-create"
,
this
,
mlt_listener
(
onThreadCreate
));
m_threadJoinEvent
=
m_consumer
->
listen
(
"consumer-thread-join"
,
this
,
mlt_listener
(
onThreadJoin
));
}
...
...
src/monitor/recmanager.cpp
View file @
3dcf8667
...
...
@@ -21,7 +21,7 @@
#include "recmanager.h"
#include "capture/managecapturesdialog.h"
#include "capture/mltdevicecapture.h"
//
#include "capture/mltdevicecapture.h"
#include "core.h"
#include "dialogs/profilesdialog.h"
#include "kdenlivesettings.h"
...
...
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