[vlmc-devel] [PATCH 11/12] RendererSettings: Read/Write AudioBitrate and VideoBitrate from/to the project
Yikai Lu
luyikei.qmltu at gmail.com
Wed Apr 6 09:58:24 CEST 2016
---
src/Gui/export/RendererSettings.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/Gui/export/RendererSettings.cpp b/src/Gui/export/RendererSettings.cpp
index 7960726..90090e5 100644
--- a/src/Gui/export/RendererSettings.cpp
+++ b/src/Gui/export/RendererSettings.cpp
@@ -51,6 +51,8 @@ RendererSettings::RendererSettings( bool shareOnInternet )
m_ui.width->setValue( project->width() );
m_ui.height->setValue( project->height() );
m_ui.fps->setValue( project->fps() );
+ m_ui.videoQuality->setValue( project->videoBitrate() );
+ m_ui.audioQuality->setValue( project->audioBitrate() );
QCompleter* completer = new QCompleter( this );
completer->setModel( new QDirModel( completer ) );
@@ -113,7 +115,7 @@ RendererSettings::accept()
{
auto project = Core::instance()->project();
- if ( width() <= 0 || height() <= 0 || fps() <= .0f )
+ if ( width() <= 0 || height() <= 0 || fps() <= .0f || audioBitrate() <= 0 || videoBitrate() <= 0 )
{
QMessageBox::warning( this, tr( "Invalid parameters" ),
tr( "Please enter valid rendering parameters" ) );
@@ -124,6 +126,8 @@ RendererSettings::accept()
project->setFps( fps() );
project->setHeight( height() );
project->setWidth( width() );
+ project->setAudioBitrate( audioBitrate() );
+ project->setVideoBitrate( videoBitrate() );
}
QFileInfo fileInfo( m_ui.outputFileName->text() );
--
1.9.1
More information about the Vlmc-devel
mailing list