Package conduit :: Package datatypes :: Module Audio
[hide private]

Source Code for Module conduit.datatypes.Audio

 1  import conduit 
 2  import conduit.datatypes.File as File 
 3   
 4  PRESET_ENCODINGS = { 
 5      "ogg":{"acodec":"vorbis","format":"ogg","file_extension":"ogg"}, 
 6      "wav":{"acodec":"pcm_mulaw","format":"wav","file_extension":"wav"} 
 7      } 
 8       
9 -def mimetype_is_audio(mimetype):
10 """ 11 @returns: True if the given mimetype string represents an audio file 12 """ 13 if mimetype.startswith("audio/"): 14 return True 15 elif mimetype == "application/ogg": 16 return True 17 else: 18 return False
19
20 -class Audio(File.File):
21 22 _name_ = "file/audio" 23
24 - def __init__(self, URI, **kwargs):
25 File.File.__init__(self, URI, **kwargs)
26
27 - def get_audio_artist(self):
28 return None
29
30 - def get_audio_album(self):
31 return None
32
33 - def get_audio_duration(self):
34 return None
35