Created
July 4, 2018 12:27
-
-
Save fthiery/7cf291686b9d4450ead393220f63fb8a to your computer and use it in GitHub Desktop.
Python3 Gstreamer boilerplate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import gi | |
gi.require_version('Gst', '1.0') | |
from gi.repository import Gst, GLib | |
Gst.init(None) | |
p = "videotestsrc is-live=true ! autovideosink" | |
pipeline = Gst.parse_launch(p) | |
GLib.idle_add(pipeline.set_state, Gst.State.PLAYING) | |
ml = GLib.MainLoop() | |
ml.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment