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

The workflow now takes care of the begin and end of the clip

parent 1083dd76
......@@ -58,7 +58,7 @@ void Library::removingMediaAsked( const QUuid& uuid )
void Library::metaDataComputed( Media* media )
{
Clip* clip = new Clip( media, 0.5f, 1.0f );
Clip* clip = new Clip( media, 0.0f, 0.5f );
m_clips[clip->getUuid()] = clip;
emit newClipLoaded( clip );
}
......
......@@ -91,7 +91,6 @@ void ClipWorkflow::lock( ClipWorkflow* cw, void** pp_ret )
// else
// {
*pp_ret = cw->m_buffer;
// qDebug() << "Clip workflow locking <<<<<<<<<<<<<<<<<<<<<<<<<<";
// }
}
......
......@@ -120,6 +120,7 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentF
if ( needRepositioning == true )
{
float pos = ( (float)( currentFrame - start ) / (float)(cw->getClip()->getLength()) );
pos = pos * ( cw->getClip()->getEnd() - cw->getClip()->getBegin() ) + cw->getClip()->getBegin();
cw->setPosition( pos );
}
ret = cw->getOutput();
......@@ -142,6 +143,7 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentF
if ( start != currentFrame ) //Clip was not started as its real begining
{
float pos = ( (float)( currentFrame - start ) / (float)(cw->getClip()->getLength()) );
pos = pos * ( cw->getClip()->getEnd() - cw->getClip()->getBegin() ) + cw->getClip()->getBegin();
cw->setPosition( pos );
}
}
......@@ -155,6 +157,7 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentF
if ( needRepositioning == true )
{
float pos = ( (float)( currentFrame - start ) / (float)(cw->getClip()->getLength()) );
pos = pos * ( cw->getClip()->getEnd() - cw->getClip()->getBegin() ) + cw->getClip()->getBegin();
cw->setPosition( pos );
}
}
......
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