Author: tack
Date: Tue Jan 2 19:46:10 2007
New Revision: 2333
Modified:
trunk/metadata/src/fourcc.py
trunk/metadata/src/video/riff.py
Log:
Allow fourcc resolution in finalize for wav codec.
Modified: trunk/metadata/src/fourcc.py
==============================================================================
--- trunk/metadata/src/fourcc.py (original)
+++ trunk/metadata/src/fourcc.py Tue Jan 2 19:46:10 2007
@@ -4,7 +4,7 @@
"""
Transform a twocc or fourcc code into a name.
"""
- if isinstance(code, str) and code.startswith('0x'):
+ if isinstance(code, basestring) and code.startswith('0x'):
code = int(code[2:], 16)
if isinstance(code, (int, long)):
if code in TWOCC:
Modified: trunk/metadata/src/video/riff.py
==============================================================================
--- trunk/metadata/src/video/riff.py (original)
+++ trunk/metadata/src/video/riff.py Tue Jan 2 19:46:10 2007
@@ -543,9 +543,11 @@
self.media = core.MEDIA_AUDIO
data = file.read(size)
fmt = struct.unpack("<HHLLHH", data[:16])
- self._set('fourcc', fmt[0])
+ self._set('codec', hex(fmt[0]))
self._set('samplerate', fmt[2])
self._set('bitrate', fmt[3])
+ # Set a dummy fourcc so codec will be resolved in finalize.
+ self._set('fourcc', 'dummy')
elif not name.strip(string.printable + string.whitespace):
# check if name is something usefull at all, maybe it is no
# avi or broken
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog