[pitivi/ges: 203/287] Selectively use the word "encoder" when talking about codecs
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges: 203/287] Selectively use the word "encoder" when talking about codecs
- Date: Thu, 15 Mar 2012 16:42:54 +0000 (UTC)
commit 6a5e5dfdfe25ba26b5d54c75dfd1aacb361ddfea
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Wed Jan 11 10:05:57 2012 -0500
Selectively use the word "encoder" when talking about codecs
data/ui/renderingdialog.ui | 4 +-
pitivi/preset.py | 8 +-
pitivi/render.py | 186 ++++++++++++++++++++++----------------------
pitivi/settings.py | 60 +++++++-------
tests/test_settings.py | 4 +-
5 files changed, 131 insertions(+), 131 deletions(-)
---
diff --git a/data/ui/renderingdialog.ui b/data/ui/renderingdialog.ui
index 739fe8f..6c2ec86 100644
--- a/data/ui/renderingdialog.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_renderer_combo">
+ <object class="GtkComboBox" id="video_encoder_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_renderer_combo">
+ <object class="GtkComboBox" id="audio_encoder_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">model4</property>
diff --git a/pitivi/preset.py b/pitivi/preset.py
index 12e9d35..9672c35 100644
--- a/pitivi/preset.py
+++ b/pitivi/preset.py
@@ -25,8 +25,8 @@ import gst
import gtk
import json
-from pitivi.render import available_muxers, available_video_renderers, \
- available_audio_renderers
+from pitivi.render import available_muxers, available_video_encoders, \
+ available_audio_encoders
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_renderers()] or
- vcodec not in [fact.get_name() for fact in available_video_renderers()] or
+ 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
container not in [fact.get_name() for fact in available_muxers()]):
return
diff --git a/pitivi/render.py b/pitivi/render.py
index 60064ed..ac99306 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -156,12 +156,12 @@ class CachedEncoderList(object):
self._buildFactories()
return self._muxers
- def available_audio_renderers(self):
+ def available_audio_encoders(self):
if self._factories is None:
self._buildFactories()
return self._audioEncoders
- def available_video_renderers(self):
+ def available_video_encoders(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_renderer_list = None
+_cached_encoder_list = None
-def rendererlist():
- global _cached_renderer_list
- if _cached_renderer_list is None:
- _cached_renderer_list = CachedEncoderList()
- return _cached_renderer_list
+def encoderlist():
+ global _cached_encoder_list
+ if _cached_encoder_list is None:
+ _cached_encoder_list = CachedEncoderList()
+ return _cached_encoder_list
def available_muxers():
""" return all available muxers """
- enclist = rendererlist()
+ enclist = encoderlist()
return enclist.available_muxers()
-def available_video_renderers():
- """ returns all available video renderers """
- enclist = rendererlist()
- return enclist.available_video_renderers()
+def available_video_encoders():
+ """ returns all available video encoders """
+ enclist = encoderlist()
+ return enclist.available_video_encoders()
-def available_audio_renderers():
- """ returns all available audio renderers """
- enclist = rendererlist()
- return enclist.available_audio_renderers()
+def available_audio_encoders():
+ """ returns all available audio encoders """
+ enclist = encoderlist()
+ return enclist.available_audio_encoders()
-def renderers_muxer_compatible(renderers, muxer, muxsinkcaps=[]):
- """ returns the list of renderers compatible with the given muxer """
+def encoders_muxer_compatible(encoders, muxer, muxsinkcaps=[]):
+ """ returns the list of encoders 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 renderer in renderers:
- for tpl in renderer.get_static_pad_templates():
+ for encoder in encoders:
+ for tpl in encoder.get_static_pad_templates():
if tpl.direction == gst.PAD_SRC:
if my_can_sink_caps(muxer, tpl.get_caps(), muxsinkcaps):
- res.append(renderer)
+ res.append(encoder)
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 renderers
- - video is a dictionary from muxer names to compatible video renderers
+ - audio is a dictionary from muxer names to compatible audio encoders
+ - video is a dictionary from muxer names to compatible video encoders
"""
- arenderers = available_audio_renderers()
- vrenderers = available_video_renderers()
+ aencoders = available_audio_encoders()
+ vencoders = available_video_encoders()
muxers = available_muxers()
audio = {}
@@ -241,8 +241,8 @@ def available_combinations():
containers = []
for muxer in muxers:
mux = muxer.get_name()
- aencs = renderers_muxer_compatible(arenderers, muxer)
- vencs = renderers_muxer_compatible(vrenderers, muxer)
+ aencs = encoders_muxer_compatible(aencoders, muxer)
+ vencs = encoders_muxer_compatible(vencoders, muxer)
# only include muxers with audio and video
if aencs and vencs:
@@ -366,10 +366,10 @@ class RenderingProgressDialog(Signallable):
class RenderDialog(Loggable):
"""Render dialog box.
- @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 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 settings: The settings used for rendering.
@type settings: MultimediaSettings
"""
@@ -428,10 +428,10 @@ class RenderDialog(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 renderers, if they are compatible with
+ # (AKA muxers) we select these a/v encoders, if they are compatible with
# the current container format.
- self.preferred_vrenderer = self.settings.vrenderer
- self.preferred_arenderer = self.settings.arenderer
+ self.preferred_vencoder = self.settings.vencoder
+ self.preferred_aencoder = self.settings.aencoder
self._initializeComboboxModels()
self._displaySettings()
@@ -450,8 +450,8 @@ class RenderDialog(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_renderer_combo, signal="changed")
- self.wg.addVertex(self.video_renderer_combo, signal="changed")
+ self.wg.addVertex(self.audio_encoder_combo, signal="changed")
+ self.wg.addVertex(self.video_encoder_combo, signal="changed")
self.render_presets = RenderPresetManager()
self.render_presets.loadAll()
@@ -461,9 +461,9 @@ class RenderDialog(Loggable):
self.wg.addEdge(self.frame_rate_combo,
self.save_render_preset_button)
- self.wg.addEdge(self.audio_renderer_combo,
+ self.wg.addEdge(self.audio_encoder_combo,
self.save_render_preset_button)
- self.wg.addEdge(self.video_renderer_combo,
+ self.wg.addEdge(self.video_encoder_combo,
self.save_render_preset_button)
self.wg.addEdge(self.muxercombobox,
self.save_render_preset_button)
@@ -485,9 +485,9 @@ class RenderDialog(Loggable):
self.bindCombo(self.render_presets, "depth",
self.sample_depth_combo)
self.bindCombo(self.render_presets, "acodec",
- self.audio_renderer_combo)
+ self.audio_encoder_combo)
self.bindCombo(self.render_presets, "vcodec",
- self.video_renderer_combo)
+ self.video_encoder_combo)
self.bindCombo(self.render_presets, "container",
self.muxercombobox)
self.bindCombo(self.render_presets, "frame-rate",
@@ -502,8 +502,8 @@ class RenderDialog(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_renderer_combo).get_name(),
- "vcodec": get_combo_value(self.video_renderer_combo).get_name(),
+ "acodec": get_combo_value(self.audio_encoder_combo).get_name(),
+ "vcodec": get_combo_value(self.video_encoder_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 RenderDialog(Loggable):
def muxer_setter(self, widget, value):
set_combo_value(widget, gst.element_factory_find(value))
- self.settings.setRenderers(muxer=value)
+ self.settings.setEncoders(muxer=value)
# Update the extension of the filename.
basename = os.path.splitext(self.fileentry.get_text())[0]
@@ -563,17 +563,17 @@ class RenderDialog(Loggable):
def acodec_setter(self, widget, value):
set_combo_value(widget, gst.element_factory_find(value))
- self.settings.setRenderers(arenderer=value)
+ self.settings.setEncoders(aencoder=value)
if not self.muxer_combo_changing:
- # The user directly changed the audio renderer combo.
- self.preferred_arenderer = value
+ # The user directly changed the audio encoder combo.
+ self.preferred_aencoder = value
def vcodec_setter(self, widget, value):
set_combo_value(widget, gst.element_factory_find(value))
- self.settings.setRenderers(vrenderer=value)
+ self.settings.setEncoders(vencoder=value)
if not self.muxer_combo_changing:
- # The user directly changed the video renderer combo.
- self.preferred_vrenderer = value
+ # The user directly changed the video encoder combo.
+ self.preferred_vencoder = value
def sample_depth_setter(self, widget, value):
set_combo_value(widget, value)
@@ -703,8 +703,8 @@ class RenderDialog(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_renderer_combo).get_name(),
- "vcodec": get_combo_value(self.video_renderer_combo).get_name(),
+ "acodec": get_combo_value(self.audio_encoder_combo).get_name(),
+ "vcodec": get_combo_value(self.video_encoder_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 RenderDialog(Loggable):
self.sample_depth_combo = self.builder.get_object(
"sample_depth_combo")
self.muxercombobox = self.builder.get_object("muxercombobox")
- self.audio_renderer_combo = self.builder.get_object(
- "audio_renderer_combo")
- self.video_renderer_combo = self.builder.get_object(
- "video_renderer_combo")
+ self.audio_encoder_combo = self.builder.get_object(
+ "audio_encoder_combo")
+ self.video_encoder_combo = self.builder.get_object(
+ "video_encoder_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 RenderDialog(Loggable):
self.fileentry.set_text(name)
def updateAvailableEncoders(self):
- """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)
+ """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)
- audio_renderers = self.settings.getAudioEncoders()
- audio_renderer_model = factorylist(audio_renderers)
- self.audio_renderer_combo.set_model(audio_renderer_model)
+ audio_encoders = self.settings.getAudioEncoders()
+ audio_encoder_model = factorylist(audio_encoders)
+ self.audio_encoder_combo.set_model(audio_encoder_model)
self._updateEncoderCombo(
- self.video_renderer_combo, self.preferred_vrenderer)
+ self.video_encoder_combo, self.preferred_vencoder)
self._updateEncoderCombo(
- self.audio_renderer_combo, self.preferred_arenderer)
+ self.audio_encoder_combo, self.preferred_aencoder)
- 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
+ def _updateEncoderCombo(self, encoder_combo, preferred_encoder):
+ """Select the specified encoder for the specified encoder combo."""
+ if preferred_encoder:
+ # A preference exists, pick it if it can be found in
# the current model of the combobox.
- vrenderer = gst.element_factory_find(preferred_renderer)
- set_combo_value(renderer_combo, vrenderer, default_index=0)
+ vencoder = gst.element_factory_find(preferred_encoder)
+ set_combo_value(encoder_combo, vencoder, default_index=0)
else:
- # No preferrence exists, pick the first renderer from
+ # No preference exists, pick the first encoder from
# the current model of the combobox.
- renderer_combo.set_active(0)
+ encoder_combo.set_active(0)
def _elementSettingsDialog(self, factory, settings_attr):
"""Open a dialog to edit the properties for the specified factory.
@@ -920,8 +920,8 @@ class RenderDialog(Loggable):
"""
settings = self.project.getSettings()
if (settings.muxer == self.settings.muxer
- and settings.arenderer == self.settings.arenderer
- and settings.vrenderer == self.settings.vrenderer
+ and settings.aencoder == self.settings.aencoder
+ and settings.vencoder == self.settings.vencoder
and settings.containersettings == self.settings.containersettings
and settings.acodecsettings == self.settings.acodecsettings
and settings.vcodecsettings == self.settings.vcodecsettings
@@ -929,9 +929,9 @@ class RenderDialog(Loggable):
# No setting which can be changed in the Render dialog
# and which we want to save have been changed.
return
- settings.setRenderers(muxer=self.settings.muxer,
- arenderer=self.settings.arenderer,
- vrenderer=self.settings.vrenderer)
+ settings.setEncoders(muxer=self.settings.muxer,
+ aencoder=self.settings.aencoder,
+ vencoder=self.settings.vencoder)
settings.containersettings = self.settings.containersettings
settings.acodecsettings = self.settings.acodecsettings
settings.vcodecsettings = self.settings.vcodecsettings
@@ -1013,10 +1013,10 @@ class RenderDialog(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_renderer_combo):
+ if element.get_factory() == get_combo_value(self.video_encoder_combo):
for setting in self.settings.vcodecsettings:
element.set_property(setting, self.settings.vcodecsettings[setting])
- elif element.get_factory() == get_combo_value(self.audio_renderer_combo):
+ elif element.get_factory() == get_combo_value(self.audio_encoder_combo):
for setting in self.settings.acodecsettings:
element.set_property(setting, self.settings.vcodecsettings[setting])
@@ -1052,21 +1052,21 @@ class RenderDialog(Loggable):
self.settings.setVideoProperties(framerate=framerate)
def _videoEncoderComboChangedCb(self, combo):
- vrenderer = get_combo_value(combo).get_name()
- for template in gst.registry_get_default().lookup_feature(vrenderer).get_static_pad_templates():
+ vencoder = get_combo_value(combo).get_name()
+ for template in gst.registry_get_default().lookup_feature(vencoder).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.setRenderers(vrenderer=vrenderer)
+ self.settings.setEncoders(vencoder=vencoder)
if not self.muxer_combo_changing:
- # The user directly changed the video renderer combo.
- self.preferred_vrenderer = vrenderer
+ # The user directly changed the video encoder combo.
+ self.preferred_vencoder = vencoder
def _videoSettingsButtonClickedCb(self, button):
- factory = get_combo_value(self.video_renderer_combo)
+ factory = get_combo_value(self.video_encoder_combo)
self._elementSettingsDialog(factory, 'vcodecsettings')
def _channelsComboChangedCb(self, combo):
@@ -1079,9 +1079,9 @@ class RenderDialog(Loggable):
self.settings.setAudioProperties(rate=get_combo_value(combo))
def _audioEncoderChangedComboCb(self, combo):
- 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():
+ 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():
if template.name_template == "src":
self.audiotype = template.get_caps().to_string()
for elem in self.audiotype.split(","):
@@ -1089,11 +1089,11 @@ class RenderDialog(Loggable):
self.audiotype = self.audiotype[:self.audiotype.index(elem) - 1]
break
if not self.muxer_combo_changing:
- # The user directly changed the audio renderer combo.
- self.preferred_arenderer = arenderer
+ # The user directly changed the audio encoder combo.
+ self.preferred_aencoder = aencoder
def _audioSettingsButtonClickedCb(self, button):
- factory = get_combo_value(self.audio_renderer_combo)
+ factory = get_combo_value(self.audio_encoder_combo)
self._elementSettingsDialog(factory, 'acodecsettings')
def _muxerComboChangedCb(self, muxer_combo):
@@ -1102,7 +1102,7 @@ class RenderDialog(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.setRenderers(muxer=muxer)
+ self.settings.setEncoders(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 b7ec9ac..9815fda 100644
--- a/pitivi/settings.py
+++ b/pitivi/settings.py
@@ -325,7 +325,7 @@ class MultimediaSettings(Signallable, Loggable):
Signals:
'settings-changed' : the settings have changed
- 'renderers-changed' : The renderers or muxer have changed
+ 'encoders-changed' : The encoders 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,
- "renderers-changed": None,
+ "encoders-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, arenderers, vrenderers = available_combinations()
+ muxers, aencoders, vencoders = 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.vrenderer = None
- self.arenderer = None
+ self.vencoder = None
+ self.aencoder = None
self.muxer = "oggmux"
# A (muxer -> containersettings) map.
self._containersettings_cache = {}
- # A (vrenderer -> vcodecsettings) map.
+ # A (vencoder -> vcodecsettings) map.
self._vcodecsettings_cache = {}
- # A (arenderer -> acodecsettings) map.
+ # A (aencoder -> 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.vrenderer = self.vrenderer
- ret.arenderer = self.arenderer
+ ret.vencoder = self.vencoder
+ ret.aencoder = self.aencoder
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.vrenderer) + " " + str(self.vcodecsettings)
+ msg += "\n\t" + str(self.vencoder) + " " + str(self.vcodecsettings)
msg += _("\nAudio: ") + str(self.audiochannels) + " " + str(self.audiorate) +\
" " + str(self.audiodepth)
- msg += "\n\t" + str(self.arenderer) + " " + str(self.acodecsettings)
+ msg += "\n\t" + str(self.aencoder) + " " + 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.vrenderer:
- return get_compatible_sink_caps(self.vrenderer, video_caps)
+ if self.vencoder:
+ return get_compatible_sink_caps(self.vencoder, 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.arenderer:
- return get_compatible_sink_caps(self.arenderer, audio_caps)
+ if self.aencoder:
+ return get_compatible_sink_caps(self.aencoder, 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 setRenderers(self, muxer="", vrenderer="", arenderer=""):
- """ Set the video/audio renderer and muxer """
+ def setEncoders(self, muxer="", vencoder="", aencoder=""):
+ """ Set the video/audio encoder and muxer """
changed = False
if not muxer == "" and not muxer == self.muxer:
self.muxer = muxer
changed = True
- if not vrenderer == "" and not vrenderer == self.vrenderer:
- self.vrenderer = vrenderer
+ if not vencoder == "" and not vencoder == self.vencoder:
+ self.vencoder = vencoder
changed = True
- if not arenderer == "" and not arenderer == self.arenderer:
- self.arenderer = arenderer
+ if not aencoder == "" and not aencoder == self.aencoder:
+ self.aencoder = aencoder
changed = True
if changed:
- self.emit("renderers-changed")
+ self.emit("encoders-changed")
@property
def containersettings(self):
@@ -495,26 +495,26 @@ class MultimediaSettings(Signallable, Loggable):
@property
def vcodecsettings(self):
- return self._vcodecsettings_cache.setdefault(self.vrenderer, {})
+ return self._vcodecsettings_cache.setdefault(self.vencoder, {})
@vcodecsettings.setter
def vcodecsettings(self, value):
- self._vcodecsettings_cache[self.vrenderer] = value
+ self._vcodecsettings_cache[self.vencoder] = value
@property
def acodecsettings(self):
- return self._acodecsettings_cache.setdefault(self.arenderer, {})
+ return self._acodecsettings_cache.setdefault(self.aencoder, {})
@acodecsettings.setter
def acodecsettings(self, value):
- self._acodecsettings_cache[self.arenderer] = value
+ self._acodecsettings_cache[self.aencoder] = value
def getAudioEncoders(self):
- """ Returns the list of audio renderers compatible with the current
+ """ Returns the list of audio encoders compatible with the current
muxer """
- return self.arenderers[self.muxer]
+ return self.aencoders[self.muxer]
def getVideoEncoders(self):
- """ Returns the list of video renderers compatible with the current
+ """ Returns the list of video encoders compatible with the current
muxer """
- return self.vrenderers[self.muxer]
+ return self.vencoders[self.muxer]
diff --git a/tests/test_settings.py b/tests/test_settings.py
index 8e6d6da..2a13630 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('vrenderer', dependant_attr='vcodecsettings')
- self._testMasterAttribute('arenderer', dependant_attr='acodecsettings')
+ self._testMasterAttribute('vencoder', dependant_attr='vcodecsettings')
+ self._testMasterAttribute('aencoder', dependant_attr='acodecsettings')
def _testMasterAttribute(self, attr, dependant_attr):
"""Test changing the specified attr has effect on its dependant attr."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]