summaryrefslogtreecommitdiff
path: root/src/capture.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/capture.c')
-rw-r--r--src/capture.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/capture.c b/src/capture.c
index 14e7abf..5a174d4 100644
--- a/src/capture.c
+++ b/src/capture.c
@@ -13,6 +13,7 @@ int capture_init(pa_mainloop **m, pa_context **c);
void context_state_callback(pa_context *c, void *userdata);
void context_get_server_info_callback(pa_context *c, const pa_server_info*si, void *userdata);
void context_get_source_info_callback(pa_context *c, const pa_source_info *si, int is_last, void *userdata);
+void context_get_source_info_list_callback(pa_context *c, const pa_source_info *si, int is_last, void *userdata);
pa_stream * create_stream(pa_context *c, const pa_source_info *si);
void stream_state_callback(pa_stream *s, void *userdata);
void stream_read_callback(pa_stream *s, size_t nbytes, void *userdata);
@@ -100,10 +101,30 @@ void context_get_server_info_callback(pa_context *c, const pa_server_info*si, vo
return;
}
+ //Temp :
+ pa_operation_unref(pa_context_get_source_info_list(c,context_get_source_info_list_callback,NULL));
+
+
pa_operation_unref(pa_context_get_source_info_by_name(c, si->default_source_name, context_get_source_info_callback, NULL));
}
+//Temp
+void context_get_source_info_list_callback(pa_context *c, const pa_source_info *si, int is_last, void *userdata) {
+ if (is_last < 0) {
+ printf("Failed to get sink information\n");
+ return;
+ }
+
+ if (!si) {
+ return;
+ }
+
+ printf("%i : '%s' (%s)\n", si->index, si->name, si->description);
+
+}
+
+
void context_get_source_info_callback(pa_context *c, const pa_source_info *si, int is_last, void *userdata) {
if (is_last < 0) {