Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
259
Issues
259
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
bedee196
Commit
bedee196
authored
May 10, 2018
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Audio mix now only on audio tracks
parent
d791c345
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
src/doc/kdenlivedoc.cpp
src/doc/kdenlivedoc.cpp
+1
-1
src/timeline2/model/timelineitemmodel.cpp
src/timeline2/model/timelineitemmodel.cpp
+10
-9
No files found.
src/doc/kdenlivedoc.cpp
View file @
bedee196
...
@@ -370,7 +370,7 @@ QDomDocument KdenliveDoc::createEmptyDocument(const QList<TrackInfo> &tracks)
...
@@ -370,7 +370,7 @@ QDomDocument KdenliveDoc::createEmptyDocument(const QList<TrackInfo> &tracks)
QString
compositeService
=
TransitionsRepository
::
get
()
->
getCompositingTransition
();
QString
compositeService
=
TransitionsRepository
::
get
()
->
getCompositingTransition
();
if
(
!
compositeService
.
isEmpty
())
{
if
(
!
compositeService
.
isEmpty
())
{
for
(
int
i
=
0
;
i
<=
tracks
.
count
();
i
++
)
{
for
(
int
i
=
0
;
i
<=
tracks
.
count
();
i
++
)
{
if
(
i
>
0
)
{
if
(
i
>
0
&&
tracks
.
at
(
i
-
1
).
type
==
AudioTrack
)
{
Mlt
::
Transition
tr
(
docProfile
,
"mix"
);
Mlt
::
Transition
tr
(
docProfile
,
"mix"
);
tr
.
set
(
"a_track"
,
0
);
tr
.
set
(
"a_track"
,
0
);
tr
.
set
(
"b_track"
,
i
);
tr
.
set
(
"b_track"
,
i
);
...
...
src/timeline2/model/timelineitemmodel.cpp
View file @
bedee196
...
@@ -400,7 +400,7 @@ int TimelineItemModel::getFirstVideoTrackIndex() const
...
@@ -400,7 +400,7 @@ int TimelineItemModel::getFirstVideoTrackIndex() const
auto
it
=
m_allTracks
.
cbegin
();
auto
it
=
m_allTracks
.
cbegin
();
while
(
it
!=
m_allTracks
.
cend
())
{
while
(
it
!=
m_allTracks
.
cend
())
{
trackId
=
getTrackMltIndex
((
*
it
)
->
getId
());
trackId
=
getTrackMltIndex
((
*
it
)
->
getId
());
if
(
(
*
it
)
->
getProperty
(
"kdenlive:audio_track"
).
toInt
()
!=
1
)
{
if
(
!
(
*
it
)
->
isAudioTrack
()
)
{
break
;
break
;
}
}
++
it
;
++
it
;
...
@@ -423,21 +423,22 @@ void TimelineItemModel::buildTrackCompositing()
...
@@ -423,21 +423,22 @@ void TimelineItemModel::buildTrackCompositing()
QString
composite
=
TransitionsRepository
::
get
()
->
getCompositingTransition
();
QString
composite
=
TransitionsRepository
::
get
()
->
getCompositingTransition
();
while
(
it
!=
m_allTracks
.
cend
())
{
while
(
it
!=
m_allTracks
.
cend
())
{
int
trackId
=
getTrackMltIndex
((
*
it
)
->
getId
());
int
trackId
=
getTrackMltIndex
((
*
it
)
->
getId
());
if
(
!
composite
.
isEmpty
()
&&
(
*
it
)
->
getProperty
(
"kdenlive:audio_track"
).
toInt
()
!=
1
)
{
if
(
!
composite
.
isEmpty
()
&&
!
(
*
it
)
->
isAudioTrack
()
)
{
// video track, add composition
// video track, add composition
Mlt
::
Transition
*
transition
=
TransitionsRepository
::
get
()
->
getTransition
(
composite
);
Mlt
::
Transition
*
transition
=
TransitionsRepository
::
get
()
->
getTransition
(
composite
);
transition
->
set
(
"internal_added"
,
237
);
transition
->
set
(
"internal_added"
,
237
);
transition
->
set
(
"always_active"
,
1
);
transition
->
set
(
"always_active"
,
1
);
field
->
plant_transition
(
*
transition
,
0
,
trackId
);
field
->
plant_transition
(
*
transition
,
0
,
trackId
);
transition
->
set_tracks
(
0
,
trackId
);
transition
->
set_tracks
(
0
,
trackId
);
}
else
if
((
*
it
)
->
isAudioTrack
())
{
// audio mix
Mlt
::
Transition
*
transition
=
TransitionsRepository
::
get
()
->
getTransition
(
QStringLiteral
(
"mix"
));
transition
->
set
(
"internal_added"
,
237
);
transition
->
set
(
"always_active"
,
1
);
transition
->
set
(
"sum"
,
1
);
field
->
plant_transition
(
*
transition
,
0
,
trackId
);
transition
->
set_tracks
(
0
,
trackId
);
}
}
// audio mix
Mlt
::
Transition
*
transition
=
TransitionsRepository
::
get
()
->
getTransition
(
QStringLiteral
(
"mix"
));
transition
->
set
(
"internal_added"
,
237
);
transition
->
set
(
"always_active"
,
1
);
transition
->
set
(
"sum"
,
1
);
field
->
plant_transition
(
*
transition
,
0
,
trackId
);
transition
->
set_tracks
(
0
,
trackId
);
++
it
;
++
it
;
}
}
field
->
unlock
();
field
->
unlock
();
...
...
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