]> git.parisson.com Git - timeside.git/commitdiff
change decoder id, cleanup
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 29 Oct 2013 00:19:28 +0000 (01:19 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 29 Oct 2013 00:19:28 +0000 (01:19 +0100)
tests/api/test_all.py
timeside/decoder/core.py

index db334183cea987634b47b8d527124e02f09c6efa..b7df0ba2bb5a3b3d3fe5fa62725aa44c3c9a10e6 100644 (file)
@@ -3,14 +3,14 @@
 import os, sys
 import timeside
 
-audio_file = sys.argv[-1]
-audio_filename = audio_file.split(os.sep)[-1]
+path = sys.argv[-1]
+filename = path.split(os.sep)[-1]
 result_dir = '../results/'
 
 if not os.path.exists(result_dir):
     os.makedirs(result_dir)
 
-decoder  = timeside.decoder.FileDecoder(audio_file)
+decoder  = timeside.decoder.FileDecoder(path)
 graphers = timeside.core.processors(timeside.api.IGrapher)
 encoders = timeside.core.processors(timeside.api.IEncoder)
 analyzers = timeside.core.processors(timeside.api.IAnalyzer)
@@ -24,17 +24,15 @@ pipe = decoder
 for grapher in graphers:
     proc = grapher()
     grapher_list.append(proc)
-    print proc.id()
     pipe = pipe | proc
 
 for analyzer in analyzers:
     proc = analyzer()
     analyzer_list.append(proc)
-    print proc.id()
     pipe = pipe | proc
 
 for encoder in encoders:
-    path = result_dir + os.sep + audio_filename + '.' + encoder.file_extension()
+    path = result_dir + os.sep + filename + '.' + encoder.file_extension()
     proc = encoder(path, overwrite=True)
     encoder_list.append(proc)
     pipe = pipe | proc
@@ -43,6 +41,6 @@ print pipe
 pipe.run()
 
 for grapher in grapher_list:
-    image = result_dir + os.sep + audio_filename + '-' + grapher.id() + '.png'
+    image = result_dir + os.sep + filename + '-' + grapher.id() + '.png'
     grapher.render(image)
 
index c812dd8697b16e9fc787f205c8ed160cb8ead039..bb7af5e47297589bc021f4556bf32d1d06de518a 100644 (file)
@@ -55,7 +55,7 @@ class FileDecoder(Processor):
     @staticmethod
     @interfacedoc
     def id():
-        return "gstreamerdec"
+        return "gst_dec"
 
     def __init__(self, uri, start = 0, duration = None):
         '''