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

Side by Side Diff: webrtc/video/replay.cc

Issue 1333483002: Wire up PacketTime to ReceiveStreams. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « webrtc/video/rampup_tests.cc ('k') | webrtc/video/video_receive_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 278
279 uint32_t last_time_ms = 0; 279 uint32_t last_time_ms = 0;
280 int num_packets = 0; 280 int num_packets = 0;
281 std::map<uint32_t, int> unknown_packets; 281 std::map<uint32_t, int> unknown_packets;
282 while (true) { 282 while (true) {
283 test::RtpPacket packet; 283 test::RtpPacket packet;
284 if (!rtp_reader->NextPacket(&packet)) 284 if (!rtp_reader->NextPacket(&packet))
285 break; 285 break;
286 ++num_packets; 286 ++num_packets;
287 switch (call->Receiver()->DeliverPacket(webrtc::MediaType::ANY, packet.data, 287 switch (call->Receiver()->DeliverPacket(webrtc::MediaType::ANY, packet.data,
288 packet.length)) { 288 packet.length, PacketTime())) {
289 case PacketReceiver::DELIVERY_OK: 289 case PacketReceiver::DELIVERY_OK:
290 break; 290 break;
291 case PacketReceiver::DELIVERY_UNKNOWN_SSRC: { 291 case PacketReceiver::DELIVERY_UNKNOWN_SSRC: {
292 RTPHeader header; 292 RTPHeader header;
293 rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create()); 293 rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
294 parser->Parse(packet.data, packet.length, &header); 294 parser->Parse(packet.data, packet.length, &header);
295 if (unknown_packets[header.ssrc] == 0) 295 if (unknown_packets[header.ssrc] == 0)
296 fprintf(stderr, "Unknown SSRC: %u!\n", header.ssrc); 296 fprintf(stderr, "Unknown SSRC: %u!\n", header.ssrc);
297 ++unknown_packets[header.ssrc]; 297 ++unknown_packets[header.ssrc];
298 break; 298 break;
(...skipping 22 matching lines...) Expand all
321 } 321 }
322 } // namespace webrtc 322 } // namespace webrtc
323 323
324 int main(int argc, char* argv[]) { 324 int main(int argc, char* argv[]) {
325 ::testing::InitGoogleTest(&argc, argv); 325 ::testing::InitGoogleTest(&argc, argv);
326 google::ParseCommandLineFlags(&argc, &argv, true); 326 google::ParseCommandLineFlags(&argc, &argv, true);
327 327
328 webrtc::test::RunTest(webrtc::RtpReplay); 328 webrtc::test::RunTest(webrtc::RtpReplay);
329 return 0; 329 return 0;
330 } 330 }
OLDNEW
« no previous file with comments | « webrtc/video/rampup_tests.cc ('k') | webrtc/video/video_receive_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698