#include <stdio.h>
#include <memory>
#include "gflags/gflags.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h"
#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
#include "webrtc/modules/audio_coding/test/Channel.h"
#include "webrtc/modules/audio_coding/test/PCMFile.h"
#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/system_wrappers/include/clock.h"
#include "webrtc/test/gtest.h"
#include "webrtc/test/testsupport/fileutils.h"
|
| DEFINE_string (codec, "opus", "Codec Name") |
|
| DEFINE_int32 (codec_sample_rate_hz, 48000, "Sampling rate in Hertz.") |
|
| DEFINE_int32 (codec_channels, 1, "Number of channels of the codec.") |
|
| DEFINE_string (input, "", "Input PCM file at 16 kHz.") |
|
| DEFINE_bool (input_stereo, false, "Input is stereo.") |
|
| DEFINE_int32 (input_fs_hz, 32000, "Input sample rate Hz.") |
|
| DEFINE_string (output, "insert_rtp_with_timing_out.pcm", "OutputFile") |
|
| DEFINE_int32 (output_fs_hz, 32000, "Output sample rate Hz") |
|
| DEFINE_string (seq_num, "seq_num", "Sequence number file.") |
|
| DEFINE_string (send_ts, "send_timestamp", "Send timestamp file.") |
|
| DEFINE_string (receive_ts, "last_rec_timestamp", "Receive timestamp file") |
|
| DEFINE_string (delay, "", "Log for delay.") |
|
| DEFINE_bool (verbose, false, "Verbosity.") |
|
| DEFINE_double (loss_rate, 0, "Rate of packet loss < 1") |
|
int | main (int argc, char *argv[]) |
|
◆ DEFINE_bool() [1/2]
DEFINE_bool |
( |
input_stereo |
, |
|
|
false |
, |
|
|
"Input is stereo." |
|
|
) |
| |
◆ DEFINE_bool() [2/2]
◆ DEFINE_double()
DEFINE_double |
( |
loss_rate |
, |
|
|
0 |
|
|
) |
| |
◆ DEFINE_int32() [1/4]
DEFINE_int32 |
( |
codec_sample_rate_hz |
, |
|
|
48000 |
, |
|
|
"Sampling rate in Hertz." |
|
|
) |
| |
◆ DEFINE_int32() [2/4]
DEFINE_int32 |
( |
codec_channels |
, |
|
|
1 |
, |
|
|
"Number of channels of the codec." |
|
|
) |
| |
◆ DEFINE_int32() [3/4]
DEFINE_int32 |
( |
input_fs_hz |
, |
|
|
32000 |
, |
|
|
"Input sample rate Hz." |
|
|
) |
| |
◆ DEFINE_int32() [4/4]
DEFINE_int32 |
( |
output_fs_hz |
, |
|
|
32000 |
, |
|
|
"Output sample rate Hz" |
|
|
) |
| |
◆ DEFINE_string() [1/7]
DEFINE_string |
( |
codec |
, |
|
|
"opus" |
, |
|
|
"Codec Name" |
|
|
) |
| |
◆ DEFINE_string() [2/7]
DEFINE_string |
( |
input |
, |
|
|
"" |
, |
|
|
"Input PCM file at 16 kHz." |
|
|
) |
| |
◆ DEFINE_string() [3/7]
DEFINE_string |
( |
output |
, |
|
|
"insert_rtp_with_timing_out.pcm" |
, |
|
|
"OutputFile" |
|
|
) |
| |
◆ DEFINE_string() [4/7]
DEFINE_string |
( |
seq_num |
, |
|
|
"seq_num" |
, |
|
|
"Sequence number file." |
|
|
) |
| |
◆ DEFINE_string() [5/7]
DEFINE_string |
( |
send_ts |
, |
|
|
"send_timestamp" |
, |
|
|
"Send timestamp file." |
|
|
) |
| |
◆ DEFINE_string() [6/7]
DEFINE_string |
( |
receive_ts |
, |
|
|
"last_rec_timestamp" |
, |
|
|
"Receive timestamp file" |
|
|
) |
| |
◆ DEFINE_string() [7/7]
DEFINE_string |
( |
delay |
, |
|
|
"" |
, |
|
|
"Log for delay." |
|
|
) |
| |
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
◆ kAudioPlayedOut
const int32_t kAudioPlayedOut = 0x00000001 |
◆ kPacketPushedIn
const int32_t kPacketPushedIn = 0x00000001 << 1 |
◆ kPlayoutPeriodMs
const int kPlayoutPeriodMs = 10 |