Esempio n. 1
0
    def _displaySettings(self):
        self.width = self.settings.videowidth
        self.height = self.settings.videoheight

        # Video settings
        self.frame_rate_combo.set_model(frame_rates)
        set_combo_value(self.frame_rate_combo, self.settings.videorate)
        self.scale_spinbutton.set_value(100)
        self.updateResolution()

        # Audio settings
        self.channels_combo.set_model(audio_channels)
        set_combo_value(self.channels_combo, self.settings.audiochannels)

        self.sample_rate_combo.set_model(audio_rates)
        set_combo_value(self.sample_rate_combo, self.settings.audiorate)

        self.sample_depth_combo.set_model(audio_depths)
        set_combo_value(self.sample_depth_combo, self.settings.audiodepth)

        # Muxer
        self.muxercombobox.set_model(factorylist(
            self.settings.muxers))
        # note: this will trigger an update of the codec comboboxes
        set_combo_value(self.muxercombobox, 
            gst.element_factory_find(self.settings.muxer))

        # Encoder/Muxer settings

        # File
        self.filebutton.set_current_folder(self.app.settings.lastExportFolder)
        self.updateFilename(self.project.name)

        # Summary
        self._updateSummary()
Esempio n. 2
0
 def _updateEncoderCombo(self, encoder_combo, preferred_encoder):
     """Select the specified encoder for the specified encoder combo."""
     if preferred_encoder:
         # A preferrence exists, pick it if it can be found in
         # the current model of the combobox.
         vencoder = gst.element_factory_find(preferred_encoder)
         set_combo_value(encoder_combo, vencoder, default_index=0)
     else:
         # No preferrence exists, pick the first encoder from
         # the current model of the combobox.
         encoder_combo.set_active(0)
Esempio n. 3
0
    def muxer_setter(self, widget, value):
        set_combo_value(widget, gst.element_factory_find(value))
        self.settings.setEncoders(muxer=value)

        # Update the extension of the filename.
        basename = os.path.splitext(self.fileentry.get_text())[0]
        self.updateFilename(basename)

        # Update muxer-dependent widgets.
        self.muxer_combo_changing = True
        try:
            self.updateAvailableEncoders()
        finally:
            self.muxer_combo_changing = False
Esempio n. 4
0
    def _displayRenderSettings(self):
        """Display the settings which can be changed only in the EncodingDialog.
        """
        # Video settings
        # note: this will trigger an update of the video resolution label
        self.scale_spinbutton.set_value(self.settings.render_scale)
        # Muxer settings
        # note: this will trigger an update of the codec comboboxes
        set_combo_value(self.muxercombobox,
            gst.element_factory_find(self.settings.muxer))

        # File
        self.filebutton.set_current_folder(self.app.settings.lastExportFolder)
        self.updateFilename(self.project.name)
Esempio n. 5
0
 def _displaySettings(self):
     """Display the settings that also change in the ProjectSettingsDialog.
     """
     # Video settings
     set_combo_value(self.frame_rate_combo, self.settings.videorate)
     # Audio settings
     set_combo_value(self.channels_combo, self.settings.audiochannels)
     set_combo_value(self.sample_rate_combo, self.settings.audiorate)
     set_combo_value(self.sample_depth_combo, self.settings.audiodepth)
Esempio n. 6
0
    def updateUI(self):

        self.width_spinbutton.set_value(self.settings.videowidth)
        self.height_spinbutton.set_value(self.settings.videoheight)

        # video
        self.frame_rate_fraction_widget.setWidgetValue(self.settings.videorate)
        self.par_fraction_widget.setWidgetValue(self.settings.videopar)

        # audio
        set_combo_value(self.channels_combo, self.settings.audiochannels)
        set_combo_value(self.sample_rate_combo, self.settings.audiorate)
        set_combo_value(self.sample_depth_combo, self.settings.audiodepth)

        self._selectDarRadiobuttonToggledCb(self.select_dar_radiobutton)
Esempio n. 7
0
    def updateUI(self):

        self.width_spinbutton.set_value(self.settings.videowidth)
        self.height_spinbutton.set_value(self.settings.videoheight)

        # video
        self.frame_rate_fraction_widget.setWidgetValue(self.settings.videorate)
        self.par_fraction_widget.setWidgetValue(self.settings.videopar)

        # audio
        set_combo_value(self.channels_combo, self.settings.audiochannels)
        set_combo_value(self.sample_rate_combo, self.settings.audiorate)
        set_combo_value(self.sample_depth_combo, self.settings.audiodepth)

        self._selectDarRadiobuttonToggledCb(self.select_dar_radiobutton)
Esempio n. 8
0
    def updateUI(self):

        self.width_spinbutton.set_value(self.settings.videowidth)
        self.height_spinbutton.set_value(self.settings.videoheight)

        # video
        self.frame_rate_fraction_widget.setWidgetValue(self.settings.videorate)
        self.par_fraction_widget.setWidgetValue(self.settings.videopar)

        # audio
        set_combo_value(self.channels_combo, self.settings.audiochannels)
        set_combo_value(self.sample_rate_combo, self.settings.audiorate)
        set_combo_value(self.sample_depth_combo, self.settings.audiodepth)

        self._selectDarRadiobuttonToggledCb(self.select_dar_radiobutton)

        # metadata
        self.title_entry.set_text(self.project.name)
        self.author_entry.set_text(self.project.author)
        if self.project.year:
            year = int(self.project.year)
        else:
            year = datetime.now().year
        self.year_spinbutton.get_adjustment().set_value(year)
Esempio n. 9
0
 def updateParFromFractionWidget(self):
     set_combo_value(self.par_combo,
                     self.par_fraction_widget.getWidgetValue())
Esempio n. 10
0
 def updateParFromFractionWidget(self):
     set_combo_value(self.par_combo,
         self.par_fraction_widget.getWidgetValue())
Esempio n. 11
0
 def _updateCombo(self, unused, combo, fraction):
     set_combo_value(combo, fraction.getWidgetValue())
Esempio n. 12
0
 def bindCombo(self, mgr, name, widget):
     mgr.bindWidget(name,
         lambda x: set_combo_value(widget, x),
         lambda: get_combo_value(widget))
Esempio n. 13
0
 def _updateCombo(self, unused, combo, fraction):
     set_combo_value(combo, fraction.getWidgetValue())
Esempio n. 14
0
 def vcodec_setter(self, widget, value):
     set_combo_value(widget, gst.element_factory_find(value))
     self.settings.setEncoders(vencoder=value)
     if not self.muxer_combo_changing:
         # The user directly changed the video encoder combo.
         self.preferred_vencoder = value
Esempio n. 15
0
 def bindCombo(self, mgr, name, widget):
     mgr.bindWidget(name, lambda x: set_combo_value(widget, x),
                    lambda: get_combo_value(widget))
Esempio n. 16
0
 def sample_depth_setter(self, widget, value):
     set_combo_value(widget, value)
     self.settings.setAudioProperties(depth=value)
Esempio n. 17
0
 def framerate_setter(self, widget, value):
     set_combo_value(widget, value)
     self.settings.setVideoProperties(framerate=value)
Esempio n. 18
0
 def channels_setter(self, widget, value):
     set_combo_value(widget, value)
     self.settings.setAudioProperties(nbchanns=value)
Esempio n. 19
0
 def sample_rate_setter(self, widget, value):
     set_combo_value(widget, value)
     self.settings.setAudioProperties(rate=value)