mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-10 13:29:58 -05:00
implement get_latency native command
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@72 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
d8f1300661
commit
710233bbf6
7 changed files with 125 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue