1 Apr 2012 05:12
[PATCH] proof of concept: use pactl log to get the buffer log
Deng Zhenrong <dzrongg <at> gmail.com>
2012-04-01 03:12:18 GMT
2012-04-01 03:12:18 GMT
This is just a proof of concept for me to see how the overall communication works. From this patch, I learnt a lot about the importances of callback, the tag struct etc. It's a nice start for me to dive into pulseaudio. :) However, there's still a lot to improve: 1. Add thread protection to log facilities. To make it simple at first, I haven't added that yet, but in real cases, different threads would call the log function, and if protection is not there, all would be messed up. 2. reduce the overhead of copying the data buffer. Now, `get_log_buffer' allocates a new buffer and pass it to tag struct. But this kind of operation can be reduced to keep the overhead at minimal. Signed-off-by: Deng Zhenrong <dzrongg <at> gmail.com> --- src/map-file | 1 + src/pulse/introspect.c | 34 +++++++++++++++++++++++ src/pulse/introspect.h | 3 ++ src/pulsecore/log.c | 58 +++++++++++++++++++++++++++++++++++++++ src/pulsecore/log.h | 2 + src/pulsecore/native-common.h | 1 + src/pulsecore/pdispatch.c | 1 + src/pulsecore/protocol-native.c | 26 +++++++++++++++++ src/utils/pactl.c | 14 +++++++++ 9 files changed, 140 insertions(+), 0 deletions(-) diff --git a/src/map-file b/src/map-file index 69cf25b..812875a 100644 --- a/src/map-file(Continue reading)
RSS Feed