Esempio n. 1
0
	def __init__(self, wid, vw, vh, type):
		##print 'Init', wid, xywh
		##print 'video', vw, vw
		self.vw = vw
		self.vh = vh
		self.disp = Displayer()
		if not type in ('rgb', 'rgb8', 'grey', 'mono', 'grey2', \
			  'grey4'):
			raise 'Incorrent live video output type', type
		if type == 'rgb':
			info = (type, vw, vh, 0, 32, 0, 0, 0, 0)
		else:
			info = (type, vw, vh, 1, 8, 0, 0, 0, 0)
		self.disp.setinfo(info)
		self.wid = wid
		oldwid = gl.winget()
		gl.winset(wid)
		self.disp.initcolormap()
		self.reshapewindow()
		gl.winset(oldwid)
Esempio n. 2
0
# Live video output (display video on the screen, presumably from the net)