[pitivi/ges: 180/287] Rename encode to render so the naming is the same in the code as in the UI
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges: 180/287] Rename encode to render so the naming is the same in the code as in the UI
- Date: Thu, 15 Mar 2012 16:40:58 +0000 (UTC)
commit eeaee722311e454489b45e1c9fe0cbddf40d7e39
Author: Thibault Saunier <thibault saunier collabora com>
Date: Tue Jan 10 13:26:17 2012 -0300
Rename encode to render so the naming is the same in the code as in the UI
data/ui/Makefile.am | 4 +-
data/ui/{encodingdialog.ui => renderingdialog.ui} | 4 +-
.../{encodingprogress.ui => renderingprogress.ui} | 2 +-
pitivi/Makefile.am | 2 +-
pitivi/{encode.py => render.py} | 210 ++++++++++----------
pitivi/settings.py | 64 +++---
pitivi/ui/mainwindow.py | 6 +-
pitivi/ui/preset.py | 8 +-
po/POTFILES.in | 6 +-
tests/test_settings.py | 4 +-
tests/test_still_image.py | 2 +-
11 files changed, 156 insertions(+), 156 deletions(-)
---
diff --git a/data/ui/Makefile.am b/data/ui/Makefile.am
index 9d1a4d9..6b7ee8d 100644
--- a/data/ui/Makefile.am
+++ b/data/ui/Makefile.am
@@ -2,8 +2,8 @@ uidir = $(pkgdatadir)/ui
ui_DATA = \
alignmentprogress.ui \
elementsettingsdialog.ui \
- encodingdialog.ui \
- encodingprogress.ui \
+ renderingdialog.ui \
+ renderingprogress.ui \
filelisterrordialog.ui \
mainwindow.xml \
preferences.ui \
diff --git a/data/ui/encodingdialog.ui b/data/ui/renderingdialog.ui
similarity index 99%
rename from data/ui/encodingdialog.ui
rename to data/ui/renderingdialog.ui
index 6c2ec86..739fe8f 100644
--- a/data/ui/encodingdialog.ui
+++ b/data/ui/renderingdialog.ui
@@ -468,7 +468,7 @@
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkComboBox" id="video_encoder_combo">
+ <object class="GtkComboBox" id="video_renderer_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">model2</property>
@@ -684,7 +684,7 @@
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkComboBox" id="audio_encoder_combo">
+ <object class="GtkComboBox" id="audio_renderer_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">model4</property>
diff --git a/data/ui/encodingprogress.ui b/data/ui/renderingprogress.ui
similarity index 98%
rename from data/ui/encodingprogress.ui
rename to data/ui/renderingprogress.ui
index 5b73680..c9d8cf0 100644
--- a/data/ui/encodingprogress.ui
+++ b/data/ui/renderingprogress.ui
@@ -119,7 +119,7 @@
<object class="GtkLabel" id="label9">
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Encoding first pass</property>
+ <property name="label" translatable="yes">Rendering first pass</property>
</object>
<packing>
<property name="left_attach">1</property>
diff --git a/pitivi/Makefile.am b/pitivi/Makefile.am
index e74801b..90633ec 100644
--- a/pitivi/Makefile.am
+++ b/pitivi/Makefile.am
@@ -11,7 +11,7 @@ pitivi_PYTHON = \
check.py \
configure.py \
effects.py \
- encode.py \
+ render.py \
instance.py \
project.py \
projectmanager.py \
diff --git a/pitivi/encode.py b/pitivi/render.py
similarity index 87%
rename from pitivi/encode.py
rename to pitivi/render.py
index 8415dd3..9590b8f 100644
--- a/pitivi/encode.py
+++ b/pitivi/render.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# PiTiVi , Non-linear video editor
#
-# pitivi/encode.py
+# pitivi/render.py
#
# Copyright (c) 2009, Edward Hervey <bilboed bilboed com>
#
@@ -21,7 +21,7 @@
# Boston, MA 02110-1301, USA.
"""
-Encoding-related utilities and classes
+Rendering-related utilities and classes
"""
import os
@@ -54,16 +54,16 @@ def get_compatible_sink_pad(factoryname, caps):
"""
factory = gst.registry_get_default().lookup_feature(factoryname)
if factory == None:
- log.warning("encode", "%s is not a valid factoryname", factoryname)
+ log.warning("render", "%s is not a valid factoryname", factoryname)
return None
res = []
sinkpads = [x for x in factory.get_static_pad_templates() if x.direction == gst.PAD_SINK]
for p in sinkpads:
c = p.get_caps()
- log.log("encode", "sinkcaps %s", c.to_string())
+ log.log("render", "sinkcaps %s", c.to_string())
inter = caps.intersect(c)
- log.log("encode", "intersection %s", inter.to_string())
+ log.log("render", "intersection %s", inter.to_string())
if inter:
res.append(p.name_template)
if len(res) > 0:
@@ -76,18 +76,18 @@ def get_compatible_sink_caps(factoryname, caps):
"""
Returns the compatible caps between 'caps' and the sink pad caps of 'factoryname'
"""
- log.log("encode", "factoryname : %s , caps : %s", factoryname, caps.to_string())
+ log.log("render", "factoryname : %s , caps : %s", factoryname, caps.to_string())
factory = gst.registry_get_default().lookup_feature(factoryname)
if factory == None:
- log.warning("encode", "%s is not a valid factoryname", factoryname)
+ log.warning("render", "%s is not a valid factoryname", factoryname)
return None
res = []
sinkcaps = [x.get_caps() for x in factory.get_static_pad_templates() if x.direction == gst.PAD_SINK]
for c in sinkcaps:
- log.log("encode", "sinkcaps %s", c.to_string())
+ log.log("render", "sinkcaps %s", c.to_string())
inter = caps.intersect(c)
- log.log("encode", "intersection %s", inter.to_string())
+ log.log("render", "intersection %s", inter.to_string())
if inter:
res.append(inter)
@@ -156,12 +156,12 @@ class CachedEncoderList(object):
self._buildFactories()
return self._muxers
- def available_audio_encoders(self):
+ def available_audio_renderers(self):
if self._factories is None:
self._buildFactories()
return self._audioEncoders
- def available_video_encoders(self):
+ def available_video_renderers(self):
if self._factories is None:
self._buildFactories()
return self._videoEncoders
@@ -169,44 +169,44 @@ class CachedEncoderList(object):
def _registryFeatureAddedCb(self, registry, feature):
self._factories = None
-_cached_encoder_list = None
+_cached_renderer_list = None
-def encoderlist():
- global _cached_encoder_list
- if _cached_encoder_list is None:
- _cached_encoder_list = CachedEncoderList()
- return _cached_encoder_list
+def rendererlist():
+ global _cached_renderer_list
+ if _cached_renderer_list is None:
+ _cached_renderer_list = CachedEncoderList()
+ return _cached_renderer_list
def available_muxers():
""" return all available muxers """
- enclist = encoderlist()
+ enclist = rendererlist()
return enclist.available_muxers()
-def available_video_encoders():
- """ returns all available video encoders """
- enclist = encoderlist()
- return enclist.available_video_encoders()
+def available_video_renderers():
+ """ returns all available video renderers """
+ enclist = rendererlist()
+ return enclist.available_video_renderers()
-def available_audio_encoders():
- """ returns all available audio encoders """
- enclist = encoderlist()
- return enclist.available_audio_encoders()
+def available_audio_renderers():
+ """ returns all available audio renderers """
+ enclist = rendererlist()
+ return enclist.available_audio_renderers()
-def encoders_muxer_compatible(encoders, muxer, muxsinkcaps=[]):
- """ returns the list of encoders compatible with the given muxer """
+def renderers_muxer_compatible(renderers, muxer, muxsinkcaps=[]):
+ """ returns the list of renderers compatible with the given muxer """
res = []
if muxsinkcaps == []:
muxsinkcaps = [x.get_caps() for x in muxer.get_static_pad_templates() if x.direction == gst.PAD_SINK]
- for encoder in encoders:
- for tpl in encoder.get_static_pad_templates():
+ for renderer in renderers:
+ for tpl in renderer.get_static_pad_templates():
if tpl.direction == gst.PAD_SRC:
if my_can_sink_caps(muxer, tpl.get_caps(), muxsinkcaps):
- res.append(encoder)
+ res.append(renderer)
break
return res
@@ -228,12 +228,12 @@ def muxer_can_sink_raw_video(muxer):
def available_combinations():
"""Return a 3-tuple of (muxers, audio, video), where:
- muxers is a list of muxer factories
- - audio is a dictionary from muxer names to compatible audio encoders
- - video is a dictionary from muxer names to compatible video encoders
+ - audio is a dictionary from muxer names to compatible audio renderers
+ - video is a dictionary from muxer names to compatible video renderers
"""
- aencoders = available_audio_encoders()
- vencoders = available_video_encoders()
+ arenderers = available_audio_renderers()
+ vrenderers = available_video_renderers()
muxers = available_muxers()
audio = {}
@@ -241,8 +241,8 @@ def available_combinations():
containers = []
for muxer in muxers:
mux = muxer.get_name()
- aencs = encoders_muxer_compatible(aencoders, muxer)
- vencs = encoders_muxer_compatible(vencoders, muxer)
+ aencs = renderers_muxer_compatible(arenderers, muxer)
+ vencs = renderers_muxer_compatible(vrenderers, muxer)
# only include muxers with audio and video
if aencs and vencs:
@@ -324,14 +324,14 @@ class EncodingProgressDialog(Signallable):
self.system = app.app.system
self.builder = gtk.Builder()
self.builder.add_from_file(os.path.join(configure.get_ui_dir(),
- "encodingprogress.ui"))
+ "renderingprogress.ui"))
self.builder.connect_signals(self)
self.window = self.builder.get_object("render-progress")
self.table1 = self.builder.get_object("table1")
self.progressbar = self.builder.get_object("progressbar")
self.play_pause_button = self.builder.get_object("play_pause_button")
- # Parent the dialog with mainwindow, since encodingdialog is hidden.
+ # Parent the dialog with mainwindow, since renderingdialog is hidden.
# It allows this dialog to properly minimize together with mainwindow
self.window.set_transient_for(self.app)
@@ -366,10 +366,10 @@ class EncodingProgressDialog(Signallable):
class EncodingDialog(Loggable):
"""Render dialog box.
- @ivar preferred_aencoder: The last audio encoder selected by the user.
- @type preferred_aencoder: str
- @ivar preferred_vencoder: The last video encoder selected by the user.
- @type preferred_vencoder: str
+ @ivar preferred_arenderer: The last audio renderer selected by the user.
+ @type preferred_arenderer: str
+ @ivar preferred_vrenderer: The last video renderer selected by the user.
+ @type preferred_vrenderer: str
@ivar settings: The settings used for rendering.
@type settings: MultimediaSettings
"""
@@ -401,7 +401,7 @@ class EncodingDialog(Loggable):
self.builder = gtk.Builder()
self.builder.add_from_file(os.path.join(configure.get_ui_dir(),
- "encodingdialog.ui"))
+ "renderingdialog.ui"))
self._setProperties()
self.builder.connect_signals(self)
@@ -428,10 +428,10 @@ class EncodingDialog(Loggable):
self.updateFilename(self.project.name)
# We store these so that when the user tries various container formats,
- # (AKA muxers) we select these a/v encoders, if they are compatible with
+ # (AKA muxers) we select these a/v renderers, if they are compatible with
# the current container format.
- self.preferred_vencoder = self.settings.vencoder
- self.preferred_aencoder = self.settings.aencoder
+ self.preferred_vrenderer = self.settings.vrenderer
+ self.preferred_arenderer = self.settings.arenderer
self._initializeComboboxModels()
self._displaySettings()
@@ -450,8 +450,8 @@ class EncodingDialog(Loggable):
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")
+ self.wg.addVertex(self.audio_renderer_combo, signal="changed")
+ self.wg.addVertex(self.video_renderer_combo, signal="changed")
self.render_presets = RenderPresetManager()
self.render_presets.loadAll()
@@ -461,9 +461,9 @@ class EncodingDialog(Loggable):
self.wg.addEdge(self.frame_rate_combo,
self.save_render_preset_button)
- self.wg.addEdge(self.audio_encoder_combo,
+ self.wg.addEdge(self.audio_renderer_combo,
self.save_render_preset_button)
- self.wg.addEdge(self.video_encoder_combo,
+ self.wg.addEdge(self.video_renderer_combo,
self.save_render_preset_button)
self.wg.addEdge(self.muxercombobox,
self.save_render_preset_button)
@@ -485,9 +485,9 @@ class EncodingDialog(Loggable):
self.bindCombo(self.render_presets, "depth",
self.sample_depth_combo)
self.bindCombo(self.render_presets, "acodec",
- self.audio_encoder_combo)
+ self.audio_renderer_combo)
self.bindCombo(self.render_presets, "vcodec",
- self.video_encoder_combo)
+ self.video_renderer_combo)
self.bindCombo(self.render_presets, "container",
self.muxercombobox)
self.bindCombo(self.render_presets, "frame-rate",
@@ -502,8 +502,8 @@ class EncodingDialog(Loggable):
"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(),
- "vcodec": get_combo_value(self.video_encoder_combo).get_name(),
+ "acodec": get_combo_value(self.audio_renderer_combo).get_name(),
+ "vcodec": get_combo_value(self.video_renderer_combo).get_name(),
"container": get_combo_value(self.muxercombobox).get_name(),
"frame-rate": gst.Fraction(int(get_combo_value(self.frame_rate_combo).num),
int(get_combo_value(self.frame_rate_combo).denom)),
@@ -548,7 +548,7 @@ class EncodingDialog(Loggable):
def muxer_setter(self, widget, value):
set_combo_value(widget, gst.element_factory_find(value))
- self.settings.setEncoders(muxer=value)
+ self.settings.setRenderers(muxer=value)
# Update the extension of the filename.
basename = os.path.splitext(self.fileentry.get_text())[0]
@@ -563,17 +563,17 @@ class EncodingDialog(Loggable):
def acodec_setter(self, widget, value):
set_combo_value(widget, gst.element_factory_find(value))
- self.settings.setEncoders(aencoder=value)
+ self.settings.setRenderers(arenderer=value)
if not self.muxer_combo_changing:
- # The user directly changed the audio encoder combo.
- self.preferred_aencoder = value
+ # The user directly changed the audio renderer combo.
+ self.preferred_arenderer = value
def vcodec_setter(self, widget, value):
set_combo_value(widget, gst.element_factory_find(value))
- self.settings.setEncoders(vencoder=value)
+ self.settings.setRenderers(vrenderer=value)
if not self.muxer_combo_changing:
- # The user directly changed the video encoder combo.
- self.preferred_vencoder = value
+ # The user directly changed the video renderer combo.
+ self.preferred_vrenderer = value
def sample_depth_setter(self, widget, value):
set_combo_value(widget, value)
@@ -703,8 +703,8 @@ class EncodingDialog(Loggable):
"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(),
- "vcodec": get_combo_value(self.video_encoder_combo).get_name(),
+ "acodec": get_combo_value(self.audio_renderer_combo).get_name(),
+ "vcodec": get_combo_value(self.video_renderer_combo).get_name(),
"container": get_combo_value(self.muxercombobox).get_name(),
"frame-rate": gst.Fraction(int(get_combo_value(self.frame_rate_combo).num),
int(get_combo_value(self.frame_rate_combo).denom)),
@@ -756,10 +756,10 @@ class EncodingDialog(Loggable):
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")
+ self.audio_renderer_combo = self.builder.get_object(
+ "audio_renderer_combo")
+ self.video_renderer_combo = self.builder.get_object(
+ "video_renderer_combo")
self.filebutton = self.builder.get_object("filebutton")
self.fileentry = self.builder.get_object("fileentry")
self.resolution_label = self.builder.get_object("resolution_label")
@@ -837,31 +837,31 @@ class EncodingDialog(Loggable):
self.fileentry.set_text(name)
def updateAvailableEncoders(self):
- """Update the encoder comboboxes to show the available encoders."""
- video_encoders = self.settings.getVideoEncoders()
- video_encoder_model = factorylist(video_encoders)
- self.video_encoder_combo.set_model(video_encoder_model)
+ """Update the renderer comboboxes to show the available renderers."""
+ video_renderers = self.settings.getVideoEncoders()
+ video_renderer_model = factorylist(video_renderers)
+ self.video_renderer_combo.set_model(video_renderer_model)
- audio_encoders = self.settings.getAudioEncoders()
- audio_encoder_model = factorylist(audio_encoders)
- self.audio_encoder_combo.set_model(audio_encoder_model)
+ audio_renderers = self.settings.getAudioEncoders()
+ audio_renderer_model = factorylist(audio_renderers)
+ self.audio_renderer_combo.set_model(audio_renderer_model)
self._updateEncoderCombo(
- self.video_encoder_combo, self.preferred_vencoder)
+ self.video_renderer_combo, self.preferred_vrenderer)
self._updateEncoderCombo(
- self.audio_encoder_combo, self.preferred_aencoder)
+ self.audio_renderer_combo, self.preferred_arenderer)
- def _updateEncoderCombo(self, encoder_combo, preferred_encoder):
- """Select the specified encoder for the specified encoder combo."""
- if preferred_encoder:
+ def _updateEncoderCombo(self, renderer_combo, preferred_renderer):
+ """Select the specified renderer for the specified renderer combo."""
+ if preferred_renderer:
# 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)
+ vrenderer = gst.element_factory_find(preferred_renderer)
+ set_combo_value(renderer_combo, vrenderer, default_index=0)
else:
- # No preferrence exists, pick the first encoder from
+ # No preferrence exists, pick the first renderer from
# the current model of the combobox.
- encoder_combo.set_active(0)
+ renderer_combo.set_active(0)
def _elementSettingsDialog(self, factory, settings_attr):
"""Open a dialog to edit the properties for the specified factory.
@@ -907,7 +907,7 @@ class EncodingDialog(Loggable):
""" Handle the completion or the cancellation of the render process. """
self.progress.window.destroy()
self.progress = None
- self.window.show() # Show the encoding dialog again
+ self.window.show() # Show the rendering dialog again
def _disconnectFromGst(self):
for obj, id in self._gstSigId.iteritems():
@@ -920,8 +920,8 @@ class EncodingDialog(Loggable):
"""
settings = self.project.getSettings()
if (settings.muxer == self.settings.muxer
- and settings.aencoder == self.settings.aencoder
- and settings.vencoder == self.settings.vencoder
+ and settings.arenderer == self.settings.arenderer
+ and settings.vrenderer == self.settings.vrenderer
and settings.containersettings == self.settings.containersettings
and settings.acodecsettings == self.settings.acodecsettings
and settings.vcodecsettings == self.settings.vcodecsettings
@@ -929,9 +929,9 @@ class EncodingDialog(Loggable):
# No setting which can be changed in the Render dialog
# and which we want to save have been changed.
return
- settings.setEncoders(muxer=self.settings.muxer,
- aencoder=self.settings.aencoder,
- vencoder=self.settings.vencoder)
+ settings.setRenderers(muxer=self.settings.muxer,
+ arenderer=self.settings.arenderer,
+ vrenderer=self.settings.vrenderer)
settings.containersettings = self.settings.containersettings
settings.acodecsettings = self.settings.acodecsettings
settings.vcodecsettings = self.settings.vcodecsettings
@@ -1013,10 +1013,10 @@ class EncodingDialog(Loggable):
def _elementAddedCb(self, bin, element):
# Setting properties on gst.Element-s has they are added to the
# gst.Encodebin
- if element.get_factory() == get_combo_value(self.video_encoder_combo):
+ if element.get_factory() == get_combo_value(self.video_renderer_combo):
for setting in self.settings.vcodecsettings:
element.set_property(setting, self.settings.vcodecsettings[setting])
- elif element.get_factory() == get_combo_value(self.audio_encoder_combo):
+ elif element.get_factory() == get_combo_value(self.audio_renderer_combo):
for setting in self.settings.acodecsettings:
element.set_property(setting, self.settings.vcodecsettings[setting])
@@ -1052,21 +1052,21 @@ class EncodingDialog(Loggable):
self.settings.setVideoProperties(framerate=framerate)
def _videoEncoderComboChangedCb(self, combo):
- vencoder = get_combo_value(combo).get_name()
- for template in gst.registry_get_default().lookup_feature(vencoder).get_static_pad_templates():
+ vrenderer = get_combo_value(combo).get_name()
+ for template in gst.registry_get_default().lookup_feature(vrenderer).get_static_pad_templates():
if template.name_template == "src":
self.videotype = template.get_caps().to_string()
for elem in self.videotype.split(","):
if "{" in elem or "[" in elem:
self.videotype = self.videotype[:self.videotype.index(elem) - 1]
break
- self.settings.setEncoders(vencoder=vencoder)
+ self.settings.setRenderers(vrenderer=vrenderer)
if not self.muxer_combo_changing:
- # The user directly changed the video encoder combo.
- self.preferred_vencoder = vencoder
+ # The user directly changed the video renderer combo.
+ self.preferred_vrenderer = vrenderer
def _videoSettingsButtonClickedCb(self, button):
- factory = get_combo_value(self.video_encoder_combo)
+ factory = get_combo_value(self.video_renderer_combo)
self._elementSettingsDialog(factory, 'vcodecsettings')
def _channelsComboChangedCb(self, combo):
@@ -1079,9 +1079,9 @@ class EncodingDialog(Loggable):
self.settings.setAudioProperties(rate=get_combo_value(combo))
def _audioEncoderChangedComboCb(self, combo):
- aencoder = get_combo_value(combo).get_name()
- self.settings.setEncoders(aencoder=aencoder)
- for template in gst.registry_get_default().lookup_feature(aencoder).get_static_pad_templates():
+ arenderer = get_combo_value(combo).get_name()
+ self.settings.setRenderers(arenderer=arenderer)
+ for template in gst.registry_get_default().lookup_feature(arenderer).get_static_pad_templates():
if template.name_template == "src":
self.audiotype = template.get_caps().to_string()
for elem in self.audiotype.split(","):
@@ -1089,11 +1089,11 @@ class EncodingDialog(Loggable):
self.audiotype = self.audiotype[:self.audiotype.index(elem) - 1]
break
if not self.muxer_combo_changing:
- # The user directly changed the audio encoder combo.
- self.preferred_aencoder = aencoder
+ # The user directly changed the audio renderer combo.
+ self.preferred_arenderer = arenderer
def _audioSettingsButtonClickedCb(self, button):
- factory = get_combo_value(self.audio_encoder_combo)
+ factory = get_combo_value(self.audio_renderer_combo)
self._elementSettingsDialog(factory, 'acodecsettings')
def _muxerComboChangedCb(self, muxer_combo):
@@ -1102,7 +1102,7 @@ class EncodingDialog(Loggable):
for template in gst.registry_get_default().lookup_feature(muxer).get_static_pad_templates():
if template.name_template == "src":
self.muxertype = template.get_caps().to_string()
- self.settings.setEncoders(muxer=muxer)
+ self.settings.setRenderers(muxer=muxer)
# Update the extension of the filename.
basename = os.path.splitext(self.fileentry.get_text())[0]
diff --git a/pitivi/settings.py b/pitivi/settings.py
index cdf79e8..f29713e 100644
--- a/pitivi/settings.py
+++ b/pitivi/settings.py
@@ -31,7 +31,7 @@ import xdg.BaseDirectory as xdg_dirs # Freedesktop directories spec
from gettext import gettext as _
from pitivi.utils.signal import Signallable
-from pitivi.encode import available_combinations, \
+from pitivi.render import available_combinations, \
get_compatible_sink_caps
from pitivi.utils.loggable import Loggable
@@ -321,11 +321,11 @@ class GlobalSettings(Signallable):
class MultimediaSettings(Signallable, Loggable):
"""
- Multimedia encoding and previewing settings
+ Multimedia rendering and previewing settings
Signals:
'settings-changed' : the settings have changed
- 'encoders-changed' : The encoders or muxer have changed
+ 'renderers-changed' : The renderers or muxer have changed
@ivar render_scale: The scale to be applied to the video width and height
when rendering.
@@ -333,7 +333,7 @@ class MultimediaSettings(Signallable, Loggable):
"""
__signals__ = {
"settings-changed": None,
- "encoders-changed": None,
+ "renderers-changed": None,
}
# Audio/Video settings for processing/export
@@ -341,7 +341,7 @@ class MultimediaSettings(Signallable, Loggable):
# TODO : Add PAR/DAR for video
# TODO : switch to using GstFraction internally where appliable
- muxers, aencoders, vencoders = available_combinations()
+ muxers, arenderers, vrenderers = available_combinations()
def __init__(self, **unused_kw):
Loggable.__init__(self)
@@ -353,14 +353,14 @@ class MultimediaSettings(Signallable, Loggable):
self.audiochannels = 2
self.audiorate = 44100
self.audiodepth = 16
- self.vencoder = None
- self.aencoder = None
+ self.vrenderer = None
+ self.arenderer = None
self.muxer = "oggmux"
# A (muxer -> containersettings) map.
self._containersettings_cache = {}
- # A (vencoder -> vcodecsettings) map.
+ # A (vrenderer -> vcodecsettings) map.
self._vcodecsettings_cache = {}
- # A (aencoder -> acodecsettings) map.
+ # A (arenderer -> acodecsettings) map.
self._acodecsettings_cache = {}
def copy(self):
@@ -373,8 +373,8 @@ class MultimediaSettings(Signallable, Loggable):
ret.audiochannels = self.audiochannels
ret.audiorate = self.audiorate
ret.audiodepth = self.audiodepth
- ret.vencoder = self.vencoder
- ret.aencoder = self.aencoder
+ ret.vrenderer = self.vrenderer
+ ret.arenderer = self.arenderer
ret.muxer = self.muxer
ret.containersettings = dict(self.containersettings)
ret.acodecsettings = dict(self.acodecsettings)
@@ -388,10 +388,10 @@ class MultimediaSettings(Signallable, Loggable):
msg = _("Export Settings\n")
msg += _("Video: ") + str(self.videowidth) + " " + str(self.videoheight) +\
" " + str(self.videorate) + " " + str(self.videopar)
- msg += "\n\t" + str(self.vencoder) + " " + str(self.vcodecsettings)
+ msg += "\n\t" + str(self.vrenderer) + " " + str(self.vcodecsettings)
msg += _("\nAudio: ") + str(self.audiochannels) + " " + str(self.audiorate) +\
" " + str(self.audiodepth)
- msg += "\n\t" + str(self.aencoder) + " " + str(self.acodecsettings)
+ msg += "\n\t" + str(self.arenderer) + " " + str(self.acodecsettings)
msg += _("\nMuxer: ") + str(self.muxer) + " " + str(self.containersettings)
return msg
@@ -417,8 +417,8 @@ class MultimediaSettings(Signallable, Loggable):
self.videorate.num, self.videorate.denom)
caps_str = "video/x-raw-yuv,%s;video/x-raw-rgb,%s" % (vstr, vstr)
video_caps = gst.caps_from_string(caps_str)
- if self.vencoder:
- return get_compatible_sink_caps(self.vencoder, video_caps)
+ if self.vrenderer:
+ return get_compatible_sink_caps(self.vrenderer, video_caps)
return video_caps
def getAudioCaps(self):
@@ -427,8 +427,8 @@ class MultimediaSettings(Signallable, Loggable):
astr = "rate=%d,channels=%d" % (self.audiorate, self.audiochannels)
caps_str = "audio/x-raw-int,%s;audio/x-raw-float,%s" % (astr, astr)
audio_caps = gst.caps_from_string(caps_str)
- if self.aencoder:
- return get_compatible_sink_caps(self.aencoder, audio_caps)
+ if self.arenderer:
+ return get_compatible_sink_caps(self.arenderer, audio_caps)
return audio_caps
def setVideoProperties(self, width=-1, height=-1, framerate=-1, par=-1,
@@ -470,20 +470,20 @@ class MultimediaSettings(Signallable, Loggable):
if changed:
self.emit("settings-changed")
- def setEncoders(self, muxer="", vencoder="", aencoder=""):
- """ Set the video/audio encoder and muxer """
+ def setRenderers(self, muxer="", vrenderer="", arenderer=""):
+ """ Set the video/audio renderer and muxer """
changed = False
if not muxer == "" and not muxer == self.muxer:
self.muxer = muxer
changed = True
- if not vencoder == "" and not vencoder == self.vencoder:
- self.vencoder = vencoder
+ if not vrenderer == "" and not vrenderer == self.vrenderer:
+ self.vrenderer = vrenderer
changed = True
- if not aencoder == "" and not aencoder == self.aencoder:
- self.aencoder = aencoder
+ if not arenderer == "" and not arenderer == self.arenderer:
+ self.arenderer = arenderer
changed = True
if changed:
- self.emit("encoders-changed")
+ self.emit("renderers-changed")
@property
def containersettings(self):
@@ -495,26 +495,26 @@ class MultimediaSettings(Signallable, Loggable):
@property
def vcodecsettings(self):
- return self._vcodecsettings_cache.setdefault(self.vencoder, {})
+ return self._vcodecsettings_cache.setdefault(self.vrenderer, {})
@vcodecsettings.setter
def vcodecsettings(self, value):
- self._vcodecsettings_cache[self.vencoder] = value
+ self._vcodecsettings_cache[self.vrenderer] = value
@property
def acodecsettings(self):
- return self._acodecsettings_cache.setdefault(self.aencoder, {})
+ return self._acodecsettings_cache.setdefault(self.arenderer, {})
@acodecsettings.setter
def acodecsettings(self, value):
- self._acodecsettings_cache[self.aencoder] = value
+ self._acodecsettings_cache[self.arenderer] = value
def getAudioEncoders(self):
- """ Returns the list of audio encoders compatible with the current
+ """ Returns the list of audio renderers compatible with the current
muxer """
- return self.aencoders[self.muxer]
+ return self.arenderers[self.muxer]
def getVideoEncoders(self):
- """ Returns the list of video encoders compatible with the current
+ """ Returns the list of video renderers compatible with the current
muxer """
- return self.vencoders[self.muxer]
+ return self.vrenderers[self.muxer]
diff --git a/pitivi/ui/mainwindow.py b/pitivi/ui/mainwindow.py
index 5cded30..5b8d4b4 100644
--- a/pitivi/ui/mainwindow.py
+++ b/pitivi/ui/mainwindow.py
@@ -218,14 +218,14 @@ class PitiviMainWindow(gtk.Window, Loggable):
@param pause: If C{True}, pause the timeline before displaying the dialog.
@type pause: C{bool}
"""
- from encoding import EncodingDialog
+ from pitivi.render import EncodingDialog
dialog = EncodingDialog(self, project)
- dialog.window.connect("destroy", self._encodingDialogDestroyCb)
+ dialog.window.connect("destroy", self._renderingDialogDestroyCb)
self.set_sensitive(False)
dialog.window.show()
- def _encodingDialogDestroyCb(self, unused_dialog):
+ def _renderingDialogDestroyCb(self, unused_dialog):
self.set_sensitive(True)
def _recordCb(self, unused_button):
diff --git a/pitivi/ui/preset.py b/pitivi/ui/preset.py
index 5a8f213..11b43ec 100644
--- a/pitivi/ui/preset.py
+++ b/pitivi/ui/preset.py
@@ -25,8 +25,8 @@ import gst
import gtk
import json
-from pitivi.encode import available_muxers, available_video_encoders, \
- available_audio_encoders
+from pitivi.render import available_muxers, available_video_renderers, \
+ available_audio_renderers
from pitivi.settings import xdg_data_home
from pitivi.utils.misc import isWritable
from pitivi.configure import get_renderpresets_dir, \
@@ -389,8 +389,8 @@ class RenderPresetManager(PresetManager):
acodec = parser["acodec"]
vcodec = parser["vcodec"]
- if (acodec not in [fact.get_name() for fact in available_audio_encoders()] or
- vcodec not in [fact.get_name() for fact in available_video_encoders()] or
+ if (acodec not in [fact.get_name() for fact in available_audio_renderers()] or
+ vcodec not in [fact.get_name() for fact in available_video_renderers()] or
container not in [fact.get_name() for fact in available_muxers()]):
return
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b47d7a7..c09d260 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -6,8 +6,8 @@ data/pitivi.desktop.in.in
[type: gettext/glade]data/ui/cliptransformation.ui
[type: gettext/glade]data/ui/depsmanager.ui
[type: gettext/glade]data/ui/elementsettingsdialog.ui
-[type: gettext/glade]data/ui/encodingdialog.ui
-[type: gettext/glade]data/ui/encodingprogress.ui
+[type: gettext/glade]data/ui/renderingdialog.ui
+[type: gettext/glade]data/ui/renderingprogress.ui
[type: gettext/glade]data/ui/filelisterrordialog.ui
[type: gettext/glade]data/ui/preferences.ui
[type: gettext/glade]data/ui/projectsettings.ui
@@ -15,7 +15,7 @@ data/pitivi.desktop.in.in
pitivi/application.py
pitivi/check.py
pitivi/effects.py
-pitivi/encode.py
+pitivi/render.py
pitivi/projectmanager.py
pitivi/project.py
pitivi/settings.py
diff --git a/tests/test_settings.py b/tests/test_settings.py
index 2a13630..8e6d6da 100644
--- a/tests/test_settings.py
+++ b/tests/test_settings.py
@@ -10,8 +10,8 @@ class TestExportSettings(unittest.TestCase):
def testMasterAttributes(self):
self._testMasterAttribute('muxer', dependant_attr='containersettings')
- self._testMasterAttribute('vencoder', dependant_attr='vcodecsettings')
- self._testMasterAttribute('aencoder', dependant_attr='acodecsettings')
+ self._testMasterAttribute('vrenderer', dependant_attr='vcodecsettings')
+ self._testMasterAttribute('arenderer', dependant_attr='acodecsettings')
def _testMasterAttribute(self, attr, dependant_attr):
"""Test changing the specified attr has effect on its dependant attr."""
diff --git a/tests/test_still_image.py b/tests/test_still_image.py
index eefff9c..dc095af 100644
--- a/tests/test_still_image.py
+++ b/tests/test_still_image.py
@@ -64,7 +64,7 @@ class TestStillImage(TestCase):
self.timeline = Timeline()
self.timeline.addTrack(self.track)
- vsettings = StreamEncodeSettings(encoder="theoraenc")
+ vsettings = StreamEncodeSettings(renderer="theoraenc")
rsettings = RenderSettings(settings=[vsettings],
muxer="oggmux")
self.fakesink = common.FakeSinkFactory()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]