summaryrefslogtreecommitdiffstats
path: root/src/pulse
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulse')
-rw-r--r--src/pulse/context.c4
-rw-r--r--src/pulse/introspect.c5
-rw-r--r--src/pulse/introspect.h1
-rw-r--r--src/pulse/proplist.h5
4 files changed, 12 insertions, 3 deletions
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 9309c6b7..62fe5356 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -554,7 +554,7 @@ static void setup_context(pa_context *c, pa_iochannel *io) {
pa_context_unref(c);
}
-#if ENABLE_LEGACY_RUNTIME_DIR
+#ifdef ENABLE_LEGACY_RUNTIME_DIR
static char *get_old_legacy_runtime_dir(void) {
char *p, u[128];
struct stat st;
@@ -603,7 +603,7 @@ static char *get_very_old_legacy_runtime_dir(void) {
static pa_strlist *prepend_per_user(pa_strlist *l) {
char *ufn;
-#if ENABLE_LEGACY_RUNTIME_DIR
+#ifdef ENABLE_LEGACY_RUNTIME_DIR
static char *legacy_dir;
/* The very old per-user instance path (< 0.9.11). This is supported only to ease upgrades */
diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c
index 04bcd4f5..befeb242 100644
--- a/src/pulse/introspect.c
+++ b/src/pulse/introspect.c
@@ -110,12 +110,17 @@ static void context_get_server_info_callback(pa_pdispatch *pd, uint32_t command,
pa_tagstruct_gets(t, &i.default_sink_name) < 0 ||
pa_tagstruct_gets(t, &i.default_source_name) < 0 ||
pa_tagstruct_getu32(t, &i.cookie) < 0 ||
+ (o->context->version >= 15 &&
+ pa_tagstruct_get_channel_map(t, &i.channel_map) < 0) ||
!pa_tagstruct_eof(t)) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
goto finish;
}
+ if (p && o->context->version < 15)
+ pa_channel_map_init_extend(&i.channel_map, i.sample_spec.channels, PA_CHANNEL_MAP_DEFAULT);
+
if (o->callback) {
pa_server_info_cb_t cb = (pa_server_info_cb_t) o->callback;
cb(o->context, p, o->userdata);
diff --git a/src/pulse/introspect.h b/src/pulse/introspect.h
index b873a84a..aa67e43d 100644
--- a/src/pulse/introspect.h
+++ b/src/pulse/introspect.h
@@ -317,6 +317,7 @@ typedef struct pa_server_info {
const char *default_sink_name; /**< Name of default sink. */
const char *default_source_name; /**< Name of default sink. */
uint32_t cookie; /**< A random cookie for identifying this instance of PulseAudio. */
+ pa_channel_map channel_map; /**< Default channel map. \since 0.9.15 */
} pa_server_info;
/** Callback prototype for pa_context_get_server_info() */
diff --git a/src/pulse/proplist.h b/src/pulse/proplist.h
index c0c34593..d30dc3b9 100644
--- a/src/pulse/proplist.h
+++ b/src/pulse/proplist.h
@@ -51,7 +51,7 @@ PA_C_DECL_BEGIN
/** For streams: an XDG icon name for the media. e.g. "audio-x-mp3" */
#define PA_PROP_MEDIA_ICON_NAME "media.icon_name"
-/** For streams: logic role of this media. One of the strings "video", "music", "game", "event", "phone", "animation", "production" */
+/** For streams: logic role of this media. One of the strings "video", "music", "game", "event", "phone", "animation", "production", "a11y" */
#define PA_PROP_MEDIA_ROLE "media.role"
/** For event sound streams: XDG event sound name. e.g. "message-new-email" (Event sound streams are those with media.role set to "event") */
@@ -132,6 +132,9 @@ PA_C_DECL_BEGIN
/** For clients/streams: the D-Bus host id the application runs on. e.g. "543679e7b01393ed3e3e650047d78f6e" */
#define PA_PROP_APPLICATION_PROCESS_MACHINE_ID "application.process.machine_id"
+/** For clients/streams: an id for the login session the application runs in. On Unix the value of $XDG_SESSION_COOKIE. e.g. "543679e7b01393ed3e3e650047d78f6e-1235159798.76193-190367717" */
+#define PA_PROP_APPLICATION_PROCESS_SESSION_ID "application.process.session_id"
+
/** For devices: device string in the underlying audio layer's format. e.g. "surround51:0" */
#define PA_PROP_DEVICE_STRING "device.string"