[pulseaudio-discuss] [PATCH] Add a property list to ports.

David Henningsson david.henningsson at canonical.com
Fri Dec 2 02:31:59 PST 2011


There not used for anything yet, but hopefully soon they'll be.

Signed-off-by: David Henningsson <david.henningsson at canonical.com>
---
 src/pulsecore/device-port.c |    3 +++
 src/pulsecore/device-port.h |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/pulsecore/device-port.c b/src/pulsecore/device-port.c
index 7988649..30fb025 100644
--- a/src/pulsecore/device-port.c
+++ b/src/pulsecore/device-port.c
@@ -70,6 +70,8 @@ static void device_port_free(pa_object *o) {
     pa_assert(p);
     pa_assert(pa_device_port_refcnt(p) == 0);
 
+    if (p->proplist)
+        pa_proplist_free(p->proplist);
     if (p->profiles)
         pa_hashmap_free(p->profiles, NULL, NULL);
     pa_xfree(p->name);
@@ -94,6 +96,7 @@ pa_device_port *pa_device_port_new(pa_core *c, const char *name, const char *des
     p->profiles = NULL;
     p->is_input = FALSE;
     p->is_output = FALSE;
+    p->proplist = pa_proplist_new();
 
     return p;
 }
diff --git a/src/pulsecore/device-port.h b/src/pulsecore/device-port.h
index ee4fc3e..4e90a62 100644
--- a/src/pulsecore/device-port.h
+++ b/src/pulsecore/device-port.h
@@ -47,6 +47,7 @@ struct pa_device_port {
     unsigned priority;
     pa_port_available_t available;         /* PA_PORT_AVAILABLE_UNKNOWN, PA_PORT_AVAILABLE_NO or PA_PORT_AVAILABLE_YES */
 
+    pa_proplist *proplist;
     pa_hashmap *profiles; /* Can be NULL. Does not own the profiles */
     pa_bool_t is_input:1;
     pa_bool_t is_output:1;
-- 
1.7.5.4



More information about the pulseaudio-discuss mailing list