encoders = map(match_encoder, encoders)
def process_file(path):
+ import uuid
+ from timeside.decoder.utils import get_uri
+ file_uuid = str(uuid.uuid5(uuid.NAMESPACE_URL, get_uri(path) ))
+
decoder = timeside.decoder.FileDecoder(path, start = 1)
#pipe.setup(channels = channels, samplerate = samplerate, blocksize = blocksize)
pipe = decoder
_analyzers = [a() for a in analyzers]
_graphers = [g() for g in graphers]
- _encoders = [e(os.path.join(outputdir, decoder.uuid() + '.' + e.file_extension())) for e in encoders]
+ _encoders = [e(os.path.join(outputdir, file_uuid + '.' + e.file_extension())) for e in encoders]
for a in _analyzers:
pipe = pipe | a
if len(_analyzers):
results = pipe.results
for f in r_formats:
- result_path = os.path.join(outputdir, decoder.uuid() + '.' + f)
+ result_path = os.path.join(outputdir, file_uuid + '.' + f)
getattr(results,'to_'+f)(result_path)
if verbose : print 'saved', result_path
if len(_graphers):
for g in _graphers:
for f in i_formats:
- graph_path = os.path.join(outputdir, decoder.uuid(), g.id() + '.' + f)
+ graph_path = os.path.join(outputdir, file_uuid, g.id() + '.' + f)
if not os.path.isdir(os.path.dirname(graph_path)):
os.makedirs(os.path.dirname(graph_path))
g.render(graph_path)