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.
diff --git a/Demo/sgi/video/Vrec.py b/Demo/sgi/video/Vrec.py
index e90a4bd..7b95aee 100755
--- a/Demo/sgi/video/Vrec.py
+++ b/Demo/sgi/video/Vrec.py
@@ -20,7 +20,7 @@
print '-r rate : capture 1 out of every "rate" frames', \
'(default and min 2)'
print '-w width : initial window width', \
- '(default interactive placement)'
+ '(default 256, use 0 for interactive placement)'
print '-n : Don\'t write to file, only timing info'
print '-d : drop fields if needed'
print '-g bits : greyscale (2, 4 or 8 bits)'
@@ -184,7 +184,12 @@
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)
@@ -201,12 +206,13 @@
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)