[vlmc-devel] [PATCH] ProjectWizard: Add Audio bitrate and Video bitrate

Yikai Lu luyikei.qmltu at gmail.com
Sun Apr 10 07:04:59 CEST 2016


---
 src/Gui/wizard/ProjectWizard.cpp |   2 +
 src/Gui/wizard/VideoPage.cpp     |   2 +
 src/Gui/wizard/ui/VideoPage.ui   | 284 ++++++++++++++++++++++-----------------
 3 files changed, 166 insertions(+), 122 deletions(-)

diff --git a/src/Gui/wizard/ProjectWizard.cpp b/src/Gui/wizard/ProjectWizard.cpp
index 7354da5..5607b29 100644
--- a/src/Gui/wizard/ProjectWizard.cpp
+++ b/src/Gui/wizard/ProjectWizard.cpp
@@ -112,7 +112,9 @@ ProjectWizard::accept()
         projectPreferences->setValue( "video/VideoProjectHeight", field( "height" ) );
         projectPreferences->setValue( "video/VideoProjectWidth", field( "width" ) );
         projectPreferences->setValue( "video/AspectRatio", field( "aspectratio" ) );
+        projectPreferences->setValue( "video/VideoBitRate", field( "vbitrate" ) );
         projectPreferences->setValue( "audio/AudioSampleRate", field( "samplerate" ) );
+        projectPreferences->setValue( "audio/AudioBitRate", field( "abitrate" ) );
         projectPreferences->setValue( "audio/NbChannels", field( "samplerate" ) );
     }
     QDialog::accept();
diff --git a/src/Gui/wizard/VideoPage.cpp b/src/Gui/wizard/VideoPage.cpp
index c49dfea..1700f5c 100644
--- a/src/Gui/wizard/VideoPage.cpp
+++ b/src/Gui/wizard/VideoPage.cpp
@@ -43,6 +43,8 @@ VideoPage::VideoPage( QWidget* parent ) :
     registerField( "aspectratio", ui.lineEditVideoAspectRatio );
     registerField( "samplerate", ui.comboBoxAudioSamplerate );
     registerField( "channels", ui.spinBoxAudioChannels );
+    registerField( "abitrate", ui.spinBoxAudioBitrate );
+    registerField( "vbitrate", ui.spinBoxVideoBitrate );
 }
 
 void
diff --git a/src/Gui/wizard/ui/VideoPage.ui b/src/Gui/wizard/ui/VideoPage.ui
index 90f6848..fe50563 100644
--- a/src/Gui/wizard/ui/VideoPage.ui
+++ b/src/Gui/wizard/ui/VideoPage.ui
@@ -30,6 +30,153 @@
      </property>
     </widget>
    </item>
+   <item row="4" column="0" colspan="2">
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="title">
+      <string>Audio</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_3">
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_6">
+        <property name="text">
+         <string>Number of channels</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QSpinBox" name="spinBoxAudioChannels">
+        <property name="minimum">
+         <number>1</number>
+        </property>
+        <property name="maximum">
+         <number>2</number>
+        </property>
+        <property name="value">
+         <number>2</number>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" colspan="2">
+       <widget class="QComboBox" name="comboBoxAudioPresets">
+        <item>
+         <property name="text">
+          <string>Custom</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Stereo</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Mono</string>
+         </property>
+        </item>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>Sample rate</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="2">
+       <widget class="QComboBox" name="comboBoxAudioSamplerate">
+        <property name="currentIndex">
+         <number>0</number>
+        </property>
+        <item>
+         <property name="text">
+          <string>48000 Hz</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>44100 Hz</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>22050 Hz</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>11025 Hz</string>
+         </property>
+        </item>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_9">
+        <property name="text">
+         <string>Audio bitrate (kbps)</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2">
+       <widget class="QSpinBox" name="spinBoxAudioBitrate">
+        <property name="minimum">
+         <number>8</number>
+        </property>
+        <property name="maximum">
+         <number>512</number>
+        </property>
+        <property name="value">
+         <number>256</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="1" column="0" colspan="2">
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Maximum</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>30</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="3" column="0" colspan="2">
+    <spacer name="verticalSpacer_2">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Maximum</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>30</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="5" column="0" colspan="2">
+    <spacer name="verticalSpacer_3">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
    <item row="2" column="0" colspan="2">
     <widget class="QGroupBox" name="groupBox">
      <property name="title">
@@ -120,6 +267,13 @@
         </property>
        </widget>
       </item>
+      <item row="4" column="2">
+       <widget class="QLineEdit" name="lineEditVideoAspectRatio">
+        <property name="text">
+         <string>16/9</string>
+        </property>
+       </widget>
+      </item>
       <item row="3" column="0">
        <widget class="QLabel" name="label_5">
         <property name="text">
@@ -143,10 +297,10 @@
         </property>
        </widget>
       </item>
-      <item row="4" column="2">
-       <widget class="QLineEdit" name="lineEditVideoAspectRatio">
+      <item row="5" column="0">
+       <widget class="QLabel" name="label_8">
         <property name="text">
-         <string>16/9</string>
+         <string>Video bitrate (kbps)</string>
         </property>
        </widget>
       </item>
@@ -157,136 +311,22 @@
         </property>
        </widget>
       </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="4" column="0" colspan="2">
-    <widget class="QGroupBox" name="groupBox_2">
-     <property name="title">
-      <string>Audio</string>
-     </property>
-     <layout class="QGridLayout" name="gridLayout_3">
-      <item row="1" column="0">
-       <widget class="QLabel" name="label_6">
-        <property name="text">
-         <string>Number of channels</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="2">
-       <widget class="QSpinBox" name="spinBoxAudioChannels">
+      <item row="5" column="2">
+       <widget class="QSpinBox" name="spinBoxVideoBitrate">
         <property name="minimum">
-         <number>1</number>
+         <number>8</number>
         </property>
         <property name="maximum">
-         <number>2</number>
+         <number>8192</number>
         </property>
         <property name="value">
-         <number>2</number>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="1" colspan="2">
-       <widget class="QComboBox" name="comboBoxAudioPresets">
-        <item>
-         <property name="text">
-          <string>Custom</string>
-         </property>
-        </item>
-        <item>
-         <property name="text">
-          <string>Stereo</string>
-         </property>
-        </item>
-        <item>
-         <property name="text">
-          <string>Mono</string>
-         </property>
-        </item>
-       </widget>
-      </item>
-      <item row="2" column="0">
-       <widget class="QLabel" name="label_4">
-        <property name="text">
-         <string>Sample rate</string>
+         <number>4000</number>
         </property>
        </widget>
       </item>
-      <item row="2" column="2">
-       <widget class="QComboBox" name="comboBoxAudioSamplerate">
-        <property name="currentIndex">
-         <number>0</number>
-        </property>
-        <item>
-         <property name="text">
-          <string>48000 Hz</string>
-         </property>
-        </item>
-        <item>
-         <property name="text">
-          <string>44100 Hz</string>
-         </property>
-        </item>
-        <item>
-         <property name="text">
-          <string>22050 Hz</string>
-         </property>
-        </item>
-        <item>
-         <property name="text">
-          <string>11025 Hz</string>
-         </property>
-        </item>
-       </widget>
-      </item>
      </layout>
     </widget>
    </item>
-   <item row="1" column="0" colspan="2">
-    <spacer name="verticalSpacer">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType">
-      <enum>QSizePolicy::Maximum</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>30</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="3" column="0" colspan="2">
-    <spacer name="verticalSpacer_2">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType">
-      <enum>QSizePolicy::Maximum</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>30</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="5" column="0" colspan="2">
-    <spacer name="verticalSpacer_3">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>40</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
   </layout>
  </widget>
  <resources/>
-- 
1.9.1



More information about the Vlmc-devel mailing list