summaryrefslogtreecommitdiffstats
path: root/Demo/sgi
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-09-03 17:29:03 (GMT)
committerGuido van Rossum <guido@python.org>1992-09-03 17:29:03 (GMT)
commitbe0cba4d5bee65f05ef7b5fba6569038adda92d3 (patch)
tree049a60a9a307370c0c9a4cb57558fd0e5bd8ac6d /Demo/sgi
parent44c1f698a5e62065d4c41a742b95456c649e2191 (diff)
downloadcpython-be0cba4d5bee65f05ef7b5fba6569038adda92d3.zip
cpython-be0cba4d5bee65f05ef7b5fba6569038adda92d3.tar.gz
cpython-be0cba4d5bee65f05ef7b5fba6569038adda92d3.tar.bz2
Made it work with the sub-spec burst capture interface
(no bit vector)
Diffstat (limited to 'Demo/sgi')
-rwxr-xr-xDemo/sgi/sv/burstcapt.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/Demo/sgi/sv/burstcapt.py b/Demo/sgi/sv/burstcapt.py
index b1f0a16..922576c 100755
--- a/Demo/sgi/sv/burstcapt.py
+++ b/Demo/sgi/sv/burstcapt.py
@@ -1,16 +1,23 @@
+import sys
import sv, SV
import gl, GL, DEVICE
def main():
format = SV.RGB8_FRAMES
requestedwidth = SV.PAL_XMAX
- queuesize = 2
+ queuesize = 30
+ if sys.argv[1:]:
+ queuesize = eval(sys.argv[1])
v = sv.OpenVideo()
svci = (format, requestedwidth, 0, queuesize, 0)
- svci, buffer, bitvec = v.CaptureBurst(svci)
- [bitvec]
+ go = raw_input('Press return to capture ' + `queuesize` + ' frames: ')
+ result = v.CaptureBurst(svci)
+## svci, buffer, bitvec = result # XXX Bit vector not yet implemented
+ svci, buffer = result
+
+ print 'Captured', svci[3], 'frames, i.e.', len(buffer)/1024, 'K bytes'
w, h = svci[1:3]
framesize = w * h
@@ -23,6 +30,8 @@ def main():
gl.qdevice(DEVICE.LEFTMOUSE)
gl.qdevice(DEVICE.ESCKEY)
+ print 'Click left mouse for next frame'
+
for i in range(svci[3]):
inverted_frame = sv.RGB8toRGB32(1, \
buffer[i*framesize:(i+1)*framesize], w, h)