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

Side by Side Diff: webrtc/voice_engine/file_player.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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 246 }
247 SetAudioScaling(volumeScaling); 247 SetAudioScaling(volumeScaling);
248 } else if (_fileFormat == kFileFormatPreencodedFile) { 248 } else if (_fileFormat == kFileFormatPreencodedFile) {
249 if (_fileModule.StartPlayingAudioFile(fileName, notification, loop, 249 if (_fileModule.StartPlayingAudioFile(fileName, notification, loop,
250 _fileFormat, codecInst) == -1) { 250 _fileFormat, codecInst) == -1) {
251 LOG(LS_WARNING) << "StartPlayingFile() failed to initialize " 251 LOG(LS_WARNING) << "StartPlayingFile() failed to initialize "
252 << "pre-encoded file " << fileName; 252 << "pre-encoded file " << fileName;
253 return -1; 253 return -1;
254 } 254 }
255 } else { 255 } else {
256 CodecInst* no_inst = NULL; 256 CodecInst* no_inst = nullptr;
257 if (_fileModule.StartPlayingAudioFile(fileName, notification, loop, 257 if (_fileModule.StartPlayingAudioFile(fileName, notification, loop,
258 _fileFormat, no_inst, startPosition, 258 _fileFormat, no_inst, startPosition,
259 stopPosition) == -1) { 259 stopPosition) == -1) {
260 LOG(LS_WARNING) << "StartPlayingFile() failed to initialize file " 260 LOG(LS_WARNING) << "StartPlayingFile() failed to initialize file "
261 << fileName; 261 << fileName;
262 return -1; 262 return -1;
263 } 263 }
264 SetAudioScaling(volumeScaling); 264 SetAudioScaling(volumeScaling);
265 } 265 }
266 if (SetUpAudioDecoder() == -1) { 266 if (SetUpAudioDecoder() == -1) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } 312 }
313 313
314 } else if (_fileFormat == kFileFormatPreencodedFile) { 314 } else if (_fileFormat == kFileFormatPreencodedFile) {
315 if (_fileModule.StartPlayingAudioStream(*sourceStream, notification, 315 if (_fileModule.StartPlayingAudioStream(*sourceStream, notification,
316 _fileFormat, codecInst) == -1) { 316 _fileFormat, codecInst) == -1) {
317 LOG(LS_ERROR) << "StartPlayingFile() failed to initialize stream " 317 LOG(LS_ERROR) << "StartPlayingFile() failed to initialize stream "
318 << "playout."; 318 << "playout.";
319 return -1; 319 return -1;
320 } 320 }
321 } else { 321 } else {
322 CodecInst* no_inst = NULL; 322 CodecInst* no_inst = nullptr;
323 if (_fileModule.StartPlayingAudioStream(*sourceStream, notification, 323 if (_fileModule.StartPlayingAudioStream(*sourceStream, notification,
324 _fileFormat, no_inst, startPosition, 324 _fileFormat, no_inst, startPosition,
325 stopPosition) == -1) { 325 stopPosition) == -1) {
326 LOG(LS_ERROR) << "StartPlayingFile() failed to initialize stream " 326 LOG(LS_ERROR) << "StartPlayingFile() failed to initialize stream "
327 << "playout."; 327 << "playout.";
328 return -1; 328 return -1;
329 } 329 }
330 } 330 }
331 SetAudioScaling(volumeScaling); 331 SetAudioScaling(volumeScaling);
332 332
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 // audio formats 383 // audio formats
384 return std::unique_ptr<FilePlayer>( 384 return std::unique_ptr<FilePlayer>(
385 new FilePlayerImpl(instanceID, fileFormat)); 385 new FilePlayerImpl(instanceID, fileFormat));
386 default: 386 default:
387 assert(false); 387 assert(false);
388 return nullptr; 388 return nullptr;
389 } 389 }
390 } 390 }
391 391
392 } // namespace webrtc 392 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698