DisplaySource.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:displayminion 作者: cedarsuite 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号