summaryrefslogtreecommitdiffstats
path: root/Demo/sgi/video/Vrecb.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-02-25 16:10:16 (GMT)
committerGuido van Rossum <guido@python.org>1993-02-25 16:10:16 (GMT)
commit85f7bd5251398f4a114740a39222772025a895b7 (patch)
tree8201b1a9a2946add803bb5659ed793a88ab86b51 /Demo/sgi/video/Vrecb.py
parentc97d2eddee1d679553a35728b44b5c8ff01d7ce6 (diff)
downloadcpython-85f7bd5251398f4a114740a39222772025a895b7.zip
cpython-85f7bd5251398f4a114740a39222772025a895b7.tar.gz
cpython-85f7bd5251398f4a114740a39222772025a895b7.tar.bz2
Vrec.py, Vrecb.py:
- call v.SetParam() after v.BindGLWindow() - turn of dithering in mono/grey mode - use prefposition to place the top left corner at (150, 150) (so that the video remains visible during recording) - default width is 256 Vcopy.py: correct typos; more verbose output. OldVcopy.py: new name for Jack's old grabbing Vcopy.py. Vstat.py: print values of all video parameters.
Diffstat (limited to 'Demo/sgi/video/Vrecb.py')
-rwxr-xr-xDemo/sgi/video/Vrecb.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/Demo/sgi/video/Vrecb.py b/Demo/sgi/video/Vrecb.py
index 43a5ddf..ef7bc37 100755
--- a/Demo/sgi/video/Vrecb.py
+++ b/Demo/sgi/video/Vrecb.py
@@ -1,4 +1,3 @@
-#! /ufs/guido/bin/sgi/python-405
#! /ufs/guido/bin/sgi/python
# Capture a CMIF movie using the Indigo video library and board in burst mode
@@ -41,7 +40,7 @@ def usage():
print '-r rate : capture 1 out of every "rate" frames', \
'(default and min 1)'
print '-w width : initial window width', \
- '(default interactive placement)'
+ '(default 256, use 0 for interactive placement)'
print '-d : drop fields if needed'
print '-g bits : greyscale (2, 4 or 8 bits)'
print '-G : 2-bit greyscale dithered'
@@ -69,7 +68,7 @@ def main():
format = SV.RGB8_FRAMES
audio = 0
rate = 1
- width = 0
+ width = 256
drop = 0
mono = 0
grey = 0
@@ -167,7 +166,12 @@ def main():
gl.keepaspect(x, y)
gl.stepunit(8, 6)
if width:
- gl.prefsize(width, width*3/4)
+ height = width*3/4
+ x1 = 150
+ x2 = x1 + width-1
+ y2 = 768-150
+ y1 = y2-height+1
+ gl.prefposition(x1, x2, y1, y2)
win = gl.winopen(filename)
if width:
gl.maxsize(x, y)
@@ -184,12 +188,13 @@ def main():
else:
param = [SV.FIELDDROP, 0, SV.GENLOCK, SV.GENLOCK_ON]
if mono or grey:
- param = param+[SV.COLOR, SV.MONO, SV.INPUT_BYPASS, 1]
+ param = param+[SV.COLOR, SV.MONO, SV.DITHER, 0, \
+ SV.INPUT_BYPASS, 1]
else:
param = param+[SV.COLOR, SV.DEFAULT_COLOR, SV.INPUT_BYPASS, 0]
- v.SetParam(param)
v.BindGLWindow(win, SV.IN_REPLACE)
+ v.SetParam(param)
gl.qdevice(DEVICE.LEFTMOUSE)
gl.qdevice(DEVICE.WINQUIT)