blob: 97b75fafb04b73a9fcc19438bbaca90ec4b6f1a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import sv, SV
import gl, DEVICE
def main():
gl.foreground()
gl.prefsize(SV.PAL_XMAX, SV.PAL_YMAX)
win = gl.winopen('video test')
v = sv.OpenVideo()
params = [SV.VIDEO_MODE, SV.COMP, SV.BROADCAST, SV.PAL]
v.SetParam(params)
v.BindGLWindow(win, SV.IN_REPLACE)
gl.qdevice(DEVICE.ESCKEY)
gl.qdevice(DEVICE.WINQUIT)
gl.qdevice(DEVICE.WINSHUT)
while 1:
dev, val = gl.qread()
if dev in (DEVICE.ESCKEY, DEVICE.WINSHUT, DEVICE.WINQUIT):
v.CloseVideo()
gl.winclose(win)
return
main()
|