Workaround for RasPi selecting jack server.
This commit is contained in:
parent
5daa95cae8
commit
4d5f60fd06
@ -72,6 +72,7 @@ class Audio(pykka.ThreadingActor):
|
||||
|
||||
def on_start(self):
|
||||
try:
|
||||
self._setup_preferences()
|
||||
self._setup_playbin()
|
||||
self._setup_output()
|
||||
self._setup_mixer()
|
||||
@ -96,6 +97,12 @@ class Audio(pykka.ThreadingActor):
|
||||
if signal_id is not None:
|
||||
element.disconnect(signal_id)
|
||||
|
||||
def _setup_preferences(self):
|
||||
registry = gst.registry_get_default()
|
||||
jacksink = registry.find_feature('jackaudiosink', gst.TYPE_ELEMENT_FACTORY)
|
||||
if jacksink:
|
||||
jacksink.set_rank(gst.RANK_SECONDARY)
|
||||
|
||||
def _setup_playbin(self):
|
||||
playbin = gst.element_factory_make('playbin2')
|
||||
playbin.set_property('flags', PLAYBIN_FLAGS)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user