* morituri/common/encode.py:

wavenc does not have merge_tags, it seems.
	  So don't call an element a tagger, don't merge tags if there is
	  no tagger, and complain if there is no merge_tags when we think
	  there should be.
This commit is contained in:
Thomas Vander Stichele
2011-04-08 09:04:25 +00:00
parent 39c22033e9
commit 7bd0c5e2c0
2 changed files with 18 additions and 3 deletions

View File

@@ -1,3 +1,11 @@
2011-04-08 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/common/encode.py:
wavenc does not have merge_tags, it seems.
So don't call an element a tagger, don't merge tags if there is
no tagger, and complain if there is no merge_tags when we think
there should be.
2011-03-23 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/program/cdparanoia.py:

View File

@@ -72,10 +72,11 @@ class AlacProfile(Profile):
pipeline = 'ffenc_alac name=tagger'
lossless = True
# FIXME: wavenc does not have merge_tags
class WavProfile(Profile):
name = 'wav'
extension = 'wav'
pipeline = 'wavenc name=tagger'
pipeline = 'wavenc'
lossless = True
class WavpackProfile(Profile):
@@ -175,8 +176,14 @@ class EncodeTask(task.Task):
tagger = self._pipeline.get_by_name('tagger')
# set tags
if self._taglist:
tagger.merge_tags(self._taglist, gst.TAG_MERGE_APPEND)
if tagger and self._taglist:
# FIXME: under which conditions do we not have merge_tags ?
# See for example comment saying wavenc did not have it.
try:
tagger.merge_tags(self._taglist, gst.TAG_MERGE_APPEND)
except AttributeError, e:
self.warning('Could not merge tags: %r',
log.getExceptionMessage(e))
self.debug('pausing pipeline')
self._pipeline.set_state(gst.STATE_PAUSED)