Skip to content
GitLab
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
6606ae8c
Commit
6606ae8c
authored
Jan 17, 2020
by
Jean-Baptiste Mardelle
Browse files
debug stuff for possible qml producer
parent
03479a84
Pipeline
#13368
passed with stage
in 13 minutes and 41 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/projectclip.cpp
View file @
6606ae8c
...
...
@@ -562,7 +562,7 @@ std::shared_ptr<Mlt::Producer> ProjectClip::getTimelineProducer(int trackId, int
if
(
qFuzzyCompare
(
speed
,
1.0
))
{
// we are requesting a normal speed producer
if
(
trackId
==
-
1
||
(
state
==
PlaylistState
::
VideoOnly
&&
(
m_clipType
==
ClipType
::
Color
||
m_clipType
==
ClipType
::
Image
||
m_clipType
==
ClipType
::
Text
)))
{
(
state
==
PlaylistState
::
VideoOnly
&&
(
m_clipType
==
ClipType
::
Color
||
m_clipType
==
ClipType
::
Image
||
m_clipType
==
ClipType
::
Text
||
m_clipType
==
ClipType
::
Qml
)))
{
// Temporary copy, return clone of master
int
duration
=
m_masterProducer
->
time_to_frames
(
m_masterProducer
->
get
(
"kdenlive:duration"
));
return
std
::
shared_ptr
<
Mlt
::
Producer
>
(
m_masterProducer
->
cut
(
-
1
,
duration
>
0
?
duration
:
-
1
));
...
...
src/definitions.h
View file @
6606ae8c
...
...
@@ -107,7 +107,8 @@ enum ProducerType {
TextTemplate
=
11
,
QText
=
12
,
Composition
=
13
,
Track
=
14
Track
=
14
,
Qml
=
15
};
Q_ENUM_NS
(
ProducerType
)
}
// namespace ClipType
...
...
src/jobs/loadjob.cpp
View file @
6606ae8c
...
...
@@ -76,6 +76,10 @@ ClipType::ProducerType getTypeForService(const QString &id, const QString &path)
if
(
id
==
QLatin1String
(
"webvfx"
))
{
return
ClipType
::
WebVfx
;
}
if
(
id
==
QLatin1String
(
"qml"
))
{
return
ClipType
::
Qml
;
}
return
ClipType
::
Unknown
;
}
...
...
@@ -320,6 +324,24 @@ bool LoadJob::startJob()
case
ClipType
::
QText
:
m_producer
=
loadResource
(
m_resource
,
QStringLiteral
(
"qtext:"
));
break
;
case
ClipType
::
Qml
:
{
bool
ok
;
int
producerLength
=
0
;
QString
pLength
=
Xml
::
getXmlProperty
(
m_xml
,
QStringLiteral
(
"length"
));
if
(
pLength
.
isEmpty
())
{
producerLength
=
m_xml
.
attribute
(
QStringLiteral
(
"length"
)).
toInt
();
}
else
{
producerLength
=
pLength
.
toInt
(
&
ok
);
}
if
(
producerLength
<=
0
)
{
producerLength
=
pCore
->
currentDoc
()
->
getFramePos
(
KdenliveSettings
::
title_duration
());
}
m_producer
=
loadResource
(
m_resource
,
QStringLiteral
(
"qml:"
));
m_producer
->
set
(
"length"
,
producerLength
);
m_producer
->
set
(
"kdenlive:duration"
,
producerLength
);
m_producer
->
set
(
"out"
,
producerLength
-
1
);
break
;
}
case
ClipType
::
Playlist
:
{
m_producer
=
loadPlaylist
(
m_resource
);
if
(
!
m_errorMessage
.
isEmpty
())
{
...
...
src/mltcontroller/clipcontroller.cpp
View file @
6606ae8c
...
...
@@ -252,6 +252,9 @@ void ClipController::getInfoForProducer()
m_clipType
=
ClipType
::
WebVfx
;
}
else
if
(
m_service
==
QLatin1String
(
"qtext"
))
{
m_clipType
=
ClipType
::
QText
;
}
else
if
(
m_service
==
QLatin1String
(
"qml"
))
{
m_clipType
=
ClipType
::
Qml
;
m_hasLimitedDuration
=
false
;
}
else
if
(
m_service
==
QLatin1String
(
"blipflash"
))
{
// Mostly used for testing
m_clipType
=
ClipType
::
AV
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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