Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(733)

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc

Issue 2086633002: Revert of Remove audio/video distinction for probe packets. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 if (header.extension.hasTransmissionTimeOffset) 76 if (header.extension.hasTransmissionTimeOffset)
77 ++ts_offset_count; 77 ++ts_offset_count;
78 size_t packet_length = packet.length; 78 size_t packet_length = packet.length;
79 // Some RTP dumps only include the header, in which case packet.length 79 // Some RTP dumps only include the header, in which case packet.length
80 // is equal to the header length. In those cases packet.original_length 80 // is equal to the header length. In those cases packet.original_length
81 // usually contains the original packet length. 81 // usually contains the original packet length.
82 if (packet.original_length > 0) { 82 if (packet.original_length > 0) {
83 packet_length = packet.original_length; 83 packet_length = packet.original_length;
84 } 84 }
85 rbe->IncomingPacket(clock.TimeInMilliseconds(), 85 rbe->IncomingPacket(clock.TimeInMilliseconds(),
86 packet_length - header.headerLength, header); 86 packet_length - header.headerLength, header, true);
87 ++packet_counter; 87 ++packet_counter;
88 } 88 }
89 if (!rtp_reader->NextPacket(&packet)) { 89 if (!rtp_reader->NextPacket(&packet)) {
90 break; 90 break;
91 } 91 }
92 packet.time_ms = packet.time_ms - first_rtp_time_ms; 92 packet.time_ms = packet.time_ms - first_rtp_time_ms;
93 next_rtp_time_ms = packet.time_ms; 93 next_rtp_time_ms = packet.time_ms;
94 } 94 }
95 int64_t time_until_process_ms = rbe->TimeUntilNextProcess(); 95 int64_t time_until_process_ms = rbe->TimeUntilNextProcess();
96 if (time_until_process_ms <= 0) { 96 if (time_until_process_ms <= 0) {
97 rbe->Process(); 97 rbe->Process();
98 } 98 }
99 int64_t time_until_next_event = 99 int64_t time_until_next_event =
100 std::min(rbe->TimeUntilNextProcess(), 100 std::min(rbe->TimeUntilNextProcess(),
101 next_rtp_time_ms - clock.TimeInMilliseconds()); 101 next_rtp_time_ms - clock.TimeInMilliseconds());
102 clock.AdvanceTimeMilliseconds(std::max<int64_t>(time_until_next_event, 0)); 102 clock.AdvanceTimeMilliseconds(std::max<int64_t>(time_until_next_event, 0));
103 } 103 }
104 printf("Parsed %d packets\nTime passed: %" PRId64 " ms\n", packet_counter, 104 printf("Parsed %d packets\nTime passed: %" PRId64 " ms\n", packet_counter,
105 clock.TimeInMilliseconds()); 105 clock.TimeInMilliseconds());
106 printf("Estimator used: %s\n", estimator_used.c_str()); 106 printf("Estimator used: %s\n", estimator_used.c_str());
107 printf("Packets with absolute send time: %d\n", 107 printf("Packets with absolute send time: %d\n",
108 abs_send_time_count); 108 abs_send_time_count);
109 printf("Packets with timestamp offset: %d\n", 109 printf("Packets with timestamp offset: %d\n",
110 ts_offset_count); 110 ts_offset_count);
111 printf("Packets with no extension: %d\n", 111 printf("Packets with no extension: %d\n",
112 packet_counter - ts_offset_count - abs_send_time_count); 112 packet_counter - ts_offset_count - abs_send_time_count);
113 return 0; 113 return 0;
114 } 114 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698