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
97f71883
Commit
97f71883
authored
Jul 30, 2021
by
Jean-Baptiste Mardelle
Browse files
Fix motion tracker effect broken for timeline cut clips.
Related to
#1151
parent
cdf7db35
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/jobs/filtertask.cpp
View file @
97f71883
...
...
@@ -71,7 +71,7 @@ void FilterTask::run()
QString
url
;
auto
binClip
=
pCore
->
projectItemModel
()
->
getClipByBinID
(
m_binId
);
std
::
unique_ptr
<
Mlt
::
Producer
>
producer
;
std
::
unique_ptr
<
Mlt
::
Producer
>
wholeProducer
;
//
std::unique_ptr<Mlt::Producer> wholeProducer;
Mlt
::
Profile
profile
(
pCore
->
getCurrentProfilePath
().
toUtf8
().
constData
());
if
(
binClip
)
{
// Filter applied on a timeline or bin clip
...
...
@@ -104,8 +104,9 @@ void FilterTask::run()
m_inPoint
=
0
;
}
if
(
m_inPoint
!=
0
||
m_outPoint
!=
producer
->
get_length
()
-
1
)
{
std
::
swap
(
wholeProducer
,
producer
);
producer
.
reset
(
wholeProducer
->
cut
(
m_inPoint
,
m_outPoint
));
producer
->
set_in_and_out
(
m_inPoint
,
m_outPoint
);
//std::swap(wholeProducer, producer);
//producer.reset(wholeProducer->cut(m_inPoint, m_outPoint));
}
}
else
{
// Filter applied on a track of master producer, leave config to source job
...
...
@@ -187,7 +188,7 @@ void FilterTask::run()
consumer
->
run
();
consumer
.
reset
();
producer
.
reset
();
wholeProducer
.
reset
();
//
wholeProducer.reset();
QFile
f1
(
sourceFile
.
fileName
());
f1
.
open
(
QIODevice
::
ReadOnly
);
...
...
@@ -258,7 +259,11 @@ void FilterTask::run()
}
params
.
append
({
key
,
QVariant
(
resultData
)});
qDebug
()
<<
"= = = GOT FILTER RESULTS: "
<<
params
;
if
(
m_inPoint
>
0
&&
(
m_filterData
.
find
(
QLatin1String
(
"relativeInOut"
))
!=
m_filterData
.
end
()))
{
// Motion tracker keyframes always start at master clip 0, so we need to set in/out points
params
.
append
({
QStringLiteral
(
"in"
),
m_inPoint
});
params
.
append
({
QStringLiteral
(
"out"
),
m_outPoint
});
}
if
(
m_filterData
.
find
(
QStringLiteral
(
"storedata"
))
!=
m_filterData
.
end
())
{
// Store a copy of the data in clip analysis
QString
dataName
=
(
m_filterData
.
find
(
QStringLiteral
(
"displaydataname"
))
!=
m_filterData
.
end
())
?
m_filterData
.
at
(
QStringLiteral
(
"displaydataname"
))
:
QStringLiteral
(
"data"
);
...
...
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