]> code.delx.au - pulseaudio/commitdiff
core: add priority field to pa_sink/pa_source
authorLennart Poettering <lennart@poettering.net>
Fri, 28 Aug 2009 21:30:41 +0000 (23:30 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 28 Aug 2009 21:31:05 +0000 (23:31 +0200)
src/pulsecore/cli-text.c
src/pulsecore/sink.c
src/pulsecore/sink.h
src/pulsecore/source.c
src/pulsecore/source.h

index c7a178d6c2ffe2cd6d528ace5664c6ac6a6b37ed..23a57d370f24268143deb2152c9555160173cf26 100644 (file)
@@ -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)) : "",
index 5cec77473f3489f514b3a152b68f1659779f9dce..49a5167eb8f94818a5fd328a58f5423158061772 100644 (file)
@@ -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);
index b5284b713294c03419d9b340b7db48be54985020..1e4d0e310405766705f474f45cbb44b945cdd31f 100644 (file)
@@ -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 */
index 3026654e3291c1e9967be965f1e49416450fe6ac..6600b74d99921cbaf0dcd206d9477976b65a177a 100644 (file)
@@ -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);
index df3f99df6909636d66d24e8cef219ec21043ddf1..e3e56bc4534af8ca54632be255483c0719fef6b5 100644 (file)
@@ -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 */