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

Side by Side Diff: webrtc/modules/video_coding/test/video_rtp_play.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 output_file = webrtc::test::OutputPath() + "RtpPlay_decoded.yuv"; 50 output_file = webrtc::test::OutputPath() + "RtpPlay_decoded.yuv";
51 51
52 webrtc::SimulatedClock clock(0); 52 webrtc::SimulatedClock clock(0);
53 webrtc::rtpplayer::VcmPayloadSinkFactory factory( 53 webrtc::rtpplayer::VcmPayloadSinkFactory factory(
54 output_file, &clock, kConfigProtectionEnabled, kConfigProtectionMethod, 54 output_file, &clock, kConfigProtectionEnabled, kConfigProtectionMethod,
55 kConfigRttMs, kConfigRenderDelayMs, kConfigMinPlayoutDelayMs); 55 kConfigRttMs, kConfigRenderDelayMs, kConfigMinPlayoutDelayMs);
56 std::unique_ptr<webrtc::rtpplayer::RtpPlayerInterface> rtp_player( 56 std::unique_ptr<webrtc::rtpplayer::RtpPlayerInterface> rtp_player(
57 webrtc::rtpplayer::Create(args.inputFile, &factory, &clock, payload_types, 57 webrtc::rtpplayer::Create(args.inputFile, &factory, &clock, payload_types,
58 kConfigLossRate, kConfigRttMs, 58 kConfigLossRate, kConfigRttMs,
59 kConfigReordering)); 59 kConfigReordering));
60 if (rtp_player.get() == NULL) { 60 if (rtp_player.get() == nullptr) {
61 return -1; 61 return -1;
62 } 62 }
63 63
64 int ret = 0; 64 int ret = 0;
65 while ((ret = rtp_player->NextPacket(clock.TimeInMilliseconds())) == 0) { 65 while ((ret = rtp_player->NextPacket(clock.TimeInMilliseconds())) == 0) {
66 ret = factory.DecodeAndProcessAll(true); 66 ret = factory.DecodeAndProcessAll(true);
67 if (ret < 0 || (kConfigMaxRuntimeMs > -1 && 67 if (ret < 0 || (kConfigMaxRuntimeMs > -1 &&
68 clock.TimeInMilliseconds() >= kConfigMaxRuntimeMs)) { 68 clock.TimeInMilliseconds() >= kConfigMaxRuntimeMs)) {
69 break; 69 break;
70 } 70 }
(...skipping 10 matching lines...) Expand all
81 printf("Failed\n"); 81 printf("Failed\n");
82 return -1; 82 return -1;
83 case 0: 83 case 0:
84 printf("Timeout\n"); 84 printf("Timeout\n");
85 return -1; 85 return -1;
86 } 86 }
87 87
88 webrtc::Trace::ReturnTrace(); 88 webrtc::Trace::ReturnTrace();
89 return 0; 89 return 0;
90 } 90 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698