[vlmc-devel] Clearly state that a clip length is mesured in frames
Hugo Beauzée-Luyssen
git at videolan.org
Mon Feb 24 16:23:33 CET 2014
vlmc | branch: ibackend | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Feb 24 17:17:53 2014 +0200| [5f971004b644e6e62f0dd7f3c472c5ca173f515f] | committer: Hugo Beauzée-Luyssen
Clearly state that a clip length is mesured in frames
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=5f971004b644e6e62f0dd7f3c472c5ca173f515f
---
src/Gui/timeline/AbstractGraphicsMediaItem.cpp | 2 +-
src/Media/Clip.cpp | 8 ++++----
src/Media/Clip.h | 4 ++--
src/Renderer/ClipRenderer.cpp | 4 ++--
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/Gui/timeline/AbstractGraphicsMediaItem.cpp b/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
index 79567f2..286beda 100644
--- a/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
+++ b/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
@@ -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* ) ),
diff --git a/src/Media/Clip.cpp b/src/Media/Clip.cpp
index d19fa1d..4f514d8 100644
--- a/src/Media/Clip.cpp
+++ b/src/Media/Clip.cpp
@@ -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.1f )
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&
diff --git a/src/Media/Clip.h b/src/Media/Clip.h
index 976bc0a..063e78c 100644
--- a/src/Media/Clip.h
+++ b/src/Media/Clip.h
@@ -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)
*/
diff --git a/src/Renderer/ClipRenderer.cpp b/src/Renderer/ClipRenderer.cpp
index 963e787..bfd05a0 100644
--- a/src/Renderer/ClipRenderer.cpp
+++ b/src/Renderer/ClipRenderer.cpp
@@ -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 );
More information about the Vlmc-devel
mailing list