def __init__(self, client, **kwargs):
self.client = client
self.disp_size = [0, 0]
self.child_size = Window.size
self.canvas = RenderContext(use_parent_projection = True)
with self.canvas:
self.fbo = Fbo(size = Window.size, use_parent_projection = True)
with self.fbo:
ClearColor(0, 0, 0, 0)
ClearBuffers()
super(DisplaySource, self).__init__(**kwargs)
self.texture = self.fbo.texture
if self.client.config.get('outputs', 'shmsink') == 'yes':
from .GStreamerOutput import GStreamerOutput
self.shmsinkoutput = GStreamerOutput(self.texture)
else:
self.shmsinkoutput = False
Window.bind(on_resize = self.resize)
评论列表
文章目录