Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Farid Abdelnour
kdenlive
Commits
34672a15
Commit
34672a15
authored
Dec 18, 2018
by
Vincent Pinon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Applications/18.12'
parents
b144aed8
9b7b423f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
83 deletions
+30
-83
cmake/modules/FindOpenGLES.cmake
cmake/modules/FindOpenGLES.cmake
+0
-52
src/CMakeLists.txt
src/CMakeLists.txt
+0
-15
src/effectstack/widgets/keyframeimport.cpp
src/effectstack/widgets/keyframeimport.cpp
+2
-2
src/main.cpp
src/main.cpp
+2
-0
src/mltconnection.cpp
src/mltconnection.cpp
+24
-12
src/timeline/keyframeview.cpp
src/timeline/keyframeview.cpp
+2
-2
No files found.
cmake/modules/FindOpenGLES.cmake
deleted
100644 → 0
View file @
b144aed8
# - Try to find OpenGLES
# Once done this will define
#
# OPENGLES_FOUND - system has OpenGLES and EGL
# OPENGL_EGL_FOUND - system has EGL
# OPENGLES_INCLUDE_DIR - the GLES include directory
# OPENGLES_LIBRARY - the GLES library
# OPENGLES_EGL_INCLUDE_DIR - the EGL include directory
# OPENGLES_EGL_LIBRARY - the EGL library
# OPENGLES_LIBRARIES - all libraries needed for OpenGLES
# OPENGLES_INCLUDES - all includes needed for OpenGLES
FIND_PATH
(
OPENGLES_INCLUDE_DIR GLES2/gl2.h
/usr/openwin/share/include
/opt/graphics/OpenGL/include /usr/X11R6/include
/usr/include
)
FIND_LIBRARY
(
OPENGLES_LIBRARY
NAMES GLESv2
PATHS /opt/graphics/OpenGL/lib
/usr/openwin/lib
/usr/shlib /usr/X11R6/lib
/usr/lib
)
FIND_PATH
(
OPENGLES_EGL_INCLUDE_DIR EGL/egl.h
/usr/openwin/share/include
/opt/graphics/OpenGL/include /usr/X11R6/include
/usr/include
)
FIND_LIBRARY
(
OPENGLES_EGL_LIBRARY
NAMES EGL
PATHS /usr/shlib /usr/X11R6/lib
/usr/lib
)
SET
(
OPENGL_EGL_FOUND
"NO"
)
IF
(
OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR
)
SET
(
OPENGL_EGL_FOUND
"YES"
)
ENDIF
()
SET
(
OPENGLES_FOUND
"NO"
)
IF
(
OPENGLES_LIBRARY AND OPENGLES_INCLUDE_DIR AND
OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR
)
SET
(
OPENGLES_LIBRARIES
${
OPENGLES_LIBRARY
}
${
OPENGLES_LIBRARIES
}
${
OPENGLES_EGL_LIBRARY
}
)
SET
(
OPENGLES_INCLUDES
${
OPENGLES_INCLUDE_DIR
}
${
OPENGLES_EGL_INCLUDE_DIR
}
)
SET
(
OPENGLES_FOUND
"YES"
)
ENDIF
()
src/CMakeLists.txt
View file @
34672a15
add_definitions
(
${
Qt5Gui_DEFINITIONS
}
)
if
(
${
Qt5Gui_OPENGL_IMPLEMENTATION
}
STREQUAL
"GL"
)
find_package
(
OpenGL REQUIRED
)
set_package_properties
(
OpenGL PROPERTIES
DESCRIPTION
"the OpenGL library"
URL
""
TYPE RUNTIME
PURPOSE
""
)
else
()
find_package
(
OpenGLES REQUIRED
)
set_package_properties
(
OpenGLES PROPERTIES
DESCRIPTION
"the OpenGLES library"
URL
""
TYPE RUNTIME
PURPOSE
""
)
endif
()
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++11 -Wall -pedantic -Wextra"
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wcast-qual -Wcast-align -Wfloat-equal -Wpointer-arith"
)
...
...
src/effectstack/widgets/keyframeimport.cpp
View file @
34672a15
...
...
@@ -223,8 +223,8 @@ void KeyframeImport::resizeEvent(QResizeEvent *ev)
void
KeyframeImport
::
updateDataDisplay
()
{
QString
d
ata
=
m_dataCombo
->
currentData
().
toString
();
m_maximas
=
m_keyframeView
->
loadKeyframes
(
d
ata
);
QString
frameD
ata
=
m_dataCombo
->
currentData
().
toString
();
m_maximas
=
m_keyframeView
->
loadKeyframes
(
frameD
ata
);
double
wDist
=
m_maximas
.
at
(
2
).
y
()
-
m_maximas
.
at
(
2
).
x
();
double
hDist
=
m_maximas
.
at
(
3
).
y
()
-
m_maximas
.
at
(
3
).
x
();
if
(
wDist
==
0
&&
hDist
==
0
)
{
...
...
src/main.cpp
View file @
34672a15
...
...
@@ -75,6 +75,8 @@ int main(int argc, char *argv[])
#ifdef Q_OS_WIN
qputenv
(
"KDE_FORK_SLAVES"
,
"1"
);
QString
path
=
qApp
->
applicationDirPath
()
+
QLatin1Char
(
';'
)
+
qgetenv
(
"PATH"
);
qputenv
(
"PATH"
,
path
.
toUtf8
().
constData
());
#endif
app
.
setApplicationName
(
QStringLiteral
(
"kdenlive"
));
...
...
src/mltconnection.cpp
View file @
34672a15
...
...
@@ -42,17 +42,23 @@ void MltConnection::locateMeltAndProfilesPath(const QString &mltPath)
{
QString
profilePath
=
mltPath
;
//environment variables should override other settings
if
(
profilePath
.
isEmpty
()
||
!
QFile
::
exists
(
profilePath
))
profilePath
=
qgetenv
(
"MLT_PROFILES_PATH"
);
if
(
profilePath
.
isEmpty
()
||
!
QFile
::
exists
(
profilePath
))
profilePath
=
qgetenv
(
"MLT_DATA"
)
+
QStringLiteral
(
"/profiles/"
);
if
(
profilePath
.
isEmpty
()
||
!
QFile
::
exists
(
profilePath
))
profilePath
=
qgetenv
(
"MLT_PREFIX"
)
+
QStringLiteral
(
"/share/mlt/profiles/"
);
if
((
profilePath
.
isEmpty
()
||
!
QFile
::
exists
(
profilePath
))
&&
qEnvironmentVariableIsSet
(
"MLT_PROFILES_PATH"
))
profilePath
=
qgetenv
(
"MLT_PROFILES_PATH"
);
if
((
profilePath
.
isEmpty
()
||
!
QFile
::
exists
(
profilePath
))
&&
qEnvironmentVariableIsSet
(
"MLT_DATA"
))
profilePath
=
qgetenv
(
"MLT_DATA"
)
+
QStringLiteral
(
"/profiles"
);
if
((
profilePath
.
isEmpty
()
||
!
QFile
::
exists
(
profilePath
))
&&
qEnvironmentVariableIsSet
(
"MLT_PREFIX"
))
profilePath
=
qgetenv
(
"MLT_PREFIX"
)
+
QStringLiteral
(
"/share/mlt/profiles"
);
#ifndef Q_OS_WIN
//stored setting should not be considered on windows as MLT is distributed with each new Kdenlive version
if
(
profilePath
.
isEmpty
()
||
!
QFile
::
exists
(
profilePath
))
profilePath
=
KdenliveSettings
::
mltpath
();
if
((
profilePath
.
isEmpty
()
||
!
QFile
::
exists
(
profilePath
))
&&
!
KdenliveSettings
::
mltpath
().
isEmpty
())
profilePath
=
KdenliveSettings
::
mltpath
();
#endif
//try to automatically guess MLT path if installed with the same prefix as kdenlive with default data path
if
(
profilePath
.
isEmpty
()
||
!
QFile
::
exists
(
profilePath
))
profilePath
=
QDir
::
cleanPath
(
qApp
->
applicationDirPath
()
+
QStringLiteral
(
"/../share/mlt/profiles/"
));
if
(
profilePath
.
isEmpty
()
||
!
QFile
::
exists
(
profilePath
))
profilePath
=
QDir
::
cleanPath
(
qApp
->
applicationDirPath
()
+
QStringLiteral
(
"/../share/mlt/profiles"
));
//fallback to build-time definition
if
((
profilePath
.
isEmpty
()
||
!
QFile
::
exists
(
profilePath
))
&&
!
QStringLiteral
(
MLT_DATADIR
).
isEmpty
())
profilePath
=
QStringLiteral
(
MLT_DATADIR
)
+
QStringLiteral
(
"/profiles/"
);
if
((
profilePath
.
isEmpty
()
||
!
QFile
::
exists
(
profilePath
))
&&
!
QStringLiteral
(
MLT_DATADIR
).
isEmpty
())
profilePath
=
QStringLiteral
(
MLT_DATADIR
)
+
QStringLiteral
(
"/profiles"
);
KdenliveSettings
::
setMltpath
(
profilePath
);
#ifdef Q_OS_WIN
...
...
@@ -60,9 +66,15 @@ void MltConnection::locateMeltAndProfilesPath(const QString &mltPath)
#else
QString
exeSuffix
=
""
;
#endif
QString
meltPath
=
qgetenv
(
"MLT_PREFIX"
)
+
QStringLiteral
(
"/bin/melt"
)
+
exeSuffix
;
if
(
!
QFile
::
exists
(
meltPath
))
meltPath
=
QDir
::
cleanPath
(
profilePath
+
QStringLiteral
(
"../../../bin/melt"
)
+
exeSuffix
);
if
(
!
QFile
::
exists
(
meltPath
))
meltPath
=
QStandardPaths
::
findExecutable
(
"melt"
);
QString
meltPath
;
if
(
qEnvironmentVariableIsSet
(
"MLT_PREFIX"
))
meltPath
=
qgetenv
(
"MLT_PREFIX"
)
+
QStringLiteral
(
"/bin/melt"
)
+
exeSuffix
;
if
(
!
QFile
::
exists
(
meltPath
))
{
meltPath
=
QDir
::
cleanPath
(
profilePath
+
QStringLiteral
(
"/../../../bin/melt"
))
+
exeSuffix
;
}
if
(
!
QFile
::
exists
(
meltPath
))
{
meltPath
=
QStandardPaths
::
findExecutable
(
"melt"
);
}
KdenliveSettings
::
setRendererpath
(
meltPath
);
if
(
meltPath
.
isEmpty
())
{
...
...
@@ -82,7 +94,7 @@ void MltConnection::locateMeltAndProfilesPath(const QString &mltPath)
}
}
if
(
profilePath
.
isEmpty
())
{
profilePath
=
QDir
::
cleanPath
(
meltPath
+
QStringLiteral
(
"/../../share/mlt/profiles
/
"
));
profilePath
=
QDir
::
cleanPath
(
meltPath
+
QStringLiteral
(
"/../../share/mlt/profiles"
));
KdenliveSettings
::
setMltpath
(
profilePath
);
}
QStringList
profilesFilter
;
...
...
@@ -92,9 +104,9 @@ void MltConnection::locateMeltAndProfilesPath(const QString &mltPath)
// Cannot find MLT path, try finding melt
if
(
!
meltPath
.
isEmpty
())
{
if
(
meltPath
.
contains
(
QLatin1Char
(
'/'
)))
{
profilePath
=
meltPath
.
section
(
QLatin1Char
(
'/'
),
0
,
-
2
)
+
QStringLiteral
(
"/share/mlt/profiles
/
"
);
profilePath
=
meltPath
.
section
(
QLatin1Char
(
'/'
),
0
,
-
2
)
+
QStringLiteral
(
"/share/mlt/profiles"
);
}
else
{
profilePath
=
qApp
->
applicationDirPath
()
+
QStringLiteral
(
"/share/mlt/profiles
/
"
);
profilePath
=
qApp
->
applicationDirPath
()
+
QStringLiteral
(
"/share/mlt/profiles"
);
}
KdenliveSettings
::
setMltpath
(
profilePath
);
profilesList
=
QDir
(
profilePath
).
entryList
(
profilesFilter
,
QDir
::
Files
);
...
...
src/timeline/keyframeview.cpp
View file @
34672a15
...
...
@@ -376,7 +376,6 @@ QString KeyframeView::getSingleAnimation(int ix, int in, int out, int offset, in
m_keyProperties
.
set
(
"kdenlive_import"
,
""
);
int
newduration
=
out
-
in
+
offset
;
m_keyProperties
.
anim_get_double
(
"kdenlive_import"
,
0
,
newduration
);
Mlt
::
Animation
anim
=
m_keyProperties
.
get_animation
(
"kdenlive_import"
);
double
factor
=
(
max
-
min
)
/
(
maximas
.
y
()
-
maximas
.
x
());
mlt_rect
rect
=
m_keyProperties
.
anim_get_rect
(
m_inTimeline
.
toUtf8
().
constData
(),
in
,
duration
);
double
value
;
...
...
@@ -449,6 +448,7 @@ QString KeyframeView::getSingleAnimation(int ix, int in, int out, int offset, in
next
=
m_keyAnim
.
next_key
(
next
+
1
);
}
}
Mlt
::
Animation
anim
=
m_keyProperties
.
get_animation
(
"kdenlive_import"
);
QString
result
=
anim
.
serialize_cut
();
m_keyProperties
.
set
(
"kdenlive_import"
,
(
char
*
)
nullptr
);
return
result
;
...
...
@@ -461,7 +461,6 @@ QString KeyframeView::getOffsetAnimation(int in, int out, int offset, int limitK
int
pWidth
=
profile
.
profileSize
.
width
();
int
pHeight
=
profile
.
profileSize
.
height
();
m_keyProperties
.
anim_get_double
(
"kdenlive_import"
,
0
,
newduration
);
Mlt
::
Animation
anim
=
m_keyProperties
.
get_animation
(
"kdenlive_import"
);
mlt_keyframe_type
kftype
=
(
limitKeyframes
>
0
&&
allowAnimation
)
?
mlt_keyframe_smooth
:
mlt_keyframe_linear
;
mlt_rect
rect
=
m_keyProperties
.
anim_get_rect
(
m_inTimeline
.
toUtf8
().
constData
(),
in
,
duration
);
rect
.
x
=
(
int
)
rect
.
x
;
...
...
@@ -506,6 +505,7 @@ QString KeyframeView::getOffsetAnimation(int in, int out, int offset, int limitK
m_keyProperties
.
anim_set
(
"kdenlive_import"
,
rect
,
offset
+
pos
-
in
,
newduration
,
kftype
);
}
}
Mlt
::
Animation
anim
=
m_keyProperties
.
get_animation
(
"kdenlive_import"
);
QString
result
=
anim
.
serialize_cut
();
m_keyProperties
.
set
(
"kdenlive_import"
,
(
char
*
)
nullptr
);
return
result
;
...
...
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