Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
5b17bf75
Commit
5b17bf75
authored
Sep 15, 2009
by
Hugo Beauzee-Luyssen
Browse files
Fixed clip splitting
parent
5e43f7fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Media/Clip.cpp
View file @
5b17bf75
...
...
@@ -176,19 +176,11 @@ void Clip::setEnd( qint64 end )
emit
lengthUpdated
();
}
Clip
*
Clip
::
split
(
float
newEnd
)
Clip
*
Clip
::
split
(
qint64
endFrame
)
{
Q_ASSERT
(
newEnd
!=
m_end
);
Clip
*
newClip
=
new
Clip
(
this
,
newEnd
,
m_end
);
m_end
=
newEnd
;
Q_ASSERT
(
endFrame
!=
m_end
);
Clip
*
newClip
=
new
Clip
(
this
,
endFrame
,
m_end
);
m_end
=
endFrame
;
computeLength
();
return
newClip
;
}
Clip
*
Clip
::
split
(
qint64
endFrame
)
{
//FIXME the conversion *breaks* clip spliting
//But we don't have any other choice for now, VLC only support float positions!
float
newEnd
=
(
float
)
endFrame
/
m_parent
->
getNbFrames
();
return
split
(
newEnd
);
}
src/Media/Clip.h
View file @
5b17bf75
...
...
@@ -93,14 +93,7 @@ class Clip : public QObject
* newly created Clip.
* \returns A new Clip starting at newEnd.
*/
Clip
*
split
(
float
newEnd
);
/**
* \brief Split this clip in two parts (provided for compatibility)
* \param newEnd The new end for this clip (provided for compatibility)
* \returns A new Clip starting at endFrame.
*/
Clip
*
split
(
qint64
endFrame
);
Clip
*
split
(
qint64
newEndFrame
);
private:
void
computeLength
();
...
...
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