Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLMC
Manage
Activity
Members
Labels
Plan
Issues
26
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLMC
Commits
87bcc392
Commit
87bcc392
authored
8 years ago
by
luyikei
Committed by
Hugo Beauzée-Luyssen
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
SequenceWorkflow: Duplicate a clip in addClip
Signed-off-by:
Hugo Beauzée-Luyssen
<
hugo@beauzee.fr
>
parent
9c1d82d4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Workflow/SequenceWorkflow.cpp
+9
-2
9 additions, 2 deletions
src/Workflow/SequenceWorkflow.cpp
with
9 additions
and
2 deletions
src/Workflow/SequenceWorkflow.cpp
+
9
−
2
View file @
87bcc392
...
...
@@ -33,6 +33,7 @@
#include
"Main/Core.h"
#include
"Library/Library.h"
#include
"Tools/VlmcDebug.h"
#include
"Media/Media.h"
SequenceWorkflow
::
SequenceWorkflow
(
size_t
trackCount
)
:
m_multitrack
(
new
Backend
::
MLT
::
MLTMultiTrack
)
...
...
@@ -76,12 +77,18 @@ SequenceWorkflow::addClip( QSharedPointer<Clip> const& clip, quint32 trackId, qi
QString
SequenceWorkflow
::
addClip
(
const
QUuid
&
uuid
,
quint32
trackId
,
qint32
pos
,
bool
isAudioClip
)
{
auto
new
Clip
=
Core
::
instance
()
->
library
()
->
clip
(
uuid
);
if
(
new
Clip
==
nullptr
)
auto
parent
Clip
=
Core
::
instance
()
->
library
()
->
clip
(
uuid
);
if
(
parent
Clip
==
nullptr
)
{
vlmcCritical
()
<<
"Couldn't find an acceptable parent to be added."
;
return
QUuid
().
toString
();
}
auto
newClip
=
parentClip
->
media
()
->
cut
(
parentClip
->
begin
(),
parentClip
->
end
()
);
if
(
newClip
==
nullptr
)
{
vlmcCritical
()
<<
"Couldn't duplicate the parent clip."
;
return
QUuid
().
toString
();
}
if
(
isAudioClip
==
true
)
newClip
->
setFormats
(
Clip
::
Audio
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment