Commit d3f1275c authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Renamed MainWorkflow::getLength to MainWorkflow::getLengthFrame

parent 01669f05
......@@ -354,7 +354,7 @@ void MainWindow::on_actionTranscode_triggered()
void MainWindow::on_actionRender_triggered()
{
if ( MainWorkflow::getInstance()->getLength() <= 0 )
if ( MainWorkflow::getInstance()->getLengthFrame() <= 0 )
{
QMessageBox::warning( NULL, "VLMC Renderer", "There is nothing to render." );
return ;
......
......@@ -149,7 +149,7 @@ void WorkflowRenderer::checkActions()
void WorkflowRenderer::startPreview()
{
if ( m_mainWorkflow->getLength() <= 0 )
if ( m_mainWorkflow->getLengthFrame() <= 0 )
return ;
m_mediaPlayer->setMedia( m_media );
......
......@@ -32,7 +32,7 @@
MainWorkflow::MainWorkflow( int trackCount ) :
m_currentFrame( 0 ),
m_length( 0 ),
m_lengthFrame( 0 ),
m_renderStarted( false )
{
m_renderStartedLock = new QReadWriteLock;
......@@ -94,7 +94,7 @@ void MainWorkflow::computeLength()
if ( m_tracks[i]->getLength() > maxLength )
maxLength = m_tracks[i]->getLength();
}
m_length = maxLength;
m_lengthFrame = maxLength;
}
void MainWorkflow::startRender()
......@@ -140,14 +140,14 @@ void MainWorkflow::nextFrame()
{
++m_currentFrame;
emit frameChanged( m_currentFrame );
emit positionChanged( (float)m_currentFrame / (float)m_length );
emit positionChanged( (float)m_currentFrame / (float)m_lengthFrame );
}
void MainWorkflow::previousFrame()
{
--m_currentFrame;
emit frameChanged( m_currentFrame );
emit positionChanged( (float)m_currentFrame / (float)m_length );
emit positionChanged( (float)m_currentFrame / (float)m_lengthFrame );
}
void MainWorkflow::setPosition( float pos )
......@@ -159,15 +159,15 @@ void MainWorkflow::setPosition( float pos )
for ( unsigned int i = 0; i < TrackWorkflow::NbType; ++i)
m_tracks[i]->activateAll();
}
qint64 frame = static_cast<qint64>( (float)m_length * pos );
qint64 frame = static_cast<qint64>( (float)m_lengthFrame * pos );
m_currentFrame = frame;
emit frameChanged( frame );
//Do not emit a signal for the RenderWidget, since it's the one that triggered that call...
}
qint64 MainWorkflow::getLength() const
qint64 MainWorkflow::getLengthFrame() const
{
return m_length;
return m_lengthFrame;
}
qint64 MainWorkflow::getClipPosition( const QUuid& uuid, unsigned int trackId, TrackWorkflow::TrackType trackType ) const
......@@ -241,7 +241,7 @@ void MainWorkflow::unmuteTrack( unsigned int trackId, TrackWorkflow::Trac
void MainWorkflow::setCurrentFrame( qint64 currentFrame )
{
m_currentFrame = currentFrame;
emit positionChanged( (float)m_currentFrame / (float)m_length );
emit positionChanged( (float)m_currentFrame / (float)m_lengthFrame );
}
Clip* MainWorkflow::getClip( const QUuid& uuid, unsigned int trackId, TrackWorkflow::TrackType trackType )
......
......@@ -70,7 +70,7 @@ class MainWorkflow : public QObject, public Singleton<MainWorkflow>
* \return Returns the global length of the workflow
* in frames.
*/
qint64 getLength() const;
qint64 getLengthFrame() const;
/**
* Stop the workflow (including sub track workflows and clip workflows)
......@@ -126,7 +126,7 @@ class MainWorkflow : public QObject, public Singleton<MainWorkflow>
private:
qint64 m_currentFrame;
qint64 m_length;
qint64 m_lengthFrame;
/**
* This boolean describe is a render has been started
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment