Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLMC
Commits
5f971004
Commit
5f971004
authored
Feb 24, 2014
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clearly state that a clip length is mesured in frames
parent
b541b442
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
src/Gui/timeline/AbstractGraphicsMediaItem.cpp
src/Gui/timeline/AbstractGraphicsMediaItem.cpp
+1
-1
src/Media/Clip.cpp
src/Media/Clip.cpp
+4
-4
src/Media/Clip.h
src/Media/Clip.h
+2
-2
src/Renderer/ClipRenderer.cpp
src/Renderer/ClipRenderer.cpp
+2
-2
No files found.
src/Gui/timeline/AbstractGraphicsMediaItem.cpp
View file @
5f971004
...
...
@@ -42,7 +42,7 @@ AbstractGraphicsMediaItem::AbstractGraphicsMediaItem( Clip* clip ) :
{
m_clipHelper
=
new
ClipHelper
(
clip
);
// Adjust the width
setWidth
(
clip
->
length
()
);
setWidth
(
clip
->
nbFrames
()
);
// Automatically adjust future changes
connect
(
m_clipHelper
,
SIGNAL
(
lengthUpdated
()
),
this
,
SLOT
(
adjustLength
()
)
);
connect
(
clip
,
SIGNAL
(
unloaded
(
Clip
*
)
),
...
...
src/Media/Clip.cpp
View file @
5f971004
...
...
@@ -92,9 +92,9 @@ Clip::getMedia() const
}
qint64
Clip
::
length
()
const
Clip
::
nbFrames
()
const
{
return
m_
length
;
return
m_
nbFrames
;
}
qint64
...
...
@@ -109,8 +109,8 @@ Clip::computeLength()
float
fps
=
m_media
->
source
()
->
fps
();
if
(
fps
<
0.1
f
)
fps
=
Clip
::
DefaultFPS
;
m_
length
=
m_end
-
m_begin
;
m_lengthSeconds
=
qRound64
(
(
float
)
m_
length
/
fps
);
m_
nbFrames
=
m_end
-
m_begin
;
m_lengthSeconds
=
qRound64
(
(
float
)
m_
nbFrames
/
fps
);
}
const
QStringList
&
...
...
src/Media/Clip.h
View file @
5f971004
...
...
@@ -83,7 +83,7 @@ class Clip : public QObject
/**
\return Returns the clip length in frame.
*/
qint64
length
()
const
;
qint64
nbFrames
()
const
;
/**
\return Returns the clip length in seconds.
...
...
@@ -161,7 +161,7 @@ class Clip : public QObject
/**
* \brief The length in frames
*/
qint64
m_
length
;
qint64
m_
nbFrames
;
/**
* \brief The length in seconds (Be carreful, VLC uses MILLIseconds)
*/
...
...
src/Renderer/ClipRenderer.cpp
View file @
5f971004
...
...
@@ -66,7 +66,7 @@ ClipRenderer::setClip( Clip* clip )
return
;
}
m_selectedClip
=
clip
;
if
(
clip
->
length
()
==
0
)
if
(
clip
->
nbFrames
()
==
0
)
return
;
updateInfos
(
clip
);
}
...
...
@@ -85,7 +85,7 @@ ClipRenderer::updateInfos( Clip* clip )
void
ClipRenderer
::
startPreview
()
{
if
(
m_selectedClip
==
NULL
||
m_selectedClip
->
length
()
==
0
)
if
(
m_selectedClip
==
NULL
||
m_selectedClip
->
nbFrames
()
==
0
)
return
;
updateInfos
(
m_selectedClip
);
...
...
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