blob: 4c0f3bf84d3e6333c981d1d94aea2c7e4c08e932 [file] [log] [blame]
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +00001/*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
henrik.lundin@webrtc.org8b65d512014-10-07 05:30:04 +000011#include <errno.h>
henrik.lundine8a77e32016-06-22 06:34:03 -070012#include <inttypes.h>
henrik.lundin@webrtc.org8b65d512014-10-07 05:30:04 +000013#include <limits.h> // For ULONG_MAX returned by strtoul.
pbos@webrtc.org12dc1a32013-08-05 16:22:53 +000014#include <stdio.h>
henrik.lundin@webrtc.org8b65d512014-10-07 05:30:04 +000015#include <stdlib.h> // For strtoul.
oprypin6e09d872017-08-31 03:21:39 -070016#include <string.h>
pbos@webrtc.org12dc1a32013-08-05 16:22:53 +000017
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000018#include <algorithm>
henrik.lundind4ec9702016-09-06 01:22:45 -070019#include <ios>
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000020#include <iostream>
kwiberg2d0c3322016-02-14 09:28:33 -080021#include <memory>
Henrik Lundina2af0002017-06-20 16:54:39 +020022#include <numeric>
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000023#include <string>
24
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020025#include "modules/audio_coding/neteq/include/neteq.h"
26#include "modules/audio_coding/neteq/tools/fake_decode_from_file.h"
27#include "modules/audio_coding/neteq/tools/input_audio_file.h"
28#include "modules/audio_coding/neteq/tools/neteq_delay_analyzer.h"
29#include "modules/audio_coding/neteq/tools/neteq_packet_source_input.h"
30#include "modules/audio_coding/neteq/tools/neteq_replacement_input.h"
31#include "modules/audio_coding/neteq/tools/neteq_test.h"
32#include "modules/audio_coding/neteq/tools/output_audio_file.h"
33#include "modules/audio_coding/neteq/tools/output_wav_file.h"
34#include "modules/audio_coding/neteq/tools/rtp_file_source.h"
35#include "modules/include/module_common_types.h"
36#include "rtc_base/checks.h"
37#include "rtc_base/flags.h"
38#include "test/testsupport/fileutils.h"
Mirko Bonadei71207422017-09-15 13:58:09 +020039#include "typedefs.h" // NOLINT(build/include)
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000040
henrik.lundince5570e2016-05-24 06:14:57 -070041namespace webrtc {
42namespace test {
henrik.lundin@webrtc.org8b65d512014-10-07 05:30:04 +000043namespace {
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +000044
henrik.lundin@webrtc.org8b65d512014-10-07 05:30:04 +000045// Parses the input string for a valid SSRC (at the start of the string). If a
46// valid SSRC is found, it is written to the output variable |ssrc|, and true is
47// returned. Otherwise, false is returned.
48bool ParseSsrc(const std::string& str, uint32_t* ssrc) {
49 if (str.empty())
henrik.lundin@webrtc.org91039532014-10-07 07:18:36 +000050 return true;
henrik.lundin@webrtc.org8b65d512014-10-07 05:30:04 +000051 int base = 10;
52 // Look for "0x" or "0X" at the start and change base to 16 if found.
53 if ((str.compare(0, 2, "0x") == 0) || (str.compare(0, 2, "0X") == 0))
54 base = 16;
55 errno = 0;
56 char* end_ptr;
57 unsigned long value = strtoul(str.c_str(), &end_ptr, base);
58 if (value == ULONG_MAX && errno == ERANGE)
59 return false; // Value out of range for unsigned long.
60 if (sizeof(unsigned long) > sizeof(uint32_t) && value > 0xFFFFFFFF)
61 return false; // Value out of range for uint32_t.
62 if (end_ptr - str.c_str() < static_cast<ptrdiff_t>(str.length()))
63 return false; // Part of the string was not parsed.
64 *ssrc = static_cast<uint32_t>(value);
65 return true;
66}
67
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000068// Flag validators.
oprypin6e09d872017-08-31 03:21:39 -070069bool ValidatePayloadType(int value) {
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000070 if (value >= 0 && value <= 127) // Value is ok.
71 return true;
oprypin6e09d872017-08-31 03:21:39 -070072 printf("Payload type must be between 0 and 127, not %d\n",
73 static_cast<int>(value));
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000074 return false;
75}
76
oprypin6e09d872017-08-31 03:21:39 -070077bool ValidateSsrcValue(const std::string& str) {
henrik.lundin@webrtc.org8b65d512014-10-07 05:30:04 +000078 uint32_t dummy_ssrc;
oprypin6e09d872017-08-31 03:21:39 -070079 if (ParseSsrc(str, &dummy_ssrc)) // Value is ok.
80 return true;
81 printf("Invalid SSRC: %s\n", str.c_str());
82 return false;
henrik.lundin@webrtc.org8b65d512014-10-07 05:30:04 +000083}
84
oprypin6e09d872017-08-31 03:21:39 -070085static bool ValidateExtensionId(int value) {
henrik.lundin8a6a6002016-08-25 00:46:36 -070086 if (value > 0 && value <= 255) // Value is ok.
87 return true;
oprypin6e09d872017-08-31 03:21:39 -070088 printf("Extension ID must be between 1 and 255, not %d\n",
89 static_cast<int>(value));
henrik.lundin8a6a6002016-08-25 00:46:36 -070090 return false;
91}
92
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000093// Define command line flags.
oprypin6e09d872017-08-31 03:21:39 -070094DEFINE_int(pcmu, 0, "RTP payload type for PCM-u");
95DEFINE_int(pcma, 8, "RTP payload type for PCM-a");
96DEFINE_int(ilbc, 102, "RTP payload type for iLBC");
97DEFINE_int(isac, 103, "RTP payload type for iSAC");
98DEFINE_int(isac_swb, 104, "RTP payload type for iSAC-swb (32 kHz)");
99DEFINE_int(opus, 111, "RTP payload type for Opus");
100DEFINE_int(pcm16b, 93, "RTP payload type for PCM16b-nb (8 kHz)");
101DEFINE_int(pcm16b_wb, 94, "RTP payload type for PCM16b-wb (16 kHz)");
102DEFINE_int(pcm16b_swb32, 95, "RTP payload type for PCM16b-swb32 (32 kHz)");
103DEFINE_int(pcm16b_swb48, 96, "RTP payload type for PCM16b-swb48 (48 kHz)");
104DEFINE_int(g722, 9, "RTP payload type for G.722");
105DEFINE_int(avt, 106, "RTP payload type for AVT/DTMF (8 kHz)");
106DEFINE_int(avt_16, 114, "RTP payload type for AVT/DTMF (16 kHz)");
107DEFINE_int(avt_32, 115, "RTP payload type for AVT/DTMF (32 kHz)");
108DEFINE_int(avt_48, 116, "RTP payload type for AVT/DTMF (48 kHz)");
109DEFINE_int(red, 117, "RTP payload type for redundant audio (RED)");
110DEFINE_int(cn_nb, 13, "RTP payload type for comfort noise (8 kHz)");
111DEFINE_int(cn_wb, 98, "RTP payload type for comfort noise (16 kHz)");
112DEFINE_int(cn_swb32, 99, "RTP payload type for comfort noise (32 kHz)");
113DEFINE_int(cn_swb48, 100, "RTP payload type for comfort noise (48 kHz)");
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000114DEFINE_bool(codec_map, false, "Prints the mapping between RTP payload type and "
115 "codec");
henrik.lundin@webrtc.org75642fc2014-02-05 08:49:13 +0000116DEFINE_string(replacement_audio_file, "",
117 "A PCM file that will be used to populate ""dummy"" RTP packets");
henrik.lundin@webrtc.org8b65d512014-10-07 05:30:04 +0000118DEFINE_string(ssrc,
119 "",
120 "Only use packets with this SSRC (decimal or hex, the latter "
121 "starting with 0x)");
oprypin6e09d872017-08-31 03:21:39 -0700122DEFINE_int(audio_level, 1, "Extension ID for audio level (RFC 6464)");
123DEFINE_int(abs_send_time, 3, "Extension ID for absolute sender time");
124DEFINE_int(transport_seq_no, 5, "Extension ID for transport sequence number");
Henrik Lundin0bc0ccd2017-06-20 14:48:50 +0200125DEFINE_bool(matlabplot,
126 false,
127 "Generates a matlab script for plotting the delay profile");
oprypin6e09d872017-08-31 03:21:39 -0700128DEFINE_bool(help, false, "Prints this message");
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000129
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000130// Maps a codec type to a printable name string.
henrik.lundince5570e2016-05-24 06:14:57 -0700131std::string CodecName(NetEqDecoder codec) {
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000132 switch (codec) {
henrik.lundince5570e2016-05-24 06:14:57 -0700133 case NetEqDecoder::kDecoderPCMu:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000134 return "PCM-u";
henrik.lundince5570e2016-05-24 06:14:57 -0700135 case NetEqDecoder::kDecoderPCMa:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000136 return "PCM-a";
henrik.lundince5570e2016-05-24 06:14:57 -0700137 case NetEqDecoder::kDecoderILBC:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000138 return "iLBC";
henrik.lundince5570e2016-05-24 06:14:57 -0700139 case NetEqDecoder::kDecoderISAC:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000140 return "iSAC";
henrik.lundince5570e2016-05-24 06:14:57 -0700141 case NetEqDecoder::kDecoderISACswb:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000142 return "iSAC-swb (32 kHz)";
henrik.lundince5570e2016-05-24 06:14:57 -0700143 case NetEqDecoder::kDecoderOpus:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000144 return "Opus";
henrik.lundince5570e2016-05-24 06:14:57 -0700145 case NetEqDecoder::kDecoderPCM16B:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000146 return "PCM16b-nb (8 kHz)";
henrik.lundince5570e2016-05-24 06:14:57 -0700147 case NetEqDecoder::kDecoderPCM16Bwb:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000148 return "PCM16b-wb (16 kHz)";
henrik.lundince5570e2016-05-24 06:14:57 -0700149 case NetEqDecoder::kDecoderPCM16Bswb32kHz:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000150 return "PCM16b-swb32 (32 kHz)";
henrik.lundince5570e2016-05-24 06:14:57 -0700151 case NetEqDecoder::kDecoderPCM16Bswb48kHz:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000152 return "PCM16b-swb48 (48 kHz)";
henrik.lundince5570e2016-05-24 06:14:57 -0700153 case NetEqDecoder::kDecoderG722:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000154 return "G.722";
henrik.lundince5570e2016-05-24 06:14:57 -0700155 case NetEqDecoder::kDecoderRED:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000156 return "redundant audio (RED)";
henrik.lundince5570e2016-05-24 06:14:57 -0700157 case NetEqDecoder::kDecoderAVT:
solenberg2779bab2016-11-17 04:45:19 -0800158 return "AVT/DTMF (8 kHz)";
159 case NetEqDecoder::kDecoderAVT16kHz:
160 return "AVT/DTMF (16 kHz)";
161 case NetEqDecoder::kDecoderAVT32kHz:
162 return "AVT/DTMF (32 kHz)";
163 case NetEqDecoder::kDecoderAVT48kHz:
164 return "AVT/DTMF (48 kHz)";
henrik.lundince5570e2016-05-24 06:14:57 -0700165 case NetEqDecoder::kDecoderCNGnb:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000166 return "comfort noise (8 kHz)";
henrik.lundince5570e2016-05-24 06:14:57 -0700167 case NetEqDecoder::kDecoderCNGwb:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000168 return "comfort noise (16 kHz)";
henrik.lundince5570e2016-05-24 06:14:57 -0700169 case NetEqDecoder::kDecoderCNGswb32kHz:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000170 return "comfort noise (32 kHz)";
henrik.lundince5570e2016-05-24 06:14:57 -0700171 case NetEqDecoder::kDecoderCNGswb48kHz:
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000172 return "comfort noise (48 kHz)";
173 default:
henrik.lundine8a77e32016-06-22 06:34:03 -0700174 FATAL();
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000175 return "undefined";
176 }
177}
178
oprypin6e09d872017-08-31 03:21:39 -0700179void PrintCodecMappingEntry(NetEqDecoder codec, int flag) {
pkasting@chromium.orgd3245462015-02-23 21:28:22 +0000180 std::cout << CodecName(codec) << ": " << flag << std::endl;
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000181}
182
183void PrintCodecMapping() {
oprypin6e09d872017-08-31 03:21:39 -0700184 PrintCodecMappingEntry(NetEqDecoder::kDecoderPCMu, FLAG_pcmu);
185 PrintCodecMappingEntry(NetEqDecoder::kDecoderPCMa, FLAG_pcma);
186 PrintCodecMappingEntry(NetEqDecoder::kDecoderILBC, FLAG_ilbc);
187 PrintCodecMappingEntry(NetEqDecoder::kDecoderISAC, FLAG_isac);
188 PrintCodecMappingEntry(NetEqDecoder::kDecoderISACswb, FLAG_isac_swb);
189 PrintCodecMappingEntry(NetEqDecoder::kDecoderOpus, FLAG_opus);
190 PrintCodecMappingEntry(NetEqDecoder::kDecoderPCM16B, FLAG_pcm16b);
191 PrintCodecMappingEntry(NetEqDecoder::kDecoderPCM16Bwb, FLAG_pcm16b_wb);
henrik.lundince5570e2016-05-24 06:14:57 -0700192 PrintCodecMappingEntry(NetEqDecoder::kDecoderPCM16Bswb32kHz,
oprypin6e09d872017-08-31 03:21:39 -0700193 FLAG_pcm16b_swb32);
henrik.lundince5570e2016-05-24 06:14:57 -0700194 PrintCodecMappingEntry(NetEqDecoder::kDecoderPCM16Bswb48kHz,
oprypin6e09d872017-08-31 03:21:39 -0700195 FLAG_pcm16b_swb48);
196 PrintCodecMappingEntry(NetEqDecoder::kDecoderG722, FLAG_g722);
197 PrintCodecMappingEntry(NetEqDecoder::kDecoderAVT, FLAG_avt);
198 PrintCodecMappingEntry(NetEqDecoder::kDecoderAVT16kHz, FLAG_avt_16);
199 PrintCodecMappingEntry(NetEqDecoder::kDecoderAVT32kHz, FLAG_avt_32);
200 PrintCodecMappingEntry(NetEqDecoder::kDecoderAVT48kHz, FLAG_avt_48);
201 PrintCodecMappingEntry(NetEqDecoder::kDecoderRED, FLAG_red);
202 PrintCodecMappingEntry(NetEqDecoder::kDecoderCNGnb, FLAG_cn_nb);
203 PrintCodecMappingEntry(NetEqDecoder::kDecoderCNGwb, FLAG_cn_wb);
204 PrintCodecMappingEntry(NetEqDecoder::kDecoderCNGswb32kHz, FLAG_cn_swb32);
205 PrintCodecMappingEntry(NetEqDecoder::kDecoderCNGswb48kHz, FLAG_cn_swb48);
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000206}
207
Henrik Lundin0bc0ccd2017-06-20 14:48:50 +0200208rtc::Optional<int> CodecSampleRate(uint8_t payload_type) {
oprypin6e09d872017-08-31 03:21:39 -0700209 if (payload_type == FLAG_pcmu || payload_type == FLAG_pcma ||
210 payload_type == FLAG_ilbc || payload_type == FLAG_pcm16b ||
211 payload_type == FLAG_cn_nb || payload_type == FLAG_avt)
Oskar Sundbom12ab00b2017-11-16 15:31:38 +0100212 return 8000;
oprypin6e09d872017-08-31 03:21:39 -0700213 if (payload_type == FLAG_isac || payload_type == FLAG_pcm16b_wb ||
214 payload_type == FLAG_g722 || payload_type == FLAG_cn_wb ||
215 payload_type == FLAG_avt_16)
Oskar Sundbom12ab00b2017-11-16 15:31:38 +0100216 return 16000;
oprypin6e09d872017-08-31 03:21:39 -0700217 if (payload_type == FLAG_isac_swb || payload_type == FLAG_pcm16b_swb32 ||
218 payload_type == FLAG_cn_swb32 || payload_type == FLAG_avt_32)
Oskar Sundbom12ab00b2017-11-16 15:31:38 +0100219 return 32000;
oprypin6e09d872017-08-31 03:21:39 -0700220 if (payload_type == FLAG_opus || payload_type == FLAG_pcm16b_swb48 ||
221 payload_type == FLAG_cn_swb48 || payload_type == FLAG_avt_48)
Oskar Sundbom12ab00b2017-11-16 15:31:38 +0100222 return 48000;
oprypin6e09d872017-08-31 03:21:39 -0700223 if (payload_type == FLAG_red)
Oskar Sundbom12ab00b2017-11-16 15:31:38 +0100224 return 0;
225 return rtc::nullopt;
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000226}
227
henrik.lundine8a77e32016-06-22 06:34:03 -0700228// Class to let through only the packets with a given SSRC. Should be used as an
229// outer layer on another NetEqInput object.
230class FilterSsrcInput : public NetEqInput {
231 public:
232 FilterSsrcInput(std::unique_ptr<NetEqInput> source, uint32_t ssrc)
233 : source_(std::move(source)), ssrc_(ssrc) {
234 FindNextWithCorrectSsrc();
henrik.lundind4ec9702016-09-06 01:22:45 -0700235 RTC_CHECK(source_->NextHeader()) << "Found no packet with SSRC = 0x"
236 << std::hex << ssrc_;
henrik.lundine8a77e32016-06-22 06:34:03 -0700237 }
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000238
henrik.lundine8a77e32016-06-22 06:34:03 -0700239 // All methods but PopPacket() simply relay to the |source_| object.
240 rtc::Optional<int64_t> NextPacketTime() const override {
241 return source_->NextPacketTime();
242 }
243 rtc::Optional<int64_t> NextOutputEventTime() const override {
244 return source_->NextOutputEventTime();
245 }
246
247 // Returns the next packet, and throws away upcoming packets that do not match
248 // the desired SSRC.
249 std::unique_ptr<PacketData> PopPacket() override {
250 std::unique_ptr<PacketData> packet_to_return = source_->PopPacket();
henrik.lundin246ef3e2017-04-24 09:14:32 -0700251 RTC_DCHECK(!packet_to_return || packet_to_return->header.ssrc == ssrc_);
henrik.lundine8a77e32016-06-22 06:34:03 -0700252 // Pre-fetch the next packet with correct SSRC. Hence, |source_| will always
253 // be have a valid packet (or empty if no more packets are available) when
254 // this method returns.
255 FindNextWithCorrectSsrc();
256 return packet_to_return;
257 }
258
259 void AdvanceOutputEvent() override { source_->AdvanceOutputEvent(); }
260
261 bool ended() const override { return source_->ended(); }
262
263 rtc::Optional<RTPHeader> NextHeader() const override {
264 return source_->NextHeader();
265 }
266
267 private:
268 void FindNextWithCorrectSsrc() {
269 while (source_->NextHeader() && source_->NextHeader()->ssrc != ssrc_) {
270 source_->PopPacket();
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000271 }
272 }
henrik.lundine8a77e32016-06-22 06:34:03 -0700273
274 std::unique_ptr<NetEqInput> source_;
275 uint32_t ssrc_;
276};
pkasting@chromium.org4dba2e92015-01-26 19:59:32 +0000277
Henrik Lundin0bc0ccd2017-06-20 14:48:50 +0200278// A callback class which prints whenver the inserted packet stream changes
279// the SSRC.
280class SsrcSwitchDetector : public NetEqPostInsertPacket {
281 public:
282 // Takes a pointer to another callback object, which will be invoked after
283 // this object finishes. This does not transfer ownership, and null is a
284 // valid value.
Henrik Lundina2af0002017-06-20 16:54:39 +0200285 explicit SsrcSwitchDetector(NetEqPostInsertPacket* other_callback)
Henrik Lundin0bc0ccd2017-06-20 14:48:50 +0200286 : other_callback_(other_callback) {}
287
Henrik Lundina2af0002017-06-20 16:54:39 +0200288 void AfterInsertPacket(const NetEqInput::PacketData& packet,
289 NetEq* neteq) override {
Henrik Lundin0bc0ccd2017-06-20 14:48:50 +0200290 if (last_ssrc_ && packet.header.ssrc != *last_ssrc_) {
291 std::cout << "Changing streams from 0x" << std::hex << *last_ssrc_
292 << " to 0x" << std::hex << packet.header.ssrc
293 << std::dec << " (payload type "
294 << static_cast<int>(packet.header.payloadType) << ")"
295 << std::endl;
296 }
Oskar Sundbom12ab00b2017-11-16 15:31:38 +0100297 last_ssrc_ = packet.header.ssrc;
Henrik Lundin0bc0ccd2017-06-20 14:48:50 +0200298 if (other_callback_) {
299 other_callback_->AfterInsertPacket(packet, neteq);
300 }
301 }
302
303 private:
304 NetEqPostInsertPacket* other_callback_;
305 rtc::Optional<uint32_t> last_ssrc_;
306};
307
Henrik Lundina2af0002017-06-20 16:54:39 +0200308class StatsGetter : public NetEqGetAudioCallback {
309 public:
310 // This struct is a replica of webrtc::NetEqNetworkStatistics, but with all
311 // values stored in double precision.
312 struct Stats {
313 double current_buffer_size_ms = 0.0;
314 double preferred_buffer_size_ms = 0.0;
315 double jitter_peaks_found = 0.0;
316 double packet_loss_rate = 0.0;
Henrik Lundina2af0002017-06-20 16:54:39 +0200317 double expand_rate = 0.0;
318 double speech_expand_rate = 0.0;
319 double preemptive_rate = 0.0;
320 double accelerate_rate = 0.0;
321 double secondary_decoded_rate = 0.0;
minyue-webrtc0c3ca752017-08-23 15:59:38 +0200322 double secondary_discarded_rate = 0.0;
Henrik Lundina2af0002017-06-20 16:54:39 +0200323 double clockdrift_ppm = 0.0;
324 double added_zero_samples = 0.0;
325 double mean_waiting_time_ms = 0.0;
326 double median_waiting_time_ms = 0.0;
327 double min_waiting_time_ms = 0.0;
328 double max_waiting_time_ms = 0.0;
329 };
330
331 // Takes a pointer to another callback object, which will be invoked after
332 // this object finishes. This does not transfer ownership, and null is a
333 // valid value.
334 explicit StatsGetter(NetEqGetAudioCallback* other_callback)
335 : other_callback_(other_callback) {}
336
337 void BeforeGetAudio(NetEq* neteq) override {
338 if (other_callback_) {
339 other_callback_->BeforeGetAudio(neteq);
340 }
341 }
342
343 void AfterGetAudio(int64_t time_now_ms,
344 const AudioFrame& audio_frame,
345 bool muted,
346 NetEq* neteq) override {
347 if (++counter_ >= 100) {
348 counter_ = 0;
349 NetEqNetworkStatistics stats;
350 RTC_CHECK_EQ(neteq->NetworkStatistics(&stats), 0);
351 stats_.push_back(stats);
352 }
353 if (other_callback_) {
henrik.lundinf09c9042017-08-29 09:14:08 -0700354 other_callback_->AfterGetAudio(time_now_ms, audio_frame, muted, neteq);
Henrik Lundina2af0002017-06-20 16:54:39 +0200355 }
356 }
357
358 double AverageSpeechExpandRate() const {
359 double sum_speech_expand =
360 std::accumulate(stats_.begin(), stats_.end(), double{0.0},
361 [](double a, NetEqNetworkStatistics b) {
362 return a + static_cast<double>(b.speech_expand_rate);
363 });
364 return sum_speech_expand / 16384.0 / stats_.size();
365 }
366
367 Stats AverageStats() const {
368 Stats sum_stats = std::accumulate(
369 stats_.begin(), stats_.end(), Stats(),
370 [](Stats a, NetEqNetworkStatistics b) {
371 a.current_buffer_size_ms += b.current_buffer_size_ms;
372 a.preferred_buffer_size_ms += b.preferred_buffer_size_ms;
373 a.jitter_peaks_found += b.jitter_peaks_found;
374 a.packet_loss_rate += b.packet_loss_rate / 16384.0;
Henrik Lundina2af0002017-06-20 16:54:39 +0200375 a.expand_rate += b.expand_rate / 16384.0;
376 a.speech_expand_rate += b.speech_expand_rate / 16384.0;
377 a.preemptive_rate += b.preemptive_rate / 16384.0;
378 a.accelerate_rate += b.accelerate_rate / 16384.0;
379 a.secondary_decoded_rate += b.secondary_decoded_rate / 16384.0;
minyue-webrtc0c3ca752017-08-23 15:59:38 +0200380 a.secondary_discarded_rate += b.secondary_discarded_rate / 16384.0;
Henrik Lundina2af0002017-06-20 16:54:39 +0200381 a.clockdrift_ppm += b.clockdrift_ppm;
382 a.added_zero_samples += b.added_zero_samples;
383 a.mean_waiting_time_ms += b.mean_waiting_time_ms;
384 a.median_waiting_time_ms += b.median_waiting_time_ms;
henrik.lundin96571722017-08-30 00:41:30 -0700385 a.min_waiting_time_ms =
386 std::min(a.min_waiting_time_ms,
387 static_cast<double>(b.min_waiting_time_ms));
388 a.max_waiting_time_ms =
389 std::max(a.max_waiting_time_ms,
390 static_cast<double>(b.max_waiting_time_ms));
Henrik Lundina2af0002017-06-20 16:54:39 +0200391 return a;
392 });
393
394 sum_stats.current_buffer_size_ms /= stats_.size();
395 sum_stats.preferred_buffer_size_ms /= stats_.size();
396 sum_stats.jitter_peaks_found /= stats_.size();
397 sum_stats.packet_loss_rate /= stats_.size();
Henrik Lundina2af0002017-06-20 16:54:39 +0200398 sum_stats.expand_rate /= stats_.size();
399 sum_stats.speech_expand_rate /= stats_.size();
400 sum_stats.preemptive_rate /= stats_.size();
401 sum_stats.accelerate_rate /= stats_.size();
402 sum_stats.secondary_decoded_rate /= stats_.size();
minyue-webrtc0c3ca752017-08-23 15:59:38 +0200403 sum_stats.secondary_discarded_rate /= stats_.size();
Henrik Lundina2af0002017-06-20 16:54:39 +0200404 sum_stats.clockdrift_ppm /= stats_.size();
405 sum_stats.added_zero_samples /= stats_.size();
406 sum_stats.mean_waiting_time_ms /= stats_.size();
407 sum_stats.median_waiting_time_ms /= stats_.size();
Henrik Lundina2af0002017-06-20 16:54:39 +0200408
409 return sum_stats;
410 }
411
412 private:
413 NetEqGetAudioCallback* other_callback_;
414 size_t counter_ = 0;
415 std::vector<NetEqNetworkStatistics> stats_;
416};
417
henrik.lundin303d3e12016-05-26 05:56:03 -0700418int RunTest(int argc, char* argv[]) {
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000419 std::string program_name = argv[0];
420 std::string usage = "Tool for decoding an RTP dump file using NetEq.\n"
oprypin6e09d872017-08-31 03:21:39 -0700421 "Run " + program_name + " --help for usage.\n"
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000422 "Example usage:\n" + program_name +
henrik.lundin@webrtc.org03499a02014-11-24 14:50:53 +0000423 " input.rtp output.{pcm, wav}\n";
oprypin6e09d872017-08-31 03:21:39 -0700424 if (rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true)) {
425 return 1;
426 }
427 if (FLAG_help) {
428 std::cout << usage;
429 rtc::FlagList::Print(nullptr, false);
430 return 0;
431 }
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000432
oprypin6e09d872017-08-31 03:21:39 -0700433 if (FLAG_codec_map) {
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000434 PrintCodecMapping();
435 }
436
437 if (argc != 3) {
oprypin6e09d872017-08-31 03:21:39 -0700438 if (FLAG_codec_map) {
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000439 // We have already printed the codec map. Just end the program.
440 return 0;
441 }
442 // Print usage information.
oprypin6e09d872017-08-31 03:21:39 -0700443 std::cout << usage;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000444 return 0;
445 }
oprypin6e09d872017-08-31 03:21:39 -0700446 RTC_CHECK(ValidatePayloadType(FLAG_pcmu));
447 RTC_CHECK(ValidatePayloadType(FLAG_pcma));
448 RTC_CHECK(ValidatePayloadType(FLAG_ilbc));
449 RTC_CHECK(ValidatePayloadType(FLAG_isac));
450 RTC_CHECK(ValidatePayloadType(FLAG_isac_swb));
451 RTC_CHECK(ValidatePayloadType(FLAG_opus));
452 RTC_CHECK(ValidatePayloadType(FLAG_pcm16b));
453 RTC_CHECK(ValidatePayloadType(FLAG_pcm16b_wb));
454 RTC_CHECK(ValidatePayloadType(FLAG_pcm16b_swb32));
455 RTC_CHECK(ValidatePayloadType(FLAG_pcm16b_swb48));
456 RTC_CHECK(ValidatePayloadType(FLAG_g722));
457 RTC_CHECK(ValidatePayloadType(FLAG_avt));
458 RTC_CHECK(ValidatePayloadType(FLAG_avt_16));
459 RTC_CHECK(ValidatePayloadType(FLAG_avt_32));
460 RTC_CHECK(ValidatePayloadType(FLAG_avt_48));
461 RTC_CHECK(ValidatePayloadType(FLAG_red));
462 RTC_CHECK(ValidatePayloadType(FLAG_cn_nb));
463 RTC_CHECK(ValidatePayloadType(FLAG_cn_wb));
464 RTC_CHECK(ValidatePayloadType(FLAG_cn_swb32));
465 RTC_CHECK(ValidatePayloadType(FLAG_cn_swb48));
466 RTC_CHECK(ValidateSsrcValue(FLAG_ssrc));
467 RTC_CHECK(ValidateExtensionId(FLAG_audio_level));
468 RTC_CHECK(ValidateExtensionId(FLAG_abs_send_time));
469 RTC_CHECK(ValidateExtensionId(FLAG_transport_seq_no));
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000470
henrik.lundin8a6a6002016-08-25 00:46:36 -0700471 // Gather RTP header extensions in a map.
472 NetEqPacketSourceInput::RtpHeaderExtensionMap rtp_ext_map = {
oprypin6e09d872017-08-31 03:21:39 -0700473 {FLAG_audio_level, kRtpExtensionAudioLevel},
474 {FLAG_abs_send_time, kRtpExtensionAbsoluteSendTime},
475 {FLAG_transport_seq_no, kRtpExtensionTransportSequenceNumber}};
henrik.lundin8a6a6002016-08-25 00:46:36 -0700476
henrik.lundine8a77e32016-06-22 06:34:03 -0700477 const std::string input_file_name = argv[1];
478 std::unique_ptr<NetEqInput> input;
479 if (RtpFileSource::ValidRtpDump(input_file_name) ||
480 RtpFileSource::ValidPcap(input_file_name)) {
henrik.lundin8a6a6002016-08-25 00:46:36 -0700481 input.reset(new NetEqRtpDumpInput(input_file_name, rtp_ext_map));
ivoccaa5f4b2015-09-08 03:28:46 -0700482 } else {
henrik.lundin8a6a6002016-08-25 00:46:36 -0700483 input.reset(new NetEqEventLogInput(input_file_name, rtp_ext_map));
ivoccaa5f4b2015-09-08 03:28:46 -0700484 }
485
henrik.lundine8a77e32016-06-22 06:34:03 -0700486 std::cout << "Input file: " << input_file_name << std::endl;
487 RTC_CHECK(input) << "Cannot open input file";
488 RTC_CHECK(!input->ended()) << "Input file is empty";
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000489
henrik.lundin@webrtc.org8b65d512014-10-07 05:30:04 +0000490 // Check if an SSRC value was provided.
oprypin6e09d872017-08-31 03:21:39 -0700491 if (strlen(FLAG_ssrc) > 0) {
henrik.lundin@webrtc.org8b65d512014-10-07 05:30:04 +0000492 uint32_t ssrc;
oprypin6e09d872017-08-31 03:21:39 -0700493 RTC_CHECK(ParseSsrc(FLAG_ssrc, &ssrc)) << "Flag verification has failed.";
henrik.lundine8a77e32016-06-22 06:34:03 -0700494 input.reset(new FilterSsrcInput(std::move(input), ssrc));
ivoccaa5f4b2015-09-08 03:28:46 -0700495 }
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000496
henrik.lundin@webrtc.org03499a02014-11-24 14:50:53 +0000497 // Check the sample rate.
Henrik Lundin0bc0ccd2017-06-20 14:48:50 +0200498 rtc::Optional<int> sample_rate_hz;
499 std::set<std::pair<int, uint32_t>> discarded_pt_and_ssrc;
500 while (input->NextHeader()) {
501 rtc::Optional<RTPHeader> first_rtp_header = input->NextHeader();
502 RTC_DCHECK(first_rtp_header);
503 sample_rate_hz = CodecSampleRate(first_rtp_header->payloadType);
504 if (sample_rate_hz) {
505 std::cout << "Found valid packet with payload type "
506 << static_cast<int>(first_rtp_header->payloadType)
507 << " and SSRC 0x" << std::hex << first_rtp_header->ssrc
508 << std::dec << std::endl;
509 break;
510 }
511 // Discard this packet and move to the next. Keep track of discarded payload
512 // types and SSRCs.
513 discarded_pt_and_ssrc.emplace(first_rtp_header->payloadType,
514 first_rtp_header->ssrc);
515 input->PopPacket();
516 }
517 if (!discarded_pt_and_ssrc.empty()) {
518 std::cout << "Discarded initial packets with the following payload types "
519 "and SSRCs:"
520 << std::endl;
521 for (const auto& d : discarded_pt_and_ssrc) {
522 std::cout << "PT " << d.first << "; SSRC 0x" << std::hex
523 << static_cast<int>(d.second) << std::dec << std::endl;
524 }
525 }
526 if (!sample_rate_hz) {
527 std::cout << "Cannot find any packets with known payload types"
528 << std::endl;
529 RTC_NOTREACHED();
530 }
henrik.lundin@webrtc.org03499a02014-11-24 14:50:53 +0000531
532 // Open the output file now that we know the sample rate. (Rate is only needed
533 // for wav files.)
henrik.lundine8a77e32016-06-22 06:34:03 -0700534 const std::string output_file_name = argv[2];
henrik.lundince5570e2016-05-24 06:14:57 -0700535 std::unique_ptr<AudioSink> output;
henrik.lundin@webrtc.org03499a02014-11-24 14:50:53 +0000536 if (output_file_name.size() >= 4 &&
537 output_file_name.substr(output_file_name.size() - 4) == ".wav") {
538 // Open a wav file.
Henrik Lundin0bc0ccd2017-06-20 14:48:50 +0200539 output.reset(new OutputWavFile(output_file_name, *sample_rate_hz));
henrik.lundin@webrtc.org03499a02014-11-24 14:50:53 +0000540 } else {
541 // Open a pcm file.
henrik.lundince5570e2016-05-24 06:14:57 -0700542 output.reset(new OutputAudioFile(output_file_name));
henrik.lundin@webrtc.org03499a02014-11-24 14:50:53 +0000543 }
544
henrik.lundine8a77e32016-06-22 06:34:03 -0700545 std::cout << "Output file: " << output_file_name << std::endl;
henrik.lundin@webrtc.org03499a02014-11-24 14:50:53 +0000546
henrik.lundine8a77e32016-06-22 06:34:03 -0700547 NetEqTest::DecoderMap codecs = {
oprypin6e09d872017-08-31 03:21:39 -0700548 {FLAG_pcmu, std::make_pair(NetEqDecoder::kDecoderPCMu, "pcmu")},
549 {FLAG_pcma, std::make_pair(NetEqDecoder::kDecoderPCMa, "pcma")},
550 {FLAG_ilbc, std::make_pair(NetEqDecoder::kDecoderILBC, "ilbc")},
551 {FLAG_isac, std::make_pair(NetEqDecoder::kDecoderISAC, "isac")},
552 {FLAG_isac_swb,
henrik.lundine8a77e32016-06-22 06:34:03 -0700553 std::make_pair(NetEqDecoder::kDecoderISACswb, "isac-swb")},
oprypin6e09d872017-08-31 03:21:39 -0700554 {FLAG_opus, std::make_pair(NetEqDecoder::kDecoderOpus, "opus")},
555 {FLAG_pcm16b, std::make_pair(NetEqDecoder::kDecoderPCM16B, "pcm16-nb")},
556 {FLAG_pcm16b_wb,
henrik.lundine8a77e32016-06-22 06:34:03 -0700557 std::make_pair(NetEqDecoder::kDecoderPCM16Bwb, "pcm16-wb")},
oprypin6e09d872017-08-31 03:21:39 -0700558 {FLAG_pcm16b_swb32,
henrik.lundine8a77e32016-06-22 06:34:03 -0700559 std::make_pair(NetEqDecoder::kDecoderPCM16Bswb32kHz, "pcm16-swb32")},
oprypin6e09d872017-08-31 03:21:39 -0700560 {FLAG_pcm16b_swb48,
henrik.lundine8a77e32016-06-22 06:34:03 -0700561 std::make_pair(NetEqDecoder::kDecoderPCM16Bswb48kHz, "pcm16-swb48")},
oprypin6e09d872017-08-31 03:21:39 -0700562 {FLAG_g722, std::make_pair(NetEqDecoder::kDecoderG722, "g722")},
563 {FLAG_avt, std::make_pair(NetEqDecoder::kDecoderAVT, "avt")},
564 {FLAG_avt_16, std::make_pair(NetEqDecoder::kDecoderAVT16kHz, "avt-16")},
565 {FLAG_avt_32,
solenberg2779bab2016-11-17 04:45:19 -0800566 std::make_pair(NetEqDecoder::kDecoderAVT32kHz, "avt-32")},
oprypin6e09d872017-08-31 03:21:39 -0700567 {FLAG_avt_48,
solenberg2779bab2016-11-17 04:45:19 -0800568 std::make_pair(NetEqDecoder::kDecoderAVT48kHz, "avt-48")},
oprypin6e09d872017-08-31 03:21:39 -0700569 {FLAG_red, std::make_pair(NetEqDecoder::kDecoderRED, "red")},
570 {FLAG_cn_nb, std::make_pair(NetEqDecoder::kDecoderCNGnb, "cng-nb")},
571 {FLAG_cn_wb, std::make_pair(NetEqDecoder::kDecoderCNGwb, "cng-wb")},
572 {FLAG_cn_swb32,
henrik.lundine8a77e32016-06-22 06:34:03 -0700573 std::make_pair(NetEqDecoder::kDecoderCNGswb32kHz, "cng-swb32")},
oprypin6e09d872017-08-31 03:21:39 -0700574 {FLAG_cn_swb48,
henrik.lundine8a77e32016-06-22 06:34:03 -0700575 std::make_pair(NetEqDecoder::kDecoderCNGswb48kHz, "cng-swb48")}};
henrik.lundin@webrtc.org03499a02014-11-24 14:50:53 +0000576
henrik.lundine8a77e32016-06-22 06:34:03 -0700577 // Check if a replacement audio file was provided.
578 std::unique_ptr<AudioDecoder> replacement_decoder;
579 NetEqTest::ExtDecoderMap ext_codecs;
oprypin6e09d872017-08-31 03:21:39 -0700580 if (strlen(FLAG_replacement_audio_file) > 0) {
henrik.lundine8a77e32016-06-22 06:34:03 -0700581 // Find largest unused payload type.
582 int replacement_pt = 127;
583 while (!(codecs.find(replacement_pt) == codecs.end() &&
584 ext_codecs.find(replacement_pt) == ext_codecs.end())) {
585 --replacement_pt;
586 RTC_CHECK_GE(replacement_pt, 0);
587 }
588
589 auto std_set_int32_to_uint8 = [](const std::set<int32_t>& a) {
590 std::set<uint8_t> b;
591 for (auto& x : a) {
592 b.insert(static_cast<uint8_t>(x));
593 }
594 return b;
595 };
596
597 std::set<uint8_t> cn_types = std_set_int32_to_uint8(
oprypin6e09d872017-08-31 03:21:39 -0700598 {FLAG_cn_nb, FLAG_cn_wb, FLAG_cn_swb32, FLAG_cn_swb48});
henrik.lundine8a77e32016-06-22 06:34:03 -0700599 std::set<uint8_t> forbidden_types =
oprypin6e09d872017-08-31 03:21:39 -0700600 std_set_int32_to_uint8({FLAG_g722, FLAG_red, FLAG_avt,
601 FLAG_avt_16, FLAG_avt_32, FLAG_avt_48});
henrik.lundine8a77e32016-06-22 06:34:03 -0700602 input.reset(new NetEqReplacementInput(std::move(input), replacement_pt,
603 cn_types, forbidden_types));
604
605 replacement_decoder.reset(new FakeDecodeFromFile(
606 std::unique_ptr<InputAudioFile>(
oprypin6e09d872017-08-31 03:21:39 -0700607 new InputAudioFile(FLAG_replacement_audio_file)),
henrik.lundine8a77e32016-06-22 06:34:03 -0700608 48000, false));
609 NetEqTest::ExternalDecoderInfo ext_dec_info = {
610 replacement_decoder.get(), NetEqDecoder::kDecoderArbitrary,
611 "replacement codec"};
612 ext_codecs[replacement_pt] = ext_dec_info;
613 }
614
henrik.lundin02739d92017-05-04 06:09:06 -0700615 NetEqTest::Callbacks callbacks;
Henrik Lundin0bc0ccd2017-06-20 14:48:50 +0200616 std::unique_ptr<NetEqDelayAnalyzer> delay_analyzer;
oprypin6e09d872017-08-31 03:21:39 -0700617 if (FLAG_matlabplot) {
Henrik Lundin0bc0ccd2017-06-20 14:48:50 +0200618 delay_analyzer.reset(new NetEqDelayAnalyzer);
619 }
620
621 SsrcSwitchDetector ssrc_switch_detector(delay_analyzer.get());
622 callbacks.post_insert_packet = &ssrc_switch_detector;
Henrik Lundina2af0002017-06-20 16:54:39 +0200623 StatsGetter stats_getter(delay_analyzer.get());
624 callbacks.get_audio_callback = &stats_getter;
henrik.lundin@webrtc.org03499a02014-11-24 14:50:53 +0000625 NetEq::Config config;
Henrik Lundin0bc0ccd2017-06-20 14:48:50 +0200626 config.sample_rate_hz = *sample_rate_hz;
henrik.lundine8a77e32016-06-22 06:34:03 -0700627 NetEqTest test(config, codecs, ext_codecs, std::move(input),
henrik.lundin02739d92017-05-04 06:09:06 -0700628 std::move(output), callbacks);
henrik.lundin@webrtc.org03499a02014-11-24 14:50:53 +0000629
henrik.lundine8a77e32016-06-22 06:34:03 -0700630 int64_t test_duration_ms = test.Run();
henrik.lundin@webrtc.org03499a02014-11-24 14:50:53 +0000631
oprypin6e09d872017-08-31 03:21:39 -0700632 if (FLAG_matlabplot) {
henrik.lundinf09c9042017-08-29 09:14:08 -0700633 auto matlab_script_name = output_file_name;
634 std::replace(matlab_script_name.begin(), matlab_script_name.end(), '.',
635 '_');
636 std::cout << "Creating Matlab plot script " << matlab_script_name + ".m"
Henrik Lundin0bc0ccd2017-06-20 14:48:50 +0200637 << std::endl;
henrik.lundinf09c9042017-08-29 09:14:08 -0700638 delay_analyzer->CreateMatlabScript(matlab_script_name + ".m");
Henrik Lundin0bc0ccd2017-06-20 14:48:50 +0200639 }
640
henrik.lundine8a77e32016-06-22 06:34:03 -0700641 printf("Simulation statistics:\n");
642 printf(" output duration: %" PRId64 " ms\n", test_duration_ms);
Henrik Lundina2af0002017-06-20 16:54:39 +0200643 auto stats = stats_getter.AverageStats();
644 printf(" packet_loss_rate: %f %%\n", 100.0 * stats.packet_loss_rate);
Henrik Lundina2af0002017-06-20 16:54:39 +0200645 printf(" expand_rate: %f %%\n", 100.0 * stats.expand_rate);
646 printf(" speech_expand_rate: %f %%\n", 100.0 * stats.speech_expand_rate);
647 printf(" preemptive_rate: %f %%\n", 100.0 * stats.preemptive_rate);
648 printf(" accelerate_rate: %f %%\n", 100.0 * stats.accelerate_rate);
henrik.lundine8a77e32016-06-22 06:34:03 -0700649 printf(" secondary_decoded_rate: %f %%\n",
Henrik Lundina2af0002017-06-20 16:54:39 +0200650 100.0 * stats.secondary_decoded_rate);
minyue-webrtc0c3ca752017-08-23 15:59:38 +0200651 printf(" secondary_discarded_rate: %f %%\n",
652 100.0 * stats.secondary_discarded_rate);
Henrik Lundina2af0002017-06-20 16:54:39 +0200653 printf(" clockdrift_ppm: %f ppm\n", stats.clockdrift_ppm);
654 printf(" mean_waiting_time_ms: %f ms\n", stats.mean_waiting_time_ms);
655 printf(" median_waiting_time_ms: %f ms\n", stats.median_waiting_time_ms);
656 printf(" min_waiting_time_ms: %f ms\n", stats.min_waiting_time_ms);
657 printf(" max_waiting_time_ms: %f ms\n", stats.max_waiting_time_ms);
henrik.lundin@webrtc.org75642fc2014-02-05 08:49:13 +0000658
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000659 return 0;
660}
henrik.lundince5570e2016-05-24 06:14:57 -0700661
henrik.lundin303d3e12016-05-26 05:56:03 -0700662} // namespace
henrik.lundince5570e2016-05-24 06:14:57 -0700663} // namespace test
664} // namespace webrtc
henrik.lundin303d3e12016-05-26 05:56:03 -0700665
666int main(int argc, char* argv[]) {
667 webrtc::test::RunTest(argc, argv);
668}