def start_glib_loop(cls):
"""
If your program does not use the GLib loop, call this
first. It initializes threads, GStreamer, and starts the GLib
loop in a separate thread.
"""
GObject.threads_init()
Gst.init(None)
cls.glib_loop = GObject.MainLoop()
cls.glib_thread = threading.Thread(target=cls.glib_loop.run)
cls.glib_thread.start()
评论列表
文章目录