emmental/audio/bass.py

18 lines
540 B
Python
Raw Normal View History

# Copyright 2021 (c) Anna Schumaker.
from gi.repository import GObject
from gi.repository import Gst
class BassPlayer(GObject.GObject):
def __init__(self):
GObject.GObject.__init__(self)
self.video = Gst.ElementFactory.make("fakesink")
self.playbin = Gst.ElementFactory.make("playbin")
self.playbin.set_property("video-sink", self.video)
self.playbin.set_state(Gst.State.READY)
self.bus.add_signal_watch()
@GObject.Property
def bus(self):
return self.playbin.get_bus()