Ejemplo n.º 1
0
	def reshapewindow(self):
		oldwid = gl.winget()
		gl.winset(self.wid)
		gl.reshapeviewport()
		w, h = gl.getsize()
		self.disp.xorigin = (w-self.vw)/2
		self.disp.yorigin = (h-self.vh)/2
		self.disp.clear()
		gl.winset(oldwid)
Ejemplo n.º 2
0
	def putnextpacket(self, pos, data):
		nline = len(data)/self.linewidth()
		if nline*self.linewidth() <> len(data):
			print 'Incorrect-sized video fragment ignored'
			return
		oldwid = gl.winget()
		gl.winset(self.wid)
		self.disp.showpartframe(data, None, (0, pos, self.vw, nline))
		gl.winset(oldwid)
Ejemplo n.º 3
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)
Ejemplo n.º 4
0
# Live video output (display video on the screen, presumably from the net)
Ejemplo n.º 5
0
# Live video output (display video on the screen, presumably from the net)