def __init__(self, app, project, pipeline=None): Loggable.__init__(self) GladeWindow.__init__(self) self.app = app self.project = project # clone the current project settings self.original_settings = self.project.getSettings() self.settings = self.original_settings.copy() self.project.setSettings(self.settings) # UI widgets self.window.set_icon_from_file(configure.get_pixmap_dir() + "/pitivi-render-16.png") Renderer.__init__(self, project, pipeline) ellipsize(self.muxercombobox) ellipsize(self.audio_encoder_combo) ellipsize(self.video_encoder_combo) self.timestarted = 0 self._displaySettings() self.window.connect("delete-event", self._deleteEventCb) self.settings.connect("settings-changed", self._settingsChanged) self.settings.connect("encoders-changed", self._settingsChanged)
def __init__(self, app, project, pipeline=None): Loggable.__init__(self) GladeWindow.__init__(self) self.app = app # UI widgets self.progressbar = self.widgets["progressbar"] self.filebutton = self.widgets["filebutton"] self.settingsbutton = self.widgets["settingsbutton"] self.cancelbutton = self.widgets["cancelbutton"] self.recordbutton = self.widgets["recordbutton"] self.recordbutton.set_sensitive(False) self.vinfo = self.widgets["videoinfolabel"] self.ainfo = self.widgets["audioinfolabel"] self.window.set_icon_from_file(configure.get_pixmap_dir() + "/pitivi-render-16.png") # grab the Pipeline and settings self.project = project if pipeline != None: self.pipeline = pipeline else: self.pipeline = self.project.pipeline self.detectStreamTypes() self.outfile = None self.rendering = False self.renderaction = None self.settings = project.getSettings() self.timestarted = 0 self._displaySettings() self.window.connect("delete-event", self._deleteEventCb)
def __init__(self, parent, project): GladeWindow.__init__(self, parent) self.project = project self.expwidget = ExportSettingsWidget(parent) self.widgets["vbox1"].pack_start(self.expwidget) self.expwidget.show() self.expwidget.setSettings(self.project.getSettings()) self._fillSettings()
def __init__(self, title, headline): GladeWindow.__init__(self) Loggable.__init__(self) self.window.set_modal(False) self.widgets["headline"].set_text(headline) self.window.set_title(title) self.errorvbox = self.widgets["errorvbox"] self.window.set_geometry_hints(min_width=400, min_height=200)
def __init__(self, parent, project): GladeWindow.__init__(self, parent) self.project = project self.expwidget = ExportSettingsWidget(parent) self.widgets["vbox1"].pack_start(self.expwidget) self.expwidget.show() self.expwidget.setSettings(self.project.getSettings().copy()) self._fillSettings()
def __init__(self, elementfactory, properties={}): GladeWindow.__init__(self) Loggable.__init__(self) self.debug("factory:%s, properties:%s", elementfactory, properties) self.factory = elementfactory self.element = self.factory.create("elementsettings") if not self.element: self.warning("Couldn't create element from factory %s", self.factory) self.properties = properties self._fillWindow()
def __init__(self, app, parent): GladeWindow.__init__(self) self.app = app # Parent the dialog with mainwindow, since encodingdialog is hidden. # It allows this dialog to properly minimize together with mainwindow self.window.set_transient_for(self.app) # UI widgets self.window.set_icon_from_file(configure.get_pixmap_dir() + "/pitivi-render-16.png")
def __init__(self, elementfactory, properties={}): GladeWindow.__init__(self) Loggable.__init__(self) self.debug("factory:%s, properties:%s", elementfactory, properties) self.factory = elementfactory self.element = self.factory.create("elementsettings") if not self.element: self.warning("Couldn't create element from factory %s", self.factory) self.desclabel = self.widgets["descriptionlabel"] self.authlabel = self.widgets["authorlabel"] self.properties = properties self._fillWindow()
def __init__(self, pitivi): gst.log("Creating new WebcamManager Dialog") self.pitivi = pitivi GladeWindow.__init__(self) # Create gtk widget using glade model self.draw_window = self.widgets["draw_window"] self.draw_window.unset_flags(gtk.DOUBLE_BUFFERED) self.draw_window.unset_flags(gtk.SENSITIVE) self.record_btn = self.widgets["record_btn"] self.close_btn = self.widgets["close_btn"] self.close_btn.connect("clicked", self.close) self.record_btn.connect("clicked", self.threaded_recording) self.window.connect("destroy", self.close) self.record_btn = self.record_btn.get_children()[0] self.record_btn = self.record_btn.get_children()[0].get_children()[1] self.record_btn.set_label("Start Recording") self.sourcefactories = SourceList() self._audiodev = None self._videodev = None self._vdevcombo = self.widgets["videodev_combo"] self._vdevcombo.set_active(0) self._vdevcombo.set_model(gtk.ListStore(str, object)) self._vdevcombo.set_attributes(self._vdevcombo.child.get_cell_renderers()[0], text=0) self._adevcombo = self.widgets["audiodev_combo"] self._adevcombo.set_active(0) self._adevcombo.set_model(gtk.ListStore(str, object)) self._adevcombo.set_attributes(self._adevcombo.child.get_cell_renderers()[0], text=0) self._updateVideoCombo() self._updateAudioCombo() self.filepath = None self.sink = SinkBin() CallbackThread(self._setupPlayer).start()
def __init__(self, app, project, pipeline=None): Loggable.__init__(self) GladeWindow.__init__(self) self.app = app # UI widgets self.progressbar = self.widgets["progressbar"] self.filebutton = self.widgets["filebutton"] self.settingsbutton = self.widgets["settingsbutton"] self.cancelbutton = self.widgets["cancelbutton"] self.recordbutton = self.widgets["recordbutton"] self.recordbutton.set_sensitive(False) self.vinfo = self.widgets["videoinfolabel"] self.ainfo = self.widgets["audioinfolabel"] self.window.set_icon_from_file(configure.get_pixmap_dir() + "/pitivi-render-16.png") Renderer.__init__(self, project, pipeline) self.timestarted = 0 self._displaySettings() self.window.connect("delete-event", self._deleteEventCb)
def destroy(self): self.project.setSettings(self.original_settings) GladeWindow.destroy(self)
def __init__(self, parent, project): GladeWindow.__init__(self, parent) self.project = project self.settings = project.getSettings() self.project = project # add custom widgets self.dar_fraction_widget = FractionWidget() self.video_properties_table.attach(self.dar_fraction_widget, 0, 1, 6, 7, xoptions=gtk.EXPAND | gtk.FILL, yoptions=0) self.dar_fraction_widget.show() # add custom widgets self.par_fraction_widget = FractionWidget() self.video_properties_table.attach(self.par_fraction_widget, 1, 2, 6, 7, xoptions=gtk.EXPAND | gtk.FILL, yoptions=0) self.par_fraction_widget.show() self.frame_rate_fraction_widget = FractionWidget() self.video_properties_table.attach(self.frame_rate_fraction_widget, 1, 2, 2, 3, xoptions=gtk.EXPAND | gtk.FILL, yoptions=0) self.frame_rate_fraction_widget.show() # populate coboboxes with appropriate data self.frame_rate_combo.set_model(frame_rates) self.dar_combo.set_model(display_aspect_ratios) self.par_combo.set_model(pixel_aspect_ratios) self.channels_combo.set_model(audio_channels) self.sample_rate_combo.set_model(audio_rates) self.sample_depth_combo.set_model(audio_depths) # set the project metadata # FIXME: not saved in the project file if self.year_spinbutton.get_value_as_int() == 1900: self.year_spinbutton.set_value(datetime.now().year) if self.author_entry.get_text() == "": self.full_user_name = getpwuid(os.getuid()).pw_gecos.split(",")[0] self.author_entry.set_text(self.full_user_name) # behavior self.wg = RippleUpdateGroup( (self.frame_rate_combo, self._updateCombo, "changed", self.frame_rate_fraction_widget), (self.frame_rate_fraction_widget, self._updateFraction, "value-changed", self.frame_rate_combo), (self.dar_combo, None, "changed"), (self.dar_fraction_widget, None, "value-changed"), (self.par_combo, None, "changed"), (self.par_fraction_widget, None, "value-changed"), (self.width_spinbutton, None, "value-changed"), (self.height_spinbutton, None, "value-changed"), (self.save_audio_preset_button, self._updateAudioSaveButton), (self.save_video_preset_button, self._updateVideoSaveButton), (self.channels_combo,), (self.sample_rate_combo,), (self.sample_depth_combo,), ) # constrain width and height IFF constrain_sar_button is active self.wg.add_edge(self.width_spinbutton, self.height_spinbutton, self.constrained, self.updateHeight) self.wg.add_edge(self.height_spinbutton, self.width_spinbutton, self.constrained, self.updateWidth) # keep framereate text field and combo in sync self.wg.add_bi_edge(self.frame_rate_combo, self.frame_rate_fraction_widget) # keep dar text field and combo in sync self.wg.add_edge(self.dar_combo, self.dar_fraction_widget, edge_func=self.updateDarFromCombo) self.wg.add_edge(self.dar_fraction_widget, self.dar_combo, edge_func=self.updateDarFromFractionWidget) # keep par text field and combo in sync self.wg.add_edge(self.par_combo, self.par_fraction_widget, edge_func=self.updateParFromCombo) self.wg.add_edge(self.par_fraction_widget, self.par_combo, edge_func=self.updateParFromFractionWidget) # constrain DAR and PAR values. because the combo boxes are already # linked, we only have to link the fraction widgets together. self.wg.add_edge(self.par_fraction_widget, self.dar_fraction_widget, edge_func=self.updateDarFromPar) self.wg.add_edge(self.dar_fraction_widget, self.par_fraction_widget, edge_func=self.updateParFromDar) # update PAR when width/height change and the DAR checkbutton is # selected self.wg.add_edge(self.width_spinbutton, self.par_fraction_widget, predicate=self.darSelected, edge_func=self.updateParFromDar) self.wg.add_edge(self.height_spinbutton, self.par_fraction_widget, predicate=self.darSelected, edge_func=self.updateParFromDar) # update DAR when width/height change and the PAR checkbutton is # selected self.wg.add_edge(self.width_spinbutton, self.dar_fraction_widget, predicate=self.parSelected, edge_func=self.updateDarFromPar) self.wg.add_edge(self.height_spinbutton, self.dar_fraction_widget, predicate=self.parSelected, edge_func=self.updateDarFromPar) # presets self.audio_presets = AudioPresetManager() self.audio_presets.load() self.video_presets = VideoPresetManager() self.video_presets.load() self.fillTreeview(self.audio_preset_treeview, self.audio_presets) self.fillTreeview(self.video_preset_treeview, self.video_presets) self.bindSpinbutton(self.video_presets, "width", self.width_spinbutton) self.bindSpinbutton(self.video_presets, "height", self.height_spinbutton) self.bindFractionWidget(self.video_presets, "frame-rate", self.frame_rate_fraction_widget) self.bindPar(self.video_presets) 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.add_edge(self.par_fraction_widget, self.save_video_preset_button) self.wg.add_edge(self.frame_rate_fraction_widget, self.save_video_preset_button) self.wg.add_edge(self.width_spinbutton, self.save_video_preset_button) self.wg.add_edge(self.height_spinbutton, self.save_video_preset_button) self.wg.add_edge(self.channels_combo, self.save_audio_preset_button) self.wg.add_edge(self.sample_rate_combo, self.save_audio_preset_button) self.wg.add_edge(self.sample_depth_combo, self.save_audio_preset_button) self.updateUI()