pyplaybin.py 文件源码

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

项目:pyplaybin 作者: fraca7 项目源码 文件源码
def __init__(self, win_id=None):
        """
        Builds a new GStreamer pipeline. If `win_id` is specified, it
        is used as a window ID to embed the video sink using the
        GstOverlay interface.
        """
        super().__init__()

        self._async_loop = asyncio.get_event_loop()
        self._async_response = []

        if platform.system() == 'Darwin':
            evt = threading.Event()
            error = [None]
            GObject.timeout_add(1, self._build, win_id, evt, error)
            evt.wait()
            if error[0]:
                raise PlaybinError from error[0]
        else:
            self._build(win_id, None, None)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号