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
72c7ad1f
Commit
72c7ad1f
authored
Mar 05, 2020
by
Jean-Baptiste Mardelle
Browse files
minor cleanup
parent
a6bff2f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/timeline2/model/timelineitemmodel.cpp
View file @
72c7ad1f
...
...
@@ -559,11 +559,11 @@ void TimelineItemModel::notifyChange(const QModelIndex &topleft, const QModelInd
void
TimelineItemModel
::
buildTrackCompositing
(
bool
rebuild
)
{
auto
it
=
m_allTracks
.
cbegin
();
QScopedPointer
<
Mlt
::
Service
>
service
(
m_tractor
->
field
());
QScopedPointer
<
Mlt
::
Field
>
field
(
m_tractor
->
field
());
field
->
lock
();
// Make sure all previous track compositing is removed
if
(
rebuild
)
{
QScopedPointer
<
Mlt
::
Service
>
service
(
m_tractor
->
field
());
while
(
service
!=
nullptr
&&
service
->
is_valid
())
{
if
(
service
->
type
()
==
transition_type
)
{
Mlt
::
Transition
t
((
mlt_transition
)
service
->
get_service
());
...
...
@@ -589,7 +589,7 @@ void TimelineItemModel::buildTrackCompositing(bool rebuild)
transition
->
set
(
"internal_added"
,
237
);
transition
->
set
(
"always_active"
,
1
);
transition
->
set_tracks
(
0
,
trackPos
);
field
->
plant_transition
(
*
transition
,
0
,
trackPos
);
field
->
plant_transition
(
*
transition
.
get
()
,
0
,
trackPos
);
}
else
if
((
*
it
)
->
isAudioTrack
())
{
// audio mix
std
::
unique_ptr
<
Mlt
::
Transition
>
transition
=
TransitionsRepository
::
get
()
->
getTransition
(
QStringLiteral
(
"mix"
));
...
...
@@ -597,7 +597,7 @@ void TimelineItemModel::buildTrackCompositing(bool rebuild)
transition
->
set
(
"always_active"
,
1
);
transition
->
set
(
"sum"
,
1
);
transition
->
set_tracks
(
0
,
trackPos
);
field
->
plant_transition
(
*
transition
,
0
,
trackPos
);
field
->
plant_transition
(
*
transition
.
get
()
,
0
,
trackPos
);
if
(
hasMixer
)
{
pCore
->
mixer
()
->
registerTrack
((
*
it
)
->
getId
(),
(
*
it
)
->
getTrackService
(),
getTrackTagById
((
*
it
)
->
getId
()));
}
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
72c7ad1f
...
...
@@ -1706,6 +1706,7 @@ void TimelineController::switchCompositing(int mode)
if
(
t
.
get_int
(
"internal_added"
)
==
237
&&
serviceName
!=
QLatin1String
(
"mix"
))
{
// remove all compositing transitions
field
->
disconnect_service
(
t
);
t
.
disconnect_all_producers
();
}
}
service
.
reset
(
service
->
producer
());
...
...
src/transitions/transitionsrepository.cpp
View file @
72c7ad1f
...
...
@@ -156,7 +156,7 @@ std::unique_ptr<Mlt::Transition> TransitionsRepository::getTransition(const QStr
Q_ASSERT
(
exists
(
transitionId
));
QString
service_name
=
m_assets
.
at
(
transitionId
).
mltId
;
// We create the Mlt element from its name
auto
transition
=
std
::
make_unique
<
Mlt
::
Transition
>
(
pCore
->
getCurrentProfile
()
->
profile
(),
service_name
.
to
Latin1
().
constData
()
,
nullptr
);
auto
transition
=
std
::
make_unique
<
Mlt
::
Transition
>
(
pCore
->
getCurrentProfile
()
->
profile
(),
service_name
.
to
Utf8
().
constData
());
transition
->
set
(
"kdenlive_id"
,
transitionId
.
toUtf8
().
constData
());
return
transition
;
}
...
...
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