[xiph-cvs] cvs commit: ogg-python2/examples writ_decoder.py writ_encode.py
Arc
arc at xiph.org
Sun Nov 30 23:18:51 PST 2003
arc 03/12/01 02:18:51
Modified: examples writ_decoder.py writ_encode.py
Log:
Added some comments at the top, removed some debugging statements
Revision Changes Path
1.2 +7 -1 ogg-python2/examples/writ_decoder.py
Index: writ_decoder.py
===================================================================
RCS file: /usr/local/cvsroot/ogg-python2/examples/writ_decoder.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- writ_decoder.py 1 Dec 2003 06:49:04 -0000 1.1
+++ writ_decoder.py 1 Dec 2003 07:18:51 -0000 1.2
@@ -1,5 +1,11 @@
+'''
+ function: Ogg Writ reference encoder
+ last mod: $Id: writ_decoder.py,v 1.2 2003/12/01 07:18:51 arc Exp $
-#!/usr/local/bin/python
+This is an example for how py-ogg2 can be used to rapidly design a new
+Ogg codec or test an existing codec's specifications for accuracy.
+
+'''
import ogg2
from struct import unpack
<p><p>1.3 +8 -4 ogg-python2/examples/writ_encode.py
Index: writ_encode.py
===================================================================
RCS file: /usr/local/cvsroot/ogg-python2/examples/writ_encode.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- writ_encode.py 1 Dec 2003 06:49:04 -0000 1.2
+++ writ_encode.py 1 Dec 2003 07:18:51 -0000 1.3
@@ -1,4 +1,11 @@
-#!/usr/local/bin/python
+'''
+ function: Ogg Writ reference encoder
+ last mod: $Id: writ_encode.py,v 1.3 2003/12/01 07:18:51 arc Exp $
+
+This is an example for how py-ogg2 can be used to rapidly design a new
+Ogg codec or test an existing codec's specifications for accuracy.
+
+'''
import ogg2
import struct
@@ -59,8 +66,6 @@
bity = ilog(scly)
totl = (bitx*2)+(bity*2)+4
bitp = ((((totl-1)/8)+1)*8)-totl
-print totl
-print bitp
langs=(('en','English'),('es','Spanish'))
@@ -96,7 +101,6 @@
page=os.flush()
pn=1
oy.pagein(page)
-oy.output(fd)
bp = BitPacker()
# bp.reset()
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list