audio: add "dbus" audio backend

Add a new -audio backend that accepts D-Bus clients/listeners to handle
playback & recording, to be exported via the -display dbus.

Example usage:
-audiodev dbus,in.mixing-engine=off,out.mixing-engine=off,id=dbus
-display dbus,audiodev=dbus

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Marc-André Lureau 2021-03-09 17:15:28 +04:00
parent b4dd5b6a60
commit 739362d420
12 changed files with 931 additions and 2 deletions

View file

@ -386,7 +386,7 @@
# Since: 4.0
##
{ 'enum': 'AudiodevDriver',
'data': [ 'none', 'alsa', 'coreaudio', 'dsound', 'jack', 'oss', 'pa',
'data': [ 'none', 'alsa', 'coreaudio', 'dbus', 'dsound', 'jack', 'oss', 'pa',
'sdl', 'spice', 'wav' ] }
##
@ -412,6 +412,7 @@
'none': 'AudiodevGenericOptions',
'alsa': 'AudiodevAlsaOptions',
'coreaudio': 'AudiodevCoreaudioOptions',
'dbus': 'AudiodevGenericOptions',
'dsound': 'AudiodevDsoundOptions',
'jack': 'AudiodevJackOptions',
'oss': 'AudiodevOssOptions',

View file

@ -1134,13 +1134,16 @@
# @p2p: Whether to use peer-to-peer connections (accepted through
# ``add_client``).
#
# @audiodev: Use the specified DBus audiodev to export audio.
#
# Since: 7.0
#
##
{ 'struct' : 'DisplayDBus',
'data' : { '*rendernode' : 'str',
'*addr': 'str',
'*p2p': 'bool' } }
'*p2p': 'bool',
'*audiodev': 'str' } }
##
# @DisplayGLMode: