diff options
author | Lennart Poettering <lennart@poettering.net> | 2006-05-25 23:20:28 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2006-05-25 23:20:28 +0000 |
commit | 7d975345a555fc20e5019307c7dc01545552e42d (patch) | |
tree | 738c6340193a144b5b6d96915210fa355b851d1f /src/utils | |
parent | b754d5095e8c1bbf41e7c0147dfb2328145a2c83 (diff) |
* add new API function pa_stream_get_buffer_attr().
* modify pacat.c to make use of that new API
* extend protocol to allow transfer of the necessary information
* update protocol version accordingly
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@976 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/pacat.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/utils/pacat.c b/src/utils/pacat.c index b1f5bf59..83c3d3ca 100644 --- a/src/utils/pacat.c +++ b/src/utils/pacat.c @@ -154,8 +154,26 @@ static void stream_state_callback(pa_stream *s, void *userdata) { break; case PA_STREAM_READY: - if (verbose) + if (verbose) { + pa_buffer_attr *a; + fprintf(stderr, "Stream successfully created.\n"); + + if (!(a = pa_stream_get_buffer_attr(s))) + fprintf(stderr, "pa_stream_get_buffer_attr() failed: %s\n", pa_strerror(pa_context_errno(pa_stream_get_context(s)))); + else { + + if (mode == PLAYBACK) + fprintf(stderr, "Buffer metrics: maxlength=%u, tlength=%u, prebuf=%u, minreq=%u\n", a->maxlength, a->tlength, a->prebuf, a->minreq); + else { + assert(mode == RECORD); + fprintf(stderr, "Buffer metrics: maxlength=%u, fragsize=%u\n", a->maxlength, a->fragsize); + } + + } + + } + break; case PA_STREAM_FAILED: |