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

Yikai Lu luyikei.qmltu at gmail.com
Sun Apr 10 16:25:27 CEST 2016


---
 src/Gui/wizard/ProjectWizard.cpp |   2 +
 src/Gui/wizard/VideoPage.cpp     |   2 +
 src/Gui/wizard/ui/VideoPage.ui   | 315 ++++++++++++++++++++++++---------------
 3 files changed, 196 insertions(+), 123 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..b997c3c 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.comboBoxAudioBitrate );
+    registerField( "vbitrate", ui.spinBoxVideoBitrate );
 }
 
 void
diff --git a/src/Gui/wizard/ui/VideoPage.ui b/src/Gui/wizard/ui/VideoPage.ui
index 90f6848..ce6781c 100644
--- a/src/Gui/wizard/ui/VideoPage.ui
+++ b/src/Gui/wizard/ui/VideoPage.ui
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>546</width>
-    <height>445</height>
+    <height>479</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -30,6 +30,182 @@
      </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="QComboBox" name="comboBoxAudioBitrate">
+        <property name="currentIndex">
+         <number>5</number>
+        </property>
+        <item>
+         <property name="text">
+          <string>32 Kbps</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>96 Kbps</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>128 Kbps</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>160 Kbps</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>192 Kbps</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>256 Kbps</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>320 Kbps</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>
    <item row="2" column="0" colspan="2">
     <widget class="QGroupBox" name="groupBox">
      <property name="title">
@@ -120,6 +296,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 +326,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 +340,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>
+         <number>4000</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>
-        </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