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

Side by Side Diff: webrtc/modules/video_coding/test/vcm_payload_sink_factory.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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 assert(sinks_.empty()); 120 assert(sinks_.empty());
121 } 121 }
122 122
123 PayloadSinkInterface* VcmPayloadSinkFactory::Create( 123 PayloadSinkInterface* VcmPayloadSinkFactory::Create(
124 RtpStreamInterface* stream) { 124 RtpStreamInterface* stream) {
125 assert(stream); 125 assert(stream);
126 CriticalSectionScoped cs(crit_sect_.get()); 126 CriticalSectionScoped cs(crit_sect_.get());
127 127
128 std::unique_ptr<VideoCodingModule> vcm( 128 std::unique_ptr<VideoCodingModule> vcm(
129 VideoCodingModule::Create(clock_, null_event_factory_.get())); 129 VideoCodingModule::Create(clock_, null_event_factory_.get()));
130 if (vcm.get() == NULL) { 130 if (vcm.get() == nullptr) {
131 return NULL; 131 return nullptr;
132 } 132 }
133 133
134 const PayloadTypes& plt = stream->payload_types(); 134 const PayloadTypes& plt = stream->payload_types();
135 for (PayloadTypesIterator it = plt.begin(); it != plt.end(); ++it) { 135 for (PayloadTypesIterator it = plt.begin(); it != plt.end(); ++it) {
136 if (it->codec_type() != kVideoCodecULPFEC && 136 if (it->codec_type() != kVideoCodecULPFEC &&
137 it->codec_type() != kVideoCodecRED) { 137 it->codec_type() != kVideoCodecRED) {
138 VideoCodec codec; 138 VideoCodec codec;
139 VideoCodingModule::Codec(it->codec_type(), &codec); 139 VideoCodingModule::Codec(it->codec_type(), &codec);
140 codec.plType = it->payload_type(); 140 codec.plType = it->payload_type();
141 if (vcm->RegisterReceiveCodec(&codec, 1) < 0) { 141 if (vcm->RegisterReceiveCodec(&codec, 1) < 0) {
142 return NULL; 142 return nullptr;
143 } 143 }
144 } 144 }
145 } 145 }
146 146
147 vcm->SetChannelParameters(0, 0, rtt_ms_); 147 vcm->SetChannelParameters(0, 0, rtt_ms_);
148 vcm->SetVideoProtection(protection_method_, protection_enabled_); 148 vcm->SetVideoProtection(protection_method_, protection_enabled_);
149 vcm->SetRenderDelay(render_delay_ms_); 149 vcm->SetRenderDelay(render_delay_ms_);
150 vcm->SetMinimumPlayoutDelay(min_playout_delay_ms_); 150 vcm->SetMinimumPlayoutDelay(min_playout_delay_ms_);
151 vcm->SetNackSettings(kMaxNackListSize, kMaxPacketAgeToNack, 0); 151 vcm->SetNackSettings(kMaxNackListSize, kMaxPacketAgeToNack, 0);
152 152
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 void VcmPayloadSinkFactory::Remove(VcmPayloadSink* sink) { 194 void VcmPayloadSinkFactory::Remove(VcmPayloadSink* sink) {
195 assert(sink); 195 assert(sink);
196 CriticalSectionScoped cs(crit_sect_.get()); 196 CriticalSectionScoped cs(crit_sect_.get());
197 Sinks::iterator it = std::find(sinks_.begin(), sinks_.end(), sink); 197 Sinks::iterator it = std::find(sinks_.begin(), sinks_.end(), sink);
198 assert(it != sinks_.end()); 198 assert(it != sinks_.end());
199 sinks_.erase(it); 199 sinks_.erase(it);
200 } 200 }
201 201
202 } // namespace rtpplayer 202 } // namespace rtpplayer
203 } // namespace webrtc 203 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698