Browse Source

add a __repr__...

get a larger block...  if we don't the PS3 has trouble buffering..
probably too much python overhead handling the small block size..

[git-p4: depot-paths = "//depot/": change = 1576]
main
John-Mark Gurney 14 years ago
parent
commit
36f527a9c0
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      audioraw.py

+ 4
- 1
audioraw.py View File

@@ -50,6 +50,9 @@ class DecoderProducer:
consumer.registerProducer(self, False)
self.resumeProducing()

def __repr__(self):
return '<DecoderProducer: decoder: %s, bytes left: %d, skip: %d>' % (`self.decoder`, self.tbytes, self.skipbytes)

def pauseProducing(self):
# XXX - bug in Twisted 8.2.0 on pipelined requests this is
# called: http://twistedmatrix.com/trac/ticket/3919
@@ -57,7 +60,7 @@ class DecoderProducer:

def resumeProducing(self):
#print 'DPrP', `self`
r = self.decoder.read(oneblk=True)
r = self.decoder.read(256*1024)
if r:
#print 'DPrP:', len(r)
if self.skipbytes:


Loading…
Cancel
Save