Installing gstreamer 1.0 on windows for python 2.7.

跟風遠走 提交于 2019-12-04 14:45:53
diaamant

With Python 3.4.3 works.

  1. Download from: http://sourceforge.net/projects/pygobjectwin32/files/?source=navbar

  2. Install in Windows pygi-aio-3.14.0_rev22-setup.exe

  3. In the program .py:

    import gi
    
    gi.require_version('Gst', '1.0')
    
    from gi.repository import Gst
    
    pipeline = Gst.Pipeline.new("player")
    
    src = Gst.ElementFactory.make("audiotestsrc", "src")
    
    sink = Gst.ElementFactory.make("autoaudiosink", "output")
    
    pipeline.add(src)
    
    pipeline.add(sink)
    
    src.link(sink)
    
    pipeline.set_state(Gst.State.PLAYING)
    

And enjoy more ..

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!