player.py 文件源码

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

项目:scarlett_os 作者: bossjones 项目源码 文件源码
def on_debug_activate(self):
        dotfile = "/home/pi/dev/bossjones-github/scarlett_os/_debug/generator-player.dot"
        pngfile = "/home/pi/dev/bossjones-github/scarlett_os/_debug/generator-player-pipeline.png"  # NOQA

        parent_dir = get_parent_dir(dotfile)

        mkdir_if_does_not_exist(parent_dir)

        if os.access(dotfile, os.F_OK):
            os.remove(dotfile)
        if os.access(pngfile, os.F_OK):
            os.remove(pngfile)

        if not fname_exists(dotfile):
            touch_empty_file(dotfile)

        if not fname_exists(pngfile):
            touch_empty_file(pngfile)

        Gst.debug_bin_to_dot_file(self.pipeline,
                                  Gst.DebugGraphDetails.ALL, "generator-player")
        os.system('/usr/bin/dot' + " -Tpng -o " + pngfile + " " + dotfile)

    # Gstreamer callbacks.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号