Commit 10ba56e9 authored by Clement CHAVANCE's avatar Clement CHAVANCE

Replaced all define by the settings value

Also, removed all the calls to the default part of the
SettingsManager
parent a3fbd0fb
......@@ -38,7 +38,7 @@ TracksRuler::TracksRuler( TracksView* tracksView, QWidget* parent )
//TODO We should really get that from the
// workflow and not directly from the settings.
SettingsManager* settings = SettingsManager::getInstance();
m_fps = qRound( settings->getValue( "default", "VLMCPreviewFPS" ).toDouble() );
m_fps = qRound( settings->getValue( "VLMC", "VLMCOutPutFPS" ).toDouble() );
m_factor = 1;
m_scale = 3;
......
......@@ -26,6 +26,8 @@
#include "MetaDataWorker.h"
#include "Library.h"
const int Clip::DefaultFPS = 30;
MetaDataWorker::MetaDataWorker( LibVLCpp::MediaPlayer* mediaPlayer, Media* media, MetaDataWorker::MetaDataType type ) :
m_mediaPlayer( mediaPlayer ),
m_type( type ),
......@@ -97,7 +99,7 @@ void MetaDataWorker::getMetaData()
if ( m_media->getFps() == .0f )
{
qWarning() << "Invalid FPS for media:" << m_media->getFileInfo()->absoluteFilePath();
m_media->setFps( FPS );
m_media->setFps( Clip::DefaultFPS );
}
m_media->setNbFrames( (m_media->getLengthMS() / 1000) * m_media->getFps() );
// connect( m_mediaPlayer, SIGNAL( stopped () ), this, SLOT( mediaPlayerStopped() ), Qt::QueuedConnection );
......
......@@ -41,18 +41,20 @@ void WorkflowFileRenderer::run()
{
char buffer[256];
m_outputFps = SettingsManager::getInstance()->getValue( "VLMC", "VLMCOutPutFPS" ).toDouble();
//Media as already been created an mainly initialized by the WorkflowRenderer
m_media->addOption( ":no-audio" );
m_media->addOption( "no-sout-audio" );
m_media->addOption( ":fake" );
sprintf(buffer, ":fake-fps=%i", FPS );
m_media->addOption( buffer );
//sprintf(buffer, ":fake-fps=%i", FPS );
//m_media->addOption( buffer );
QString transcodeStr = ":sout=#transcode{vcodec=mp4v,vb=800,acodec=mpga,ab=128,no-hurry-up}"
":standard{access=file,mux=ps,dst=\""
+ m_outputFileName + "\"}";
m_media->addOption( transcodeStr.toStdString().c_str() );
sprintf( buffer, ":sout-transcode-fps=%f", (float)FPS );
sprintf( buffer, ":sout-transcode-fps=%f", m_outputFps );
m_media->addOption( buffer );
m_mediaPlayer->setMedia( m_media );
......@@ -64,7 +66,6 @@ void WorkflowFileRenderer::run()
m_isRendering = true;
m_stopping = false;
m_outputFps = SettingsManager::getInstance()->getValue( "default", "VLMCOutPutFPS" ).toDouble();
m_mainWorkflow->setFullSpeedRender( true );
m_mainWorkflow->startRender();
......
......@@ -142,7 +142,7 @@ void WorkflowRenderer::startPreview()
m_isRendering = true;
m_paused = false;
m_stopping = false;
m_outputFps = SettingsManager::getInstance()->getValue( "default", "VLMCPreviewFPS" ).toDouble();
m_outputFps = SettingsManager::getInstance()->getValue( "VLMC", "VLMCOutPutFPS" ).toDouble();
}
void WorkflowRenderer::nextFrame()
......
......@@ -69,7 +69,7 @@ void VideoClipWorkflow::initVlcOutput()
m_vlcMedia->addOption( buffer );
//Forced output fps
sprintf( buffer, ":sout-transcode-fps=%f", (float)FPS );
sprintf( buffer, ":sout-transcode-fps=%f", (float)Clip::DefaultFPS );
m_vlcMedia->addOption( buffer );
//sprintf( buffer, "sout-smem-video-pitch=%i", VIDEOWIDTH * 3 );
......
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