added code to vomp monitor to show when audio packets arrive.

This commit is contained in:
gardners 2012-04-24 09:11:57 +09:30
parent b82a8c35cd
commit a553eb0942
2 changed files with 11 additions and 1 deletions

View File

@ -1144,11 +1144,13 @@ typedef struct overlay_mdp_addrlist {
#define MDP_VOMPEVENT 7
#define VOMP_MAX_CALLS 16
/* elements sorted by size for alignment */
typedef struct overlay_mdp_vompevent {
/* Once a call has been established, this is how the MDP/VoMP server
and user-end process talk about the call. */
unsigned int call_session_token;
unsigned long long audio_sample_endtime;
unsigned long long audio_sample_starttime;
unsigned long long last_activity;
#define VOMPEVENT_RINGING (1<<0)
#define VOMPEVENT_CALLENDED (1<<1)
@ -1165,9 +1167,9 @@ typedef struct overlay_mdp_vompevent {
#define VOMPEVENT_CALLINFO (1<<11)
unsigned int flags;
unsigned short audio_sample_bytes;
unsigned char audio_sample_codec;
unsigned char local_state;
unsigned char remote_state;
unsigned char audio_sample_codec;
/* list of codecs the registering party is willing to support
(for VOMPEVENT_REGISTERINTEREST) */
unsigned char supported_codecs[257];

8
vomp.c
View File

@ -1159,6 +1159,14 @@ int app_vomp_monitor(int argc, const char *const *argv, struct command_line_opti
fprintf(stderr," %s",vomp_describe_codec(i));
fprintf(stderr,"\n");
if (rx.vompevent.audio_sample_codec) {
fprintf(stderr," attached audio sample: codec=%s, len=%d\n",
vomp_describe_codec(rx.vompevent.audio_sample_codec),
rx.vompevent.audio_sample_bytes);
fprintf(stderr," sample covers %lldms - %lldms of call.\n",
rx.vompevent.audio_sample_starttime,
rx.vompevent.audio_sample_endtime);
}
break;
default:
fprintf(stderr,"Unknown message (type=0x%02x)\n",rx.packetTypeAndFlags);