from telemeta.analysis.api import *
from telemeta.analysis.core import *
from telemeta.analysis.channels import *
-from telemeta.analysis.length import *
+from telemeta.analysis.format import *
+from telemeta.analysis.encoding import *
from telemeta.analysis.samplerate import *
+from telemeta.analysis.length import *
from telemeta.analysis.max_level import *
from telemeta.analysis.mean_level import *
+
+
self.frames = self.audio_file.get_nframes()
self.samplerate = self.audio_file.get_samplerate()
self.channels = self.audio_file.get_channels()
+ self.format = self.audio_file.get_file_format()
+ self.encoding = self.audio_file.get_encoding()
def post_process(self, audio_file):
pass
--- /dev/null
+# Copyright (C) 2008 Parisson SARL
+# All rights reserved.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at http://svn.parisson.org/telemeta/TelemetaLicense.
+#
+# Author: Guillaume Pellerin <yomguy@parisson.com>
+
+from telemeta.analysis.core import *
+from telemeta.analysis.api import IMediaItemAnalyzer
+import numpy
+
+class EncodingAnalyser(AudioProcessor):
+ """Media item analyzer driver interface"""
+
+ implements(IMediaItemAnalyzer)
+
+ def get_id(self):
+ return "encoding"
+
+ def get_name(self):
+ return "Encoding format"
+
+ def get_unit(self):
+ return ""
+
+ def render(self, media_item, options=None):
+ self.pre_process(media_item)
+ return self.encoding
--- /dev/null
+# Copyright (C) 2008 Parisson SARL
+# All rights reserved.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at http://svn.parisson.org/telemeta/TelemetaLicense.
+#
+# Author: Guillaume Pellerin <yomguy@parisson.com>
+
+from telemeta.analysis.core import *
+from telemeta.analysis.api import IMediaItemAnalyzer
+import numpy
+
+class FormatAnalyser(AudioProcessor):
+ """Media item analyzer driver interface"""
+
+ implements(IMediaItemAnalyzer)
+
+ def get_id(self):
+ return "format"
+
+ def get_name(self):
+ return "File format"
+
+ def get_unit(self):
+ return ""
+
+ def render(self, media_item, options=None):
+ self.pre_process(media_item)
+ return self.format
publisher_reference = CharField(maxlength=250, blank=True)
physical_format = CharField(maxlength=250, blank=True)
- id = CharField(maxlength=250, primary_key=True,
+ id = CharField(maxlength=250, primary_key=True,
verbose_name='identifier', validator_list=[id_validator])
title = CharField(maxlength=250)
native_title = CharField(maxlength=250, blank=True)