ref: 78b4e76a28ea52d9993c657e0d2a3aeed05c6f25
parent: 091271a5a3a9e6ba2491d7b4695ea3f02e887c76
author: Ralph Giles <giles@mozilla.com>
date: Thu Oct 4 05:31:06 EDT 2012
Print the packet duration as well as size when sending. Helps debug duration-related issues.
--- a/src/opusrtp.c
+++ b/src/opusrtp.c
@@ -494,8 +494,6 @@
}
serialize_rtp_header(packet, rtp->header_size, rtp);
memcpy(packet + rtp->header_size, opus, rtp->payload_size);
- fprintf(stderr, "rtp %d %d %d (%d bytes)\n",
- rtp->type, rtp->seq, rtp->time, rtp->payload_size);
ret = sendto(fd, packet, rtp->header_size + rtp->payload_size, 0,
sin, sizeof(*sin));
if (ret < 0) {
@@ -615,6 +613,8 @@
rtp.seq++;
rtp.time += samples;
rtp.payload_size = op.bytes;
+ fprintf(stderr, "rtp %d %d %d %3d ms %5d bytes\n",
+ rtp.type, rtp.seq, rtp.time, samples/48, rtp.payload_size);
send_rtp_packet(fd, (struct sockaddr *)&sin, &rtp, op.packet);
usleep(samples*1000/48);
}