summaryrefslogtreecommitdiffstats
path: root/src/pulsecore
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2008-10-31 02:33:28 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2009-01-13 16:59:45 +0200
commit9444347c061f271ac74d550b5f3f4b7a803a26d6 (patch)
treec6f2c871f9df197d484cd2e4d164eda3384432c5 /src/pulsecore
parentf6ac7b4ed6ad2d4f10def0f5657e25692bcb2e2b (diff)
core: add pa_sink_update_proplist
Diffstat (limited to 'src/pulsecore')
-rw-r--r--src/pulsecore/sink.c14
-rw-r--r--src/pulsecore/sink.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index a4d993cd..d5082d53 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -953,6 +953,20 @@ pa_bool_t pa_sink_get_mute(pa_sink *s, pa_bool_t force_refresh) {
return s->muted;
}
+pa_bool_t pa_sink_update_proplist(pa_sink *s, pa_update_mode_t mode, pa_proplist *p) {
+
+ pa_sink_assert_ref(s);
+
+ pa_proplist_update(s->proplist, mode, p);
+
+ if (PA_SINK_IS_LINKED(s->state)) {
+ pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SINK_PROPLIST_CHANGED], s);
+ pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+ }
+
+ return TRUE;
+}
+
/* Called from main thread */
void pa_sink_set_description(pa_sink *s, const char *description) {
const char *old;
diff --git a/src/pulsecore/sink.h b/src/pulsecore/sink.h
index 254be3b0..092e30f2 100644
--- a/src/pulsecore/sink.h
+++ b/src/pulsecore/sink.h
@@ -252,6 +252,8 @@ const pa_cvolume *pa_sink_get_volume(pa_sink *sink, pa_bool_t force_refresh);
void pa_sink_set_mute(pa_sink *sink, pa_bool_t mute);
pa_bool_t pa_sink_get_mute(pa_sink *sink, pa_bool_t force_refres);
+pa_bool_t pa_sink_update_proplist(pa_sink *s, pa_update_mode_t mode, pa_proplist *p);
+
unsigned pa_sink_linked_by(pa_sink *s); /* Number of connected streams */
unsigned pa_sink_used_by(pa_sink *s); /* Number of connected streams which are not corked */
unsigned pa_sink_check_suspend(pa_sink *s); /* Returns how many streams are active that don't allow suspensions */