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

Side by Side Diff: webrtc/tools/converter/rgba_to_i420_converter.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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 parser.SetFlag("delete_frames", "false"); 58 parser.SetFlag("delete_frames", "false");
59 parser.SetFlag("help", "false"); 59 parser.SetFlag("help", "false");
60 60
61 parser.ProcessFlags(); 61 parser.ProcessFlags();
62 if (parser.GetFlag("help") == "true") { 62 if (parser.GetFlag("help") == "true") {
63 parser.PrintUsageMessage(); 63 parser.PrintUsageMessage();
64 exit(EXIT_SUCCESS); 64 exit(EXIT_SUCCESS);
65 } 65 }
66 parser.PrintEnteredFlags(); 66 parser.PrintEnteredFlags();
67 67
68 int width = strtol((parser.GetFlag("width")).c_str(), NULL, 10); 68 int width = strtol((parser.GetFlag("width")).c_str(), nullptr, 10);
69 int height = strtol((parser.GetFlag("height")).c_str(), NULL, 10); 69 int height = strtol((parser.GetFlag("height")).c_str(), nullptr, 10);
70 70
71 if (width <= 0 || height <= 0) { 71 if (width <= 0 || height <= 0) {
72 fprintf(stderr, "Error: width or height cannot be <= 0!\n"); 72 fprintf(stderr, "Error: width or height cannot be <= 0!\n");
73 return -1; 73 return -1;
74 } 74 }
75 75
76 bool del_frames = (parser.GetFlag("delete_frames") == "true") ? true : false; 76 bool del_frames = (parser.GetFlag("delete_frames") == "true") ? true : false;
77 77
78 webrtc::test::Converter converter(width, height); 78 webrtc::test::Converter converter(width, height);
79 bool success = converter.ConvertRGBAToI420Video(parser.GetFlag("frames_dir"), 79 bool success = converter.ConvertRGBAToI420Video(parser.GetFlag("frames_dir"),
80 parser.GetFlag("output_file"), 80 parser.GetFlag("output_file"),
81 del_frames); 81 del_frames);
82 82
83 if (success) { 83 if (success) {
84 fprintf(stdout, "Successful conversion of RGBA frames to YUV video!\n"); 84 fprintf(stdout, "Successful conversion of RGBA frames to YUV video!\n");
85 return 0; 85 return 0;
86 } else { 86 } else {
87 fprintf(stdout, "Unsuccessful conversion of RGBA frames to YUV video!\n"); 87 fprintf(stdout, "Unsuccessful conversion of RGBA frames to YUV video!\n");
88 return -1; 88 return -1;
89 } 89 }
90 } 90 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698