OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 fprintf(out_file, | 116 fprintf(out_file, |
117 "%5u %10u %10u %5i %5i %2i %#08X", | 117 "%5u %10u %10u %5i %5i %2i %#08X", |
118 packet->header().sequenceNumber, | 118 packet->header().sequenceNumber, |
119 packet->header().timestamp, | 119 packet->header().timestamp, |
120 static_cast<unsigned int>(packet->time_ms()), | 120 static_cast<unsigned int>(packet->time_ms()), |
121 static_cast<int>(packet->virtual_packet_length_bytes()), | 121 static_cast<int>(packet->virtual_packet_length_bytes()), |
122 packet->header().payloadType, | 122 packet->header().payloadType, |
123 packet->header().markerBit, | 123 packet->header().markerBit, |
124 packet->header().ssrc); | 124 packet->header().ssrc); |
125 if (print_audio_level && packet->header().extension.hasAudioLevel) { | 125 if (print_audio_level && packet->header().extension.hasAudioLevel) { |
126 // |audioLevel| consists of one bit for "V" and then 7 bits level. | |
127 fprintf(out_file, | 126 fprintf(out_file, |
128 " %5u (%1i)", | 127 " %5u (%1i)", |
129 packet->header().extension.audioLevel & 0x7F, | 128 packet->header().extension.audioLevel, |
130 (packet->header().extension.audioLevel & 0x80) == 0 ? 0 : 1); | 129 packet->header().extension.voiceActivity); |
131 } | 130 } |
132 if (print_abs_send_time && packet->header().extension.hasAbsoluteSendTime) { | 131 if (print_abs_send_time && packet->header().extension.hasAbsoluteSendTime) { |
133 if (cycles == -1) { | 132 if (cycles == -1) { |
134 // Initialize. | 133 // Initialize. |
135 max_abs_send_time = packet->header().extension.absoluteSendTime; | 134 max_abs_send_time = packet->header().extension.absoluteSendTime; |
136 cycles = 0; | 135 cycles = 0; |
137 } | 136 } |
138 // Abs sender time is 24 bit 6.18 fixed point. Shift by 8 to normalize to | 137 // Abs sender time is 24 bit 6.18 fixed point. Shift by 8 to normalize to |
139 // 32 bits (unsigned). Calculate the difference between this packet's | 138 // 32 bits (unsigned). Calculate the difference between this packet's |
140 // send time and the maximum observed. Cast to signed 32-bit to get the | 139 // send time and the maximum observed. Cast to signed 32-bit to get the |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 red_headers.pop_front(); | 174 red_headers.pop_front(); |
176 delete red; | 175 delete red; |
177 } | 176 } |
178 } | 177 } |
179 } | 178 } |
180 | 179 |
181 fclose(out_file); | 180 fclose(out_file); |
182 | 181 |
183 return 0; | 182 return 0; |
184 } | 183 } |
OLD | NEW |