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

Side by Side Diff: webrtc/tools/frame_editing/frame_editing.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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 parser.SetFlag("help", "false"); 75 parser.SetFlag("help", "false");
76 76
77 parser.ProcessFlags(); 77 parser.ProcessFlags();
78 if (parser.GetFlag("help") == "true") { 78 if (parser.GetFlag("help") == "true") {
79 parser.PrintUsageMessage(); 79 parser.PrintUsageMessage();
80 exit(EXIT_SUCCESS); 80 exit(EXIT_SUCCESS);
81 } 81 }
82 parser.PrintEnteredFlags(); 82 parser.PrintEnteredFlags();
83 83
84 const char* in_path = parser.GetFlag("in_path").c_str(); 84 const char* in_path = parser.GetFlag("in_path").c_str();
85 int width = strtol((parser.GetFlag("width")).c_str(), NULL, 10); 85 int width = strtol((parser.GetFlag("width")).c_str(), nullptr, 10);
86 int height = strtol((parser.GetFlag("height")).c_str(), NULL, 10); 86 int height = strtol((parser.GetFlag("height")).c_str(), nullptr, 10);
87 int first_frame_to_cut = strtol((parser.GetFlag("f")).c_str(), NULL, 10); 87 int first_frame_to_cut = strtol((parser.GetFlag("f")).c_str(), nullptr, 10);
88 int interval = strtol((parser.GetFlag("interval")).c_str(), NULL, 10); 88 int interval = strtol((parser.GetFlag("interval")).c_str(), nullptr, 10);
89 int last_frame_to_cut = strtol((parser.GetFlag("l")).c_str(), NULL, 10); 89 int last_frame_to_cut = strtol((parser.GetFlag("l")).c_str(), nullptr, 10);
90 90
91 const char* out_path = parser.GetFlag("out_path").c_str(); 91 const char* out_path = parser.GetFlag("out_path").c_str();
92 92
93 if (!strcmp(in_path, "-1")) { 93 if (!strcmp(in_path, "-1")) {
94 fprintf(stderr, "You must specify a file to edit\n"); 94 fprintf(stderr, "You must specify a file to edit\n");
95 return -1; 95 return -1;
96 } 96 }
97 97
98 if (first_frame_to_cut <= 0 || last_frame_to_cut <= 0) { 98 if (first_frame_to_cut <= 0 || last_frame_to_cut <= 0) {
99 fprintf(stderr, "Error: You must specify which frames to cut!\n"); 99 fprintf(stderr, "Error: You must specify which frames to cut!\n");
100 return -2; 100 return -2;
101 } 101 }
102 102
103 if (width <= 0 || height <= 0) { 103 if (width <= 0 || height <= 0) {
104 fprintf(stderr, "Error: width or height cannot be <= 0!\n"); 104 fprintf(stderr, "Error: width or height cannot be <= 0!\n");
105 return -3; 105 return -3;
106 } 106 }
107 return webrtc::EditFrames(in_path, width, height, first_frame_to_cut, 107 return webrtc::EditFrames(in_path, width, height, first_frame_to_cut,
108 interval, last_frame_to_cut, out_path); 108 interval, last_frame_to_cut, out_path);
109 } 109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698