mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +00:00
added code to vomp monitor to show when audio packets arrive.
This commit is contained in:
parent
b82a8c35cd
commit
a553eb0942
4
serval.h
4
serval.h
@ -1144,11 +1144,13 @@ typedef struct overlay_mdp_addrlist {
|
|||||||
|
|
||||||
#define MDP_VOMPEVENT 7
|
#define MDP_VOMPEVENT 7
|
||||||
#define VOMP_MAX_CALLS 16
|
#define VOMP_MAX_CALLS 16
|
||||||
|
/* elements sorted by size for alignment */
|
||||||
typedef struct overlay_mdp_vompevent {
|
typedef struct overlay_mdp_vompevent {
|
||||||
/* Once a call has been established, this is how the MDP/VoMP server
|
/* Once a call has been established, this is how the MDP/VoMP server
|
||||||
and user-end process talk about the call. */
|
and user-end process talk about the call. */
|
||||||
unsigned int call_session_token;
|
unsigned int call_session_token;
|
||||||
unsigned long long audio_sample_endtime;
|
unsigned long long audio_sample_endtime;
|
||||||
|
unsigned long long audio_sample_starttime;
|
||||||
unsigned long long last_activity;
|
unsigned long long last_activity;
|
||||||
#define VOMPEVENT_RINGING (1<<0)
|
#define VOMPEVENT_RINGING (1<<0)
|
||||||
#define VOMPEVENT_CALLENDED (1<<1)
|
#define VOMPEVENT_CALLENDED (1<<1)
|
||||||
@ -1165,9 +1167,9 @@ typedef struct overlay_mdp_vompevent {
|
|||||||
#define VOMPEVENT_CALLINFO (1<<11)
|
#define VOMPEVENT_CALLINFO (1<<11)
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
unsigned short audio_sample_bytes;
|
unsigned short audio_sample_bytes;
|
||||||
|
unsigned char audio_sample_codec;
|
||||||
unsigned char local_state;
|
unsigned char local_state;
|
||||||
unsigned char remote_state;
|
unsigned char remote_state;
|
||||||
unsigned char audio_sample_codec;
|
|
||||||
/* list of codecs the registering party is willing to support
|
/* list of codecs the registering party is willing to support
|
||||||
(for VOMPEVENT_REGISTERINTEREST) */
|
(for VOMPEVENT_REGISTERINTEREST) */
|
||||||
unsigned char supported_codecs[257];
|
unsigned char supported_codecs[257];
|
||||||
|
8
vomp.c
8
vomp.c
@ -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," %s",vomp_describe_codec(i));
|
||||||
|
|
||||||
fprintf(stderr,"\n");
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr,"Unknown message (type=0x%02x)\n",rx.packetTypeAndFlags);
|
fprintf(stderr,"Unknown message (type=0x%02x)\n",rx.packetTypeAndFlags);
|
||||||
|
Loading…
Reference in New Issue
Block a user