| Index: webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc
|
| diff --git a/webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc b/webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc
|
| index 965586757de6e956fcd8bb2ea5f319f16856c2e7..19e4a07b4d367e6cf0af74821e7d48c96de91660 100644
|
| --- a/webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc
|
| +++ b/webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc
|
| @@ -38,15 +38,6 @@ class Observer : public webrtc::RemoteBitrateObserver {
|
| };
|
|
|
| int main(int argc, char** argv) {
|
| - if (argc < 4) {
|
| - printf("Usage: bwe_rtp_play <extension type> <extension id> "
|
| - "<input_file.rtp>\n");
|
| - printf("<extension type> can either be:\n"
|
| - " abs for absolute send time or\n"
|
| - " tsoffset for timestamp offset.\n"
|
| - "<extension id> is the id associated with the extension.\n");
|
| - return -1;
|
| - }
|
| webrtc::test::RtpFileReader* reader;
|
| webrtc::RemoteBitrateEstimator* estimator;
|
| webrtc::RtpHeaderParser* parser;
|
| @@ -76,22 +67,24 @@ int main(int argc, char** argv) {
|
| packet.time_ms = packet.time_ms - first_rtp_time_ms;
|
| while (true) {
|
| if (next_rtp_time_ms <= clock.TimeInMilliseconds()) {
|
| - webrtc::RTPHeader header;
|
| - parser->Parse(packet.data, packet.length, &header);
|
| - if (header.extension.hasAbsoluteSendTime)
|
| - ++abs_send_time_count;
|
| - if (header.extension.hasTransmissionTimeOffset)
|
| - ++ts_offset_count;
|
| - size_t packet_length = packet.length;
|
| - // Some RTP dumps only include the header, in which case packet.length
|
| - // is equal to the header length. In those cases packet.original_length
|
| - // usually contains the original packet length.
|
| - if (packet.original_length > 0) {
|
| - packet_length = packet.original_length;
|
| + if (!parser->IsRtcp(packet.data, packet.length)) {
|
| + webrtc::RTPHeader header;
|
| + parser->Parse(packet.data, packet.length, &header);
|
| + if (header.extension.hasAbsoluteSendTime)
|
| + ++abs_send_time_count;
|
| + if (header.extension.hasTransmissionTimeOffset)
|
| + ++ts_offset_count;
|
| + size_t packet_length = packet.length;
|
| + // Some RTP dumps only include the header, in which case packet.length
|
| + // is equal to the header length. In those cases packet.original_length
|
| + // usually contains the original packet length.
|
| + if (packet.original_length > 0) {
|
| + packet_length = packet.original_length;
|
| + }
|
| + rbe->IncomingPacket(clock.TimeInMilliseconds(),
|
| + packet_length - header.headerLength, header, true);
|
| + ++packet_counter;
|
| }
|
| - rbe->IncomingPacket(clock.TimeInMilliseconds(),
|
| - packet_length - header.headerLength, header, true);
|
| - ++packet_counter;
|
| if (!rtp_reader->NextPacket(&packet)) {
|
| break;
|
| }
|
|
|