Commit 97ac46d5 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen
Browse files

Corrected duplicated length code

Removed debug
parent db8d7434
...@@ -42,6 +42,7 @@ GraphicsMovieItem::GraphicsMovieItem( Clip* clip ) : m_clip( clip ), m_width( 0 ...@@ -42,6 +42,7 @@ GraphicsMovieItem::GraphicsMovieItem( Clip* clip ) : m_clip( clip ), m_width( 0
// Adjust the width // Adjust the width
setWidth( clip->getLength() ); setWidth( clip->getLength() );
qDebug() << "ClipLength in frames:" << clip->getLength();
// Automatically adjust future changes // Automatically adjust future changes
connect( clip, SIGNAL( lengthUpdated() ), this, SLOT( adjustLength() ) ); connect( clip, SIGNAL( lengthUpdated() ), this, SLOT( adjustLength() ) );
} }
......
...@@ -93,7 +93,7 @@ Media* Clip::getParent() ...@@ -93,7 +93,7 @@ Media* Clip::getParent()
qint64 Clip::getLength() const qint64 Clip::getLength() const
{ {
return m_length / 1000 * m_parent->getFps(); return m_length;
} }
qint64 Clip::getLengthSecond() const qint64 Clip::getLengthSecond() const
...@@ -125,6 +125,7 @@ void Clip::computeLength() ...@@ -125,6 +125,7 @@ void Clip::computeLength()
m_length = 0; m_length = 0;
m_lengthSeconds = 0; m_lengthSeconds = 0;
} }
qDebug() << "Length ==" << m_length << "and in seconds:" << m_lengthSeconds;
} }
const QStringList& Clip::getMetaTags() const const QStringList& Clip::getMetaTags() const
......
...@@ -80,15 +80,12 @@ void* WorkflowRenderer::lock( void* datas ) ...@@ -80,15 +80,12 @@ void* WorkflowRenderer::lock( void* datas )
{ {
WorkflowRenderer* self = reinterpret_cast<WorkflowRenderer*>( datas ); WorkflowRenderer* self = reinterpret_cast<WorkflowRenderer*>( datas );
qDebug() << "WorkflowRenderer::lock";
if ( self->m_stopping == false ) if ( self->m_stopping == false )
{ {
qDebug() << "WorkflowRenderer::lock -> rendering";
void* ret = self->m_mainWorkflow->getSynchroneOutput(); void* ret = self->m_mainWorkflow->getSynchroneOutput();
self->m_lastFrame = static_cast<unsigned char*>( ret ); self->m_lastFrame = static_cast<unsigned char*>( ret );
return ret; return ret;
} }
qDebug() << "WorkflowRenderer::endOfLock";
return self->m_lastFrame; return self->m_lastFrame;
} }
...@@ -245,16 +242,13 @@ void WorkflowRenderer::internalPlayPause( bool forcePause ) ...@@ -245,16 +242,13 @@ void WorkflowRenderer::internalPlayPause( bool forcePause )
void WorkflowRenderer::stop() void WorkflowRenderer::stop()
{ {
qDebug() << "Stopping workflowrenderer";
m_isRendering = false; m_isRendering = false;
m_paused = false; m_paused = false;
m_pauseAsked = false; m_pauseAsked = false;
m_unpauseAsked = false; m_unpauseAsked = false;
m_stopping = true; m_stopping = true;
m_mainWorkflow->cancelSynchronisation(); m_mainWorkflow->cancelSynchronisation();
qDebug() << "Stopping media player";
m_mediaPlayer->stop(); m_mediaPlayer->stop();
qDebug() << "Media player stopped";
m_mainWorkflow->stop(); m_mainWorkflow->stop();
} }
...@@ -264,7 +258,6 @@ void WorkflowRenderer::stop() ...@@ -264,7 +258,6 @@ void WorkflowRenderer::stop()
void WorkflowRenderer::__endReached() void WorkflowRenderer::__endReached()
{ {
qDebug() << "Stopping rendering";
stopPreview(); stopPreview();
emit endReached(); emit endReached();
} }
......
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