summaryrefslogtreecommitdiffstats
path: root/src/pulsecore
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2008-10-31 02:38:00 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2009-01-13 16:59:45 +0200
commitebb903a37697430f7e2d1ca5314ca23e922a3411 (patch)
tree11c39f8c35ca30e16ed06910b74599dd6b4c22b6 /src/pulsecore
parent9444347c061f271ac74d550b5f3f4b7a803a26d6 (diff)
core: add pa_source_update_proplist
Diffstat (limited to 'src/pulsecore')
-rw-r--r--src/pulsecore/source.c14
-rw-r--r--src/pulsecore/source.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index 815ec271..e65c5ce7 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -604,6 +604,20 @@ pa_bool_t pa_source_get_mute(pa_source *s, pa_bool_t force_refresh) {
return s->muted;
}
+pa_bool_t pa_source_update_proplist(pa_source *s, pa_update_mode_t mode, pa_proplist *p) {
+
+ pa_source_assert_ref(s);
+
+ pa_proplist_update(s->proplist, mode, p);
+
+ if (PA_SOURCE_IS_LINKED(s->state)) {
+ pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SOURCE_PROPLIST_CHANGED], s);
+ pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+ }
+
+ return TRUE;
+}
+
/* Called from main thread */
void pa_source_set_description(pa_source *s, const char *description) {
const char *old;
diff --git a/src/pulsecore/source.h b/src/pulsecore/source.h
index b93e4ad0..fd8c4bd6 100644
--- a/src/pulsecore/source.h
+++ b/src/pulsecore/source.h
@@ -234,6 +234,8 @@ const pa_cvolume *pa_source_get_volume(pa_source *source, pa_bool_t force_refres
void pa_source_set_mute(pa_source *source, pa_bool_t mute);
pa_bool_t pa_source_get_mute(pa_source *source, pa_bool_t force_refresh);
+pa_bool_t pa_source_update_proplist(pa_source *s, pa_update_mode_t mode, pa_proplist *p);
+
unsigned pa_source_linked_by(pa_source *s); /* Number of connected streams */
unsigned pa_source_used_by(pa_source *s); /* Number of connected streams that are not corked */
unsigned pa_source_check_suspend(pa_source *s); /* Returns how many streams are active that don't allow suspensions */