2021-09-03 11:34:01 -04:00
|
|
|
# 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)
|
2021-09-04 07:44:51 -04:00
|
|
|
|
|
|
|
self.bus.add_signal_watch()
|
|
|
|
|
|
|
|
@GObject.Property
|
|
|
|
def bus(self):
|
|
|
|
return self.playbin.get_bus()
|