diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-08-28 23:30:41 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-08-28 23:31:05 +0200 |
commit | 3b54849a089a492fdc67dce41795afaf3c0c3b50 (patch) | |
tree | 835a74e094e8b75dd45869a09d7681a33634074c | |
parent | ca2c0f22d8c2cf68f2119ca6f45fe08865451526 (diff) |
core: add priority field to pa_sink/pa_source
-rw-r--r-- | src/pulsecore/cli-text.c | 4 | ||||
-rw-r--r-- | src/pulsecore/sink.c | 1 | ||||
-rw-r--r-- | src/pulsecore/sink.h | 2 | ||||
-rw-r--r-- | src/pulsecore/source.c | 1 | ||||
-rw-r--r-- | src/pulsecore/source.h | 2 |
5 files changed, 10 insertions, 0 deletions
diff --git a/src/pulsecore/cli-text.c b/src/pulsecore/cli-text.c index c7a178d6..23a57d37 100644 --- a/src/pulsecore/cli-text.c +++ b/src/pulsecore/cli-text.c @@ -232,6 +232,7 @@ char *pa_sink_list_to_string(pa_core *c) { "\tflags: %s%s%s%s%s%s%s%s\n" "\tstate: %s\n" "\tsuspend cause: %s%s%s%s\n" + "\tpriority: %u\n" "\tvolume: %s%s%s\n" "\t balance %0.2f\n" "\tbase volume: %s%s%s\n" @@ -262,6 +263,7 @@ char *pa_sink_list_to_string(pa_core *c) { sink->suspend_cause & PA_SUSPEND_APPLICATION ? "APPLICATION " : "", sink->suspend_cause & PA_SUSPEND_IDLE ? "IDLE " : "", sink->suspend_cause & PA_SUSPEND_SESSION ? "SESSION" : "", + sink->priority, pa_cvolume_snprint(cv, sizeof(cv), pa_sink_get_volume(sink, FALSE)), sink->flags & PA_SINK_DECIBEL_VOLUME ? "\n\t " : "", sink->flags & PA_SINK_DECIBEL_VOLUME ? pa_sw_cvolume_snprint_dB(cvdb, sizeof(cvdb), pa_sink_get_volume(sink, FALSE)) : "", @@ -356,6 +358,7 @@ char *pa_source_list_to_string(pa_core *c) { "\tflags: %s%s%s%s%s%s%s\n" "\tstate: %s\n" "\tsuspend cause: %s%s%s%s\n" + "\tpriority: %u\n" "\tvolume: %s%s%s\n" "\t balance %0.2f\n" "\tbase volume: %s%s%s\n" @@ -383,6 +386,7 @@ char *pa_source_list_to_string(pa_core *c) { source->suspend_cause & PA_SUSPEND_APPLICATION ? "APPLICATION " : "", source->suspend_cause & PA_SUSPEND_IDLE ? "IDLE " : "", source->suspend_cause & PA_SUSPEND_SESSION ? "SESSION" : "", + source->priority, pa_cvolume_snprint(cv, sizeof(cv), pa_source_get_volume(source, FALSE)), source->flags & PA_SOURCE_DECIBEL_VOLUME ? "\n\t " : "", source->flags & PA_SOURCE_DECIBEL_VOLUME ? pa_sw_cvolume_snprint_dB(cvdb, sizeof(cvdb), pa_source_get_volume(source, FALSE)) : "", diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 5cec7747..49a5167e 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -236,6 +236,7 @@ pa_sink* pa_sink_new( s->core = core; s->state = PA_SINK_INIT; s->flags = flags; + s->priority = 0; s->suspend_cause = 0; s->name = pa_xstrdup(name); s->proplist = pa_proplist_copy(data->proplist); diff --git a/src/pulsecore/sink.h b/src/pulsecore/sink.h index b5284b71..1e4d0e31 100644 --- a/src/pulsecore/sink.h +++ b/src/pulsecore/sink.h @@ -109,6 +109,8 @@ struct pa_sink { pa_hashmap *ports; pa_device_port *active_port; + unsigned priority; + /* Called when the main loop requests a state change. Called from * main loop context. If returns -1 the state change will be * inhibited */ diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c index 3026654e..6600b74d 100644 --- a/src/pulsecore/source.c +++ b/src/pulsecore/source.c @@ -205,6 +205,7 @@ pa_source* pa_source_new( s->core = core; s->state = PA_SOURCE_INIT; s->flags = flags; + s->priority = 0; s->suspend_cause = 0; s->name = pa_xstrdup(name); s->proplist = pa_proplist_copy(data->proplist); diff --git a/src/pulsecore/source.h b/src/pulsecore/source.h index df3f99df..e3e56bc4 100644 --- a/src/pulsecore/source.h +++ b/src/pulsecore/source.h @@ -96,6 +96,8 @@ struct pa_source { pa_hashmap *ports; pa_device_port *active_port; + unsigned priority; + /* Called when the main loop requests a state change. Called from * main loop context. If returns -1 the state change will be * inhibited */ |