[SCM] morituri/master: * 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.

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:09:22 UTC 2014


The following commit has been merged in the master branch:
commit 7bd0c5e2c08cc06f4b9469a4403ccf05c2e0c702
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Fri Apr 8 09:04:25 2011 +0000

    	* 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.

diff --git a/ChangeLog b/ChangeLog
index d854841..1f81c3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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:
diff --git a/morituri/common/encode.py b/morituri/common/encode.py
index d9c3b05..8aaf7e0 100644
--- a/morituri/common/encode.py
+++ b/morituri/common/encode.py
@@ -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)

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list