[pitivi] Rendering: port to 1.0.
- From: Jean-François Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Rendering: port to 1.0.
- Date: Thu, 30 May 2013 21:13:08 +0000 (UTC)
commit c4256caf7abb4d320ba7534412c259b1e8bbbb90
Author: Mathieu Duponchelle <mathieu duponchelle epitech eu>
Date: Mon Apr 29 23:45:51 2013 +0200
Rendering: port to 1.0.
- Remove audio depth as it doesn't exist anymore
- Rename other caps.
- Use RENDER instead of SMART_RENDER as it's broken.
data/ui/clipmediaprops.ui | 49 +------
data/ui/projectsettings.ui | 103 +++-----------
data/ui/renderingdialog.ui | 154 ++++++++------------
pitivi/dialogs/clipmediaprops.py | 7 +-
pitivi/preset.py | 6 -
pitivi/project.py | 76 ++++-------
pitivi/render.py | 26 +---
pitivi/utils/ui.py | 6 -
.../dogtail_scripts/test_dialogs_clipmediaprops.py | 2 +-
tests/test_preset.py | 8 +-
10 files changed, 115 insertions(+), 322 deletions(-)
---
diff --git a/data/ui/clipmediaprops.ui b/data/ui/clipmediaprops.ui
index d8bcad5..2f0efc5 100644
--- a/data/ui/clipmediaprops.ui
+++ b/data/ui/clipmediaprops.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <requires lib="gtk+" version="3.4"/>
+ <!-- interface-requires gtk+ 3.4 -->
<object class="GtkDialog" id="Import Settings">
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -23,7 +23,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="_cancelButtonCb" swapped="no"/>
</object>
@@ -39,7 +38,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="_applyButtonCb" swapped="no"/>
</object>
@@ -87,7 +85,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
@@ -161,7 +158,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
@@ -201,7 +197,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
@@ -277,7 +272,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
@@ -317,7 +311,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
@@ -346,46 +339,6 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkHBox" id="hbox6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkCheckButton" id="checkbutton6">
- <property name="label" translatable="yes">Sample depth:</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="sample_depth">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
</object>
</child>
</object>
diff --git a/data/ui/projectsettings.ui b/data/ui/projectsettings.ui
index ff8d60b..59b9613 100644
--- a/data/ui/projectsettings.ui
+++ b/data/ui/projectsettings.ui
@@ -76,11 +76,9 @@
<child>
<object class="GtkButton" id="button8">
<property name="label">gtk-cancel</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -92,11 +90,9 @@
<child>
<object class="GtkButton" id="ok_button">
<property name="label">gtk-ok</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -222,11 +218,9 @@
<property name="icon_size">1</property>
<child>
<object class="GtkToolButton" id="add_video_preset_button">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">Create a new preset</property>
- <property name="use_action_appearance">False</property>
<property name="icon_name">list-add-symbolic</property>
<signal name="clicked" handler="_addVideoPresetButtonClickedCb" swapped="no"/>
</object>
@@ -237,13 +231,11 @@
</child>
<child>
<object class="GtkToolButton" id="remove_video_preset_button">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Remove the selected
preset</property>
- <property name="use_action_appearance">False</property>
<property name="icon_name">list-remove-symbolic</property>
<signal name="clicked" handler="_removeVideoPresetButtonClickedCb" swapped="no"/>
</object>
@@ -254,12 +246,10 @@
</child>
<child>
<object class="GtkToolButton" id="save_video_preset_button">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Save changes to the currently
selected preset</property>
- <property name="use_action_appearance">False</property>
<property name="icon_name">document-save-symbolic</property>
<signal name="clicked" handler="_saveVideoPresetButtonClickedCb" swapped="no"/>
</object>
@@ -313,7 +303,7 @@
</attributes>
</object>
<packing>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
@@ -331,17 +321,15 @@
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="select_dar_radiobutton">
<property name="label" translatable="yes">Display aspect ratio</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
@@ -350,7 +338,7 @@
<packing>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
@@ -368,7 +356,7 @@
<packing>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
@@ -388,17 +376,15 @@
<property name="right_attach">2</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="select_par_radiobutton">
<property name="label" translatable="yes">Pixel aspect ratio</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<property name="group">select_dar_radiobutton</property>
@@ -408,7 +394,7 @@
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
@@ -470,11 +456,9 @@
<child>
<object class="GtkCheckButton" id="constrain_sar_button">
<property name="label" translatable="yes">Link</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="_constrainSarButtonToggledCb" swapped="no"/>
@@ -505,7 +489,7 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
@@ -525,7 +509,7 @@
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
</object>
@@ -650,12 +634,10 @@
<property name="icon_size">1</property>
<child>
<object class="GtkToolButton" id="add_audio_preset_button">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Create a new preset</property>
- <property name="use_action_appearance">False</property>
<property name="icon_name">list-add-symbolic</property>
<signal name="clicked" handler="_addAudioPresetButtonClickedCb" swapped="no"/>
</object>
@@ -666,13 +648,11 @@
</child>
<child>
<object class="GtkToolButton" id="remove_audio_preset_button">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Remove the selected
preset</property>
- <property name="use_action_appearance">False</property>
<property name="icon_name">list-remove-symbolic</property>
<signal name="clicked" handler="_removeAudioPresetButtonClickedCb" swapped="no"/>
</object>
@@ -683,13 +663,11 @@
</child>
<child>
<object class="GtkToolButton" id="save_audio_preset_button">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Save changes to the currently
selected preset</property>
- <property name="use_action_appearance">False</property>
<property name="icon_name">document-save-symbolic</property>
<signal name="clicked" handler="_saveAudioPresetButtonClickedCb" swapped="no"/>
</object>
@@ -716,7 +694,7 @@
<object class="GtkTable" id="table7">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">4</property>
+ <property name="n_rows">3</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
@@ -733,7 +711,7 @@
</object>
<packing>
<property name="right_attach">2</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
@@ -754,7 +732,7 @@
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
@@ -775,28 +753,7 @@
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Sample depth:</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
@@ -816,7 +773,7 @@
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
@@ -836,27 +793,7 @@
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="sample_depth_combo">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="model">model3</property>
- <child>
- <object class="GtkCellRendererText" id="renderer6"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
</object>
@@ -903,7 +840,7 @@
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
@@ -917,7 +854,7 @@
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
@@ -929,7 +866,7 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
@@ -943,7 +880,7 @@
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
@@ -957,7 +894,7 @@
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
@@ -969,7 +906,7 @@
</object>
<packing>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
</object>
diff --git a/data/ui/renderingdialog.ui b/data/ui/renderingdialog.ui
index 7adaf79..059b38c 100644
--- a/data/ui/renderingdialog.ui
+++ b/data/ui/renderingdialog.ui
@@ -101,7 +101,7 @@
</child>
<child>
<object class="GtkButton" id="render_button">
- <property name="label" translatable="yes">Render</property>
+ <property name="label">Render</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
@@ -727,70 +727,11 @@
<object class="GtkTable" id="table4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">5</property>
+ <property name="n_rows">4</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkComboBox" id="audio_encoder_combo">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="model">model4</property>
- <signal name="changed" handler="_audioEncoderChangedComboCb" swapped="no"/>
- <child>
- <object class="GtkCellRendererText" id="renderer4"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="audio_settings_button">
- <property name="label" translatable="yes">Advanced...</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <signal name="clicked" handler="_audioSettingsButtonClickedCb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label21">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Codec:</property>
- </object>
- <packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
<object class="GtkComboBox" id="channels_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -837,19 +778,6 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Sample depth:</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
<object class="GtkComboBox" id="sample_rate_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -869,25 +797,6 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="sample_depth_combo">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="model">model5</property>
- <child>
- <object class="GtkCellRendererText" id="renderer7"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- <child>
<object class="GtkCheckButton" id="audio_output_checkbutton">
<property name="label" translatable="yes">Enable audio</property>
<property name="visible">True</property>
@@ -903,6 +812,65 @@
<property name="y_options">GTK_FILL</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label21">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Codec:</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkComboBox" id="audio_encoder_combo">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">model4</property>
+ <signal name="changed" handler="_audioEncoderChangedComboCb" swapped="no"/>
+ <child>
+ <object class="GtkCellRendererText" id="renderer4"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="audio_settings_button">
+ <property name="label" translatable="yes">Advanced...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked" handler="_audioSettingsButtonClickedCb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/pitivi/dialogs/clipmediaprops.py b/pitivi/dialogs/clipmediaprops.py
index 826bf41..5f8c389 100644
--- a/pitivi/dialogs/clipmediaprops.py
+++ b/pitivi/dialogs/clipmediaprops.py
@@ -30,7 +30,7 @@ import os
from gettext import gettext as _
from pitivi.configure import get_ui_dir
-from pitivi.utils.ui import frame_rates, audio_rates, audio_depths,\
+from pitivi.utils.ui import frame_rates, audio_rates,\
audio_channels, pixel_aspect_ratios, get_value_from_model
@@ -53,8 +53,6 @@ class clipmediapropsDialog():
get_value_from_model(audio_channels, stream.get_channels()))
self.sample_rate.set_text(
get_value_from_model(audio_rates, stream.get_sample_rate()))
- self.sample_depth.set_text(
- get_value_from_model(audio_depths, stream.get_depth()))
self.has_audio = True
break
@@ -94,7 +92,6 @@ class clipmediapropsDialog():
self.size_width = builder.get_object("size_width")
self.frame_rate = builder.get_object("frame_rate")
self.aspect_ratio = builder.get_object("aspect_ratio")
- self.sample_depth = builder.get_object("sample_depth")
self.sample_rate = builder.get_object("sample_rate")
self.frame1 = builder.get_object("frame1")
self.frame2 = builder.get_object("frame2")
@@ -128,8 +125,6 @@ class clipmediapropsDialog():
project.audiochannels = audio.get_channels()
if self.checkbutton5.get_active():
project.audiorate = audio.get_sample_rate()
- if self.checkbutton6.get_active():
- project.audiodepth = audio.get_depth()
self.dialog.destroy()
def _cancelButtonCb(self, unused_button):
diff --git a/pitivi/preset.py b/pitivi/preset.py
index 0cf57a5..b71e62b 100644
--- a/pitivi/preset.py
+++ b/pitivi/preset.py
@@ -361,12 +361,10 @@ class AudioPresetManager(PresetManager):
name = parser["name"]
channels = parser["channels"]
- depth = parser["depth"]
sample_rate = parser["sample-rate"]
self.addPreset(name, {
"channels": channels,
- "depth": depth,
"sample-rate": sample_rate,
"filepath": filepath,
})
@@ -376,7 +374,6 @@ class AudioPresetManager(PresetManager):
data = json.dumps({
"name": section,
"channels": values["channels"],
- "depth": int(values["depth"]),
"sample-rate": int(values["sample-rate"]),
}, indent=4)
fout.write(data)
@@ -413,7 +410,6 @@ class RenderPresetManager(PresetManager):
framerate = Gst.Fraction(framerate_num, framerate_denom)
channels = parser["channels"]
- depth = parser["depth"]
sample_rate = parser["sample-rate"]
self.addPreset(name, {
@@ -424,7 +420,6 @@ class RenderPresetManager(PresetManager):
"height": height,
"frame-rate": framerate,
"channels": channels,
- "depth": depth,
"sample-rate": sample_rate,
"filepath": filepath,
})
@@ -441,7 +436,6 @@ class RenderPresetManager(PresetManager):
"framerate-num": values["frame-rate"].num,
"framerate-denom": values["frame-rate"].denom,
"channels": values["channels"],
- "depth": int(values["depth"]),
"sample-rate": int(values["sample-rate"]),
}, indent=4)
fout.write(data)
diff --git a/pitivi/project.py b/pitivi/project.py
index 2247246..9c8de38 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -48,7 +48,7 @@ from pitivi.utils.pipeline import Pipeline
from pitivi.utils.timeline import Selection
from pitivi.utils.widgets import FractionWidget
from pitivi.utils.ripple_update_group import RippleUpdateGroup
-from pitivi.utils.ui import frame_rates, audio_rates, audio_depths,\
+from pitivi.utils.ui import frame_rates, audio_rates,\
audio_channels, beautify_time_delta, get_combo_value, set_combo_value,\
pixel_aspect_ratios, display_aspect_ratios, SPACING
from pitivi.preset import AudioPresetManager, DuplicatePresetNameException,\
@@ -622,71 +622,61 @@ class Project(Loggable, GES.Project):
# Encoding related properties
@property
def videowidth(self):
- return self.video_profile.get_restriction()[0]["videowidth"]
+ return self.video_profile.get_restriction()[0]["width"]
@videowidth.setter
def videowidth(self, value):
- if self.video_profile.get_restriction()[0]["videowidth"] != value and value:
- self.video_profile.get_restriction()[0]["videowidth"] = value
- self._emitChange("rendering-settings-changed", "videowidth", value)
+ if self.video_profile.get_restriction()[0]["width"] != value and value:
+ self.video_profile.get_restriction()[0]["width"] = value
+ self._emitChange("rendering-settings-changed", "width", value)
@property
def videoheight(self):
- return self.video_profile.get_restriction()[0]["videoheight"]
+ return self.video_profile.get_restriction()[0]["height"]
@videoheight.setter
def videoheight(self, value):
- if self.video_profile.get_restriction()[0]["videoheight"] != value and value:
- self.video_profile.get_restriction()[0]["videoheight"] = value
- self._emitChange("rendering-settings-changed", "videoheight", value)
+ if self.video_profile.get_restriction()[0]["height"] != value and value:
+ self.video_profile.get_restriction()[0]["height"] = value
+ self._emitChange("rendering-settings-changed", "height", value)
@property
def videorate(self):
- return self.video_profile.get_restriction()[0]["videorate"]
+ return self.video_profile.get_restriction()[0]["framerate"]
@videorate.setter
def videorate(self, value):
- if self.video_profile.get_restriction()[0]["videorate"] != value and value:
- self.video_profile.get_restriction()[0]["videorate"] = value
+ if self.video_profile.get_restriction()[0]["framerate"] != value and value:
+ self.video_profile.get_restriction()[0]["framerate"] = value
@property
def videopar(self):
- return self.video_profile.get_restriction()[0]["videopar"]
+ return self.video_profile.get_restriction()[0]["pixel-aspect-ratio"]
@videopar.setter
def videopar(self, value):
- if self.video_profile.get_restriction()[0]["videopar"] != value and value:
- self.video_profile.get_restriction()[0]["videopar"] = value
+ if self.video_profile.get_restriction()[0]["pixel-aspect-ratio"] != value and value:
+ self.video_profile.get_restriction()[0]["pixel-aspect-ratio"] = value
@property
def audiochannels(self):
- return self.audio_profile.get_restriction()[0]["audiochannels"]
+ return self.audio_profile.get_restriction()[0]["channels"]
@audiochannels.setter
def audiochannels(self, value):
- if self.video_profile.get_restriction()[0]["audiochannels"] != value and value:
- self.audio_profile.get_restriction()[0]["audiochannels"] = value
- self._emitChange("rendering-settings-changed", "audiochannels", value)
+ if self.audio_profile.get_restriction()[0]["channels"] != value and value:
+ self.audio_profile.get_restriction()[0]["channels"] = value
+ self._emitChange("rendering-settings-changed", "channels", value)
@property
def audiorate(self):
- return self.audio_profile.get_restriction()[0]["audiorate"]
+ return self.audio_profile.get_restriction()[0]["rate"]
@audiorate.setter
def audiorate(self, value):
- if self.video_profile.get_restriction()[0]["audiorate"] != value and value:
- self.audio_profile.get_restriction()[0]["audiorate"] = value
- self._emitChange("rendering-settings-changed", "audiorate", value)
-
- @property
- def audiodepth(self):
- return self.audio_profile.get_restriction()[0]["audiodepth"]
-
- @audiodepth.setter
- def audiodepth(self, value):
- if self.video_profile.get_restriction()[0]["audiodepth"] != value and value:
- self.audio_profile.get_restriction()[0]["audiodepth"] = value
- self._emitChange("rendering-settings-changed", "audiodepth", value)
+ if self.audio_profile.get_restriction()[0]["rate"] != value and value:
+ self.audio_profile.get_restriction()[0]["rate"] = value
+ self._emitChange("rendering-settings-changed", "rate", value)
@property
def aencoder(self):
@@ -888,23 +878,20 @@ class Project(Loggable, GES.Project):
def getAudioCaps(self):
""" Returns the GstCaps corresponding to the audio settings """
- # TODO: Figure out why including 'depth' causes pipeline failures:
astr = "rate=%d,channels=%d" % (self.audiorate, self.audiochannels)
caps_str = "audio/x-raw,%s" % (astr)
audio_caps = Gst.caps_from_string(caps_str)
return audio_caps
- def setAudioProperties(self, nbchanns=-1, rate=-1, depth=-1):
+ def setAudioProperties(self, nbchanns=-1, rate=-1):
"""
- Set the number of audio channels, rate and depth
+ Set the number of audio channels and the rate
"""
- self.info("%d x %dHz %dbits", nbchanns, rate, depth)
+ self.info("%d x %dHz %dbits", nbchanns, rate)
if not nbchanns == -1 and not nbchanns == self.audiochannels:
self.audiochannels = nbchanns
if not rate == -1 and not rate == self.audiorate:
self.audiorate = rate
- if not depth == -1 and not depth == self.audiodepth:
- self.audiodepth = depth
def setEncoders(self, muxer="", vencoder="", aencoder=""):
""" Set the video/audio encoder and muxer """
@@ -978,8 +965,6 @@ class Project(Loggable, GES.Project):
self.audiochannels = 2
if not self.audiorate:
self.audiorate = 44100
- if not self.audiodepth:
- self.audiodepth = 16
def _emitChange(self, signal, key=None, value=None):
if key and value:
@@ -1053,7 +1038,6 @@ class ProjectSettingsDialog():
self.channels_combo.set_model(audio_channels)
self.sample_rate_combo.set_model(audio_rates)
- self.sample_depth_combo.set_model(audio_depths)
# behavior
self.wg = RippleUpdateGroup()
@@ -1077,7 +1061,6 @@ class ProjectSettingsDialog():
update_func=self._updateVideoSaveButton)
self.wg.addVertex(self.channels_combo, signal="changed")
self.wg.addVertex(self.sample_rate_combo, signal="changed")
- self.wg.addVertex(self.sample_depth_combo, signal="changed")
# constrain width and height IFF constrain_sar_button is active
self.wg.addEdge(self.width_spinbutton, self.height_spinbutton,
@@ -1155,7 +1138,6 @@ class ProjectSettingsDialog():
# Bind the widgets in the Audio tab to the Audio Presets Manager.
self.bindCombo(self.audio_presets, "channels", self.channels_combo)
self.bindCombo(self.audio_presets, "sample-rate", self.sample_rate_combo)
- self.bindCombo(self.audio_presets, "depth", self.sample_depth_combo)
self.wg.addEdge(self.par_fraction_widget, self.save_video_preset_button)
self.wg.addEdge(self.frame_rate_fraction_widget, self.save_video_preset_button)
@@ -1164,7 +1146,6 @@ class ProjectSettingsDialog():
self.wg.addEdge(self.channels_combo, self.save_audio_preset_button)
self.wg.addEdge(self.sample_rate_combo, self.save_audio_preset_button)
- self.wg.addEdge(self.sample_depth_combo, self.save_audio_preset_button)
# Set the shading style in the contextual toolbars below presets
video_presets_toolbar = self.builder.get_object("video_presets_toolbar")
@@ -1226,7 +1207,6 @@ class ProjectSettingsDialog():
def createAudioNoPreset(self, mgr):
mgr.prependPreset(_("No preset"), {
- "depth": self.project.audiodepth,
"channels": self.project.audiochannels,
"sample-rate": self.project.audiorate})
@@ -1314,7 +1294,6 @@ class ProjectSettingsDialog():
self.par_combo = getObj("par_combo")
self.channels_combo = getObj("channels_combo")
self.sample_rate_combo = getObj("sample_rate_combo")
- self.sample_depth_combo = getObj("sample_depth_combo")
self.year_spinbutton = getObj("year_spinbutton")
self.author_entry = getObj("author_entry")
self.width_spinbutton = getObj("width_spinbutton")
@@ -1362,7 +1341,6 @@ class ProjectSettingsDialog():
self.audio_presets.addPreset(preset_name, {
"channels": get_combo_value(self.channels_combo),
"sample-rate": get_combo_value(self.sample_rate_combo),
- "depth": get_combo_value(self.sample_depth_combo)
})
self.audio_presets.restorePreset(preset_name)
self._updateAudioPresetButtons()
@@ -1464,7 +1442,6 @@ class ProjectSettingsDialog():
# audio
set_combo_value(self.channels_combo, self.project.audiochannels)
set_combo_value(self.sample_rate_combo, self.project.audiorate)
- set_combo_value(self.sample_depth_combo, self.project.audiodepth)
self._selectDarRadiobuttonToggledCb(self.select_dar_radiobutton)
@@ -1490,7 +1467,6 @@ class ProjectSettingsDialog():
self.project.audiochannels = get_combo_value(self.channels_combo)
self.project.audiorate = get_combo_value(self.sample_rate_combo)
- self.project.audiodepth = get_combo_value(self.sample_depth_combo)
def _responseCb(self, unused_widget, response):
if response == Gtk.ResponseType.OK:
diff --git a/pitivi/render.py b/pitivi/render.py
index 9d27978..9c9a050 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -38,7 +38,7 @@ from pitivi.utils.loggable import Loggable
from pitivi.utils.widgets import GstElementSettingsDialog
from pitivi.utils.ripple_update_group import RippleUpdateGroup
from pitivi.utils.misc import show_user_manual
-from pitivi.utils.ui import model, frame_rates, audio_rates, audio_depths, \
+from pitivi.utils.ui import model, frame_rates, audio_rates,\
audio_channels, get_combo_value, set_combo_value, beautify_ETA
try:
import pycanberra
@@ -372,7 +372,6 @@ class RenderDialog(Loggable):
self.wg.addVertex(self.save_render_preset_button, update_func=self._updateRenderSaveButton)
self.wg.addVertex(self.channels_combo, signal="changed")
self.wg.addVertex(self.sample_rate_combo, signal="changed")
- self.wg.addVertex(self.sample_depth_combo, signal="changed")
self.wg.addVertex(self.muxercombobox, signal="changed")
self.wg.addVertex(self.audio_encoder_combo, signal="changed")
self.wg.addVertex(self.video_encoder_combo, signal="changed")
@@ -390,14 +389,12 @@ class RenderDialog(Loggable):
self.wg.addEdge(self.muxercombobox, self.save_render_preset_button)
self.wg.addEdge(self.channels_combo, self.save_render_preset_button)
self.wg.addEdge(self.sample_rate_combo, self.save_render_preset_button)
- self.wg.addEdge(self.sample_depth_combo, self.save_render_preset_button)
self._infobarForPresetManager = {self.render_presets: self.render_preset_infobar}
# Bind widgets to RenderPresetsManager
self.bindCombo(self.render_presets, "channels", self.channels_combo)
self.bindCombo(self.render_presets, "sample-rate", self.sample_rate_combo)
- self.bindCombo(self.render_presets, "depth", self.sample_depth_combo)
self.bindCombo(self.render_presets, "acodec", self.audio_encoder_combo)
self.bindCombo(self.render_presets, "vcodec", self.video_encoder_combo)
self.bindCombo(self.render_presets, "container", self.muxercombobox)
@@ -409,7 +406,6 @@ class RenderDialog(Loggable):
def createNoPreset(self, mgr):
mgr.prependPreset(_("No preset"), {
- "depth": int(get_combo_value(self.sample_depth_combo)),
"channels": int(get_combo_value(self.channels_combo)),
"sample-rate": int(get_combo_value(self.sample_rate_combo)),
"acodec": get_combo_value(self.audio_encoder_combo).get_name(),
@@ -437,11 +433,6 @@ class RenderDialog(Loggable):
lambda x: self.vcodec_setter(widget, x),
lambda: get_combo_value(widget).get_name())
- elif name == "depth":
- mgr.bindWidget(name,
- lambda x: self.sample_depth_setter(widget, x),
- lambda: get_combo_value(widget))
-
elif name == "sample-rate":
mgr.bindWidget(name,
lambda x: self.sample_rate_setter(widget, x),
@@ -486,9 +477,6 @@ class RenderDialog(Loggable):
# The user directly changed the video encoder combo.
self.preferred_vencoder = value
- def sample_depth_setter(self, widget, value):
- self.project.audiodepth = set_combo_value(widget, value)
-
def sample_rate_setter(self, widget, value):
self.project.audiorate = set_combo_value(widget, value)
@@ -598,7 +586,6 @@ class RenderDialog(Loggable):
def _addRenderPresetButtonClickedCb(self, button):
preset_name = self._getUniquePresetName(self.render_presets)
self.render_presets.addPreset(preset_name, {
- "depth": int(get_combo_value(self.sample_depth_combo)),
"channels": int(get_combo_value(self.channels_combo)),
"sample-rate": int(get_combo_value(self.sample_rate_combo)),
"acodec": get_combo_value(self.audio_encoder_combo).get_name(),
@@ -654,7 +641,6 @@ class RenderDialog(Loggable):
self.scale_spinbutton = self.builder.get_object("scale_spinbutton")
self.channels_combo = self.builder.get_object("channels_combo")
self.sample_rate_combo = self.builder.get_object("sample_rate_combo")
- self.sample_depth_combo = self.builder.get_object("sample_depth_combo")
self.muxercombobox = self.builder.get_object("muxercombobox")
self.audio_encoder_combo = self.builder.get_object("audio_encoder_combo")
self.video_encoder_combo = self.builder.get_object("video_encoder_combo")
@@ -674,7 +660,6 @@ class RenderDialog(Loggable):
self.frame_rate_combo.set_model(frame_rates)
self.channels_combo.set_model(audio_channels)
self.sample_rate_combo.set_model(audio_rates)
- self.sample_depth_combo.set_model(audio_depths)
self.muxercombobox.set_model(factorylist(CachedEncoderList().muxers))
def _displaySettings(self):
@@ -685,7 +670,6 @@ class RenderDialog(Loggable):
# Audio settings
set_combo_value(self.channels_combo, self.project.audiochannels)
set_combo_value(self.sample_rate_combo, self.project.audiorate)
- set_combo_value(self.sample_depth_combo, self.project.audiodepth)
def _displayRenderSettings(self):
"""Display the settings which can be changed only in the RenderDialog.
@@ -793,7 +777,8 @@ class RenderDialog(Loggable):
def startAction(self):
""" Start the render process """
self._pipeline.set_state(Gst.State.NULL)
- self._pipeline.set_mode(GES.PipelineFlags.SMART_RENDER)
+ # FIXME: https://github.com/pitivi/gst-editing-services/issues/23
+ self._pipeline.set_mode(GES.PipelineFlags.RENDER)
encodebin = self._pipeline.get_by_name("internal-encodebin")
self._gstSigId[encodebin] = encodebin.connect("element-added", self._elementAddedCb)
self._pipeline.set_state(Gst.State.PLAYING)
@@ -958,14 +943,12 @@ class RenderDialog(Loggable):
if active:
self.channels_combo.set_sensitive(True)
self.sample_rate_combo.set_sensitive(True)
- self.sample_depth_combo.set_sensitive(True)
self.audio_encoder_combo.set_sensitive(True)
self.audio_settings_button.set_sensitive(True)
self.render_button.set_sensitive(True)
else:
self.channels_combo.set_sensitive(False)
self.sample_rate_combo.set_sensitive(False)
- self.sample_depth_combo.set_sensitive(False)
self.audio_encoder_combo.set_sensitive(False)
self.audio_settings_button.set_sensitive(False)
if not self.video_output_checkbutton.get_active():
@@ -1006,9 +989,6 @@ class RenderDialog(Loggable):
def _channelsComboChangedCb(self, combo):
self.project.audiochannels = get_combo_value(combo)
- def _sampleDepthComboChangedCb(self, combo):
- self.project.audiodepth = get_combo_value(combo)
-
def _sampleRateComboChangedCb(self, combo):
self.project.audiorate = get_combo_value(combo)
diff --git a/pitivi/utils/ui.py b/pitivi/utils/ui.py
index a9f5f6e..f07f532 100644
--- a/pitivi/utils/ui.py
+++ b/pitivi/utils/ui.py
@@ -424,12 +424,6 @@ audio_rates = model((str, int), (
(_("%d kHz") % 48, 48000),
(_("%d kHz") % 96, 96000)))
-audio_depths = model((str, int), (
- (_("%d bit") % 8, 8),
- (_("%d bit") % 16, 16),
- (_("%d bit") % 24, 24),
- (_("%d bit") % 32, 32)))
-
audio_channels = model((str, int), (
(_("6 Channels (5.1)"), 6),
(_("4 Channels (4.0)"), 4),
diff --git a/tests/dogtail_scripts/test_dialogs_clipmediaprops.py
b/tests/dogtail_scripts/test_dialogs_clipmediaprops.py
index 223d85e..1c8256a 100644
--- a/tests/dogtail_scripts/test_dialogs_clipmediaprops.py
+++ b/tests/dogtail_scripts/test_dialogs_clipmediaprops.py
@@ -32,7 +32,7 @@ class DialogsClipMediaPropsTest(HelpFunc):
dialog = self.pitivi.child(name="Clip Properties", roleName="dialog", recursive=False)
# These are the properties of "tears of steel.webm":
labels = {"Video:", "960", "400", "25 fps", "Square",
- "Audio:", "Mono", "44.1 kHz", "32 bit"}
+ "Audio:", "Mono", "44.1 kHz"}
real_labels = set([])
for label in dialog.findChildren(GenericPredicate(roleName="label")):
real_labels.add(label.text)
diff --git a/tests/test_preset.py b/tests/test_preset.py
index 80dbff1..64bb57f 100644
--- a/tests/test_preset.py
+++ b/tests/test_preset.py
@@ -139,14 +139,12 @@ class TestAudioPresetsIO(TestCase):
def testSaveAndLoad(self):
self.manager.addPreset("Vegeta",
{"channels": 6000,
- "depth": 16,
"sample-rate": 44100})
self.manager.saveAll()
self.assertEqual(1, countUserPresets(self.manager))
self.manager.addPreset("Nappa",
{"channels": 4000,
- "depth": 16,
"sample-rate": 44100})
self.manager.saveAll()
self.assertEqual(2, countUserPresets(self.manager))
@@ -160,10 +158,9 @@ class TestAudioPresetsIO(TestCase):
non_ascii_preset_name = "Solid Snake (ソリッド・スネーク) \\#!\"'$%?&*"
self.manager.addPreset(non_ascii_preset_name,
{"channels": 2,
- "depth": 16,
"sample-rate": 44100})
snake = self.manager.presets[non_ascii_preset_name]
- self.assertEqual(3, len(snake))
+ self.assertEqual(2, len(snake))
self.manager.saveAll()
other_manager = self.createOtherManager()
@@ -177,10 +174,9 @@ class TestAudioPresetsIO(TestCase):
preset_name = " / % "
self.manager.addPreset(preset_name,
{"channels": 2,
- "depth": 16,
"sample-rate": 44100})
values = self.manager.presets[preset_name]
- self.assertEqual(3, len(values))
+ self.assertEqual(2, len(values))
self.manager.saveAll()
other_manager = self.createOtherManager()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]