]> code.delx.au - pulseaudio/commitdiff
dbusiface-core: Two new functions: pa_dbusiface_core_get_playback/record_stream_path().
authorTanu Kaskinen <tanuk@iki.fi>
Sat, 15 Aug 2009 13:54:11 +0000 (16:54 +0300)
committerTanu Kaskinen <tanuk@iki.fi>
Sat, 15 Aug 2009 13:54:11 +0000 (16:54 +0300)
src/modules/dbus/iface-core.c
src/modules/dbus/iface-core.h

index 81e709f5f5fec98845e7ca10d6f22ad4f89e4336..2b5cf0b94dc2ecfe554f4d8008f8b586aa6d5234 100644 (file)
@@ -2055,6 +2055,20 @@ const char *pa_dbusiface_core_get_source_path(pa_dbusiface_core *c, const pa_sou
     return pa_dbusiface_device_get_path(pa_hashmap_get(c->sources_by_index, PA_UINT32_TO_PTR(source->index)));
 }
 
+const char *pa_dbusiface_core_get_playback_stream_path(pa_dbusiface_core *c, const pa_sink_input *sink_input) {
+    pa_assert(c);
+    pa_assert(sink_input);
+
+    return pa_dbusiface_stream_get_path(pa_hashmap_get(c->playback_streams, PA_UINT32_TO_PTR(sink_input->index)));
+}
+
+const char *pa_dbusiface_core_get_record_stream_path(pa_dbusiface_core *c, const pa_source_output *source_output) {
+    pa_assert(c);
+    pa_assert(source_output);
+
+    return pa_dbusiface_stream_get_path(pa_hashmap_get(c->record_streams, PA_UINT32_TO_PTR(source_output->index)));
+}
+
 const char *pa_dbusiface_core_get_module_path(pa_dbusiface_core *c, const pa_module *module) {
     pa_assert(c);
     pa_assert(module);
index 7010205449b63b94185e4e2f9f22259afb811dce..14dff7ebd31068719e080071281798d18b0411e2 100644 (file)
@@ -38,6 +38,8 @@ void pa_dbusiface_core_free(pa_dbusiface_core *c);
 const char *pa_dbusiface_core_get_card_path(pa_dbusiface_core *c, const pa_card *card);
 const char *pa_dbusiface_core_get_sink_path(pa_dbusiface_core *c, const pa_sink *sink);
 const char *pa_dbusiface_core_get_source_path(pa_dbusiface_core *c, const pa_source *source);
+const char *pa_dbusiface_core_get_playback_stream_path(pa_dbusiface_core *c, const pa_sink_input *sink_input);
+const char *pa_dbusiface_core_get_record_stream_path(pa_dbusiface_core *c, const pa_source_output *source_output);
 const char *pa_dbusiface_core_get_module_path(pa_dbusiface_core *c, const pa_module *module);
 
 #endif