Commit 01addde3 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Solved multiple bugs/crash

Solved remaining sout instance, that was preventing two video to be used successively.
Solved crash (stack overflow) when changing position after the workflow reached its end once.
Solved incoherent use of a media player after it has been released
Removed useless code.
parent 4b39741c
......@@ -122,13 +122,6 @@ void WorkflowRenderer::checkActions()
}
}
void WorkflowRenderer::stopPreview()
{
disconnect( m_mainWorkflow, SIGNAL( frameChanged(qint64) ),
Timeline::getInstance()->tracksView()->tracksCursor(), SLOT( setCursorPos( qint64 ) ) );
stop();
}
void WorkflowRenderer::startPreview()
{
if ( m_mainWorkflow->getLength() <= 0 )
......@@ -259,7 +252,7 @@ void WorkflowRenderer::stop()
void WorkflowRenderer::__endReached()
{
stopPreview();
stop();
emit endReached();
}
......
......@@ -45,11 +45,8 @@ class WorkflowRenderer : public GenericRenderer
WorkflowRenderer();
~WorkflowRenderer();
void stopPreview();
/**
\brief Set the preview position
\param newPos : The new position in vlc position (between
0 and 1)
*/
......
......@@ -47,7 +47,7 @@ public:
{
QMutexLocker lock( m_mutex );
toRelease->~T();
m_pool.enqueue( toRelease );
m_pool.enqueue( reinterpret_cast<uint8_t*>( toRelease ) );
}
private:
Pool()
......@@ -60,7 +60,7 @@ private:
{
while ( m_pool.size() != 0 )
{
T* ptr = m_pool.dequeue();
uint8_t* ptr = m_pool.dequeue();
delete ptr;
}
delete m_mutex;
......
......@@ -138,6 +138,7 @@ void ClipWorkflow::setVmem()
m_vlcMedia->setUnlockCallback( reinterpret_cast<LibVLCpp::Media::unlockCallback>( &ClipWorkflow::unlock ) );
m_vlcMedia->addOption( ":sout-transcode-vcodec=RV24" );
m_vlcMedia->addOption( ":sout-transcode-acodec=s16l" );
// m_vlcMedia->addOption( ":no-sout-keep" );
if ( m_fullSpeedRender == true )
m_vlcMedia->addOption( ":sout-sync" );
......@@ -251,8 +252,9 @@ void ClipWorkflow::stop()
if ( m_mediaPlayer )
{
m_mediaPlayer->stop();
Pool<LibVLCpp::MediaPlayer>::getInstance()->release( m_mediaPlayer );
disconnect( m_mediaPlayer, SIGNAL( endReached() ), this, SLOT( clipEndReached() ) );
Pool<LibVLCpp::MediaPlayer>::getInstance()->release( m_mediaPlayer );
// qDebug() << "Setting media player to NULL";
m_mediaPlayer = NULL;
setState( Stopped );
......
......@@ -197,7 +197,6 @@ void MainWorkflow::setPosition( float pos )
qint64 frame = static_cast<qint64>( (float)m_length * pos );
m_currentFrame = frame;
emit frameChanged( frame );
// cancelSynchronisation();
//Do not emit a signal for the RenderWidget, since it's the one that triggered that call...
}
......
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