emmental/audio/bass.py
Anna Schumaker 574e49ef09 audio: Give the BassPlayer a bus property
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-04 08:33:15 -04:00

18 lines
540 B
Python

# 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()