summaryrefslogtreecommitdiffstats
path: root/src/pdispatch.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-07-15 21:18:18 +0000
committerLennart Poettering <lennart@poettering.net>2004-07-15 21:18:18 +0000
commit710233bbf68c845ec5f1713679f4ff0b74c517de (patch)
treed6a88e5339790207f792d80cb00663af840f8250 /src/pdispatch.c
parentd8f13006614dca80de8903f5380b7cb718f26fcc (diff)
implement get_latency native command
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@72 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pdispatch.c')
-rw-r--r--src/pdispatch.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/pdispatch.c b/src/pdispatch.c
index b7257dd4..32753963 100644
--- a/src/pdispatch.c
+++ b/src/pdispatch.c
@@ -4,6 +4,8 @@
#include "pdispatch.h"
#include "protocol-native-spec.h"
+#ifdef DEBUG_OPCODES
+
static const char *command_names[PA_COMMAND_MAX] = {
[PA_COMMAND_ERROR] = "ERROR",
[PA_COMMAND_TIMEOUT] = "TIMEOUT",
@@ -19,8 +21,14 @@ static const char *command_names[PA_COMMAND_MAX] = {
[PA_COMMAND_LOOKUP_SINK] = "LOOKUP_SINK",
[PA_COMMAND_LOOKUP_SOURCE] = "LOOKUP_SOURCE",
[PA_COMMAND_DRAIN_PLAYBACK_STREAM] = "DRAIN_PLAYBACK_STREAM",
+ [PA_COMMAND_PLAYBACK_STREAM_KILLED] = "PLAYBACK_STREAM_KILLED",
+ [PA_COMMAND_RECORD_STREAM_KILLED] = "RECORD_STREAM_KILLED",
+ [PA_COMMAND_STAT] = "STAT",
+ [PA_COMMAND_GET_PLAYBACK_LATENCY] = "PLAYBACK_LATENCY",
};
+#endif
+
struct reply_info {
struct pa_pdispatch *pdispatch;
struct reply_info *next, *previous;
@@ -106,7 +114,9 @@ int pa_pdispatch_run(struct pa_pdispatch *pd, struct pa_packet*packet, void *use
pa_tagstruct_getu32(ts, &tag) < 0)
goto finish;
- /*fprintf(stderr, __FILE__": Recieved opcode <%s>\n", command_names[command]);*/
+#ifdef DEBUG_OPCODES
+ fprintf(stderr, __FILE__": Recieved opcode <%s>\n", command_names[command]);
+#endif
if (command == PA_COMMAND_ERROR || command == PA_COMMAND_REPLY) {
struct reply_info *r;