Commit 2c2c3c81 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Adding duration for the render preview.

There's still some problems on the workflow rendering if we specify a
length.
parent 2b66487b
...@@ -42,6 +42,8 @@ void WorkflowFileRenderer::run() ...@@ -42,6 +42,8 @@ void WorkflowFileRenderer::run()
m_media->addOption( buffer ); m_media->addOption( buffer );
m_media->addOption( ":no-audio" ); m_media->addOption( ":no-audio" );
m_media->addOption( ":fake" ); m_media->addOption( ":fake" );
sprintf(buffer, ":fake-duration=%lli", m_mainWorkflow->getLength() );
// m_media->addOption( buffer );
QString transcodeStr = "sout=#transcode{vcodec=mp4v,vb=800,acodec=mpga,ab=128}" QString transcodeStr = "sout=#transcode{vcodec=mp4v,vb=800,acodec=mpga,ab=128}"
":standard{access=file,mux=ps,dst=\"" ":standard{access=file,mux=ps,dst=\""
......
...@@ -108,9 +108,13 @@ void RenderPreviewWidget::stopPreview() ...@@ -108,9 +108,13 @@ void RenderPreviewWidget::stopPreview()
void RenderPreviewWidget::startPreview( Media* ) void RenderPreviewWidget::startPreview( Media* )
{ {
char buff[128];
connect( m_mainWorkflow, SIGNAL( frameChanged(qint64) ), connect( m_mainWorkflow, SIGNAL( frameChanged(qint64) ),
Timeline::getInstance()->tracksView()->tracksCursor(), SLOT( updateCursorPos( qint64 ) ) ); Timeline::getInstance()->tracksView()->tracksCursor(), SLOT( updateCursorPos( qint64 ) ) );
m_mainWorkflow->startRender(); m_mainWorkflow->startRender();
sprintf( buff, ":fake-duration=%lli", m_mainWorkflow->getLength() / FPS * 1000 );
m_media->addOption( buff );
m_mediaPlayer->play(); m_mediaPlayer->play();
m_isRendering = true; m_isRendering = true;
m_paused = false; m_paused = false;
......
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