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

Side by Side Diff: webrtc/video/video_quality_test.cc

Issue 1855433002: Replace NULL with nullptr in webrtc/video. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: replace x == nullptr with !x Created 4 years, 8 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
« no previous file with comments | « webrtc/video/video_decoder.cc ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 #include <stdio.h> 10 #include <stdio.h>
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 } else { 927 } else {
928 if (params_.video.clip_name.empty()) { 928 if (params_.video.clip_name.empty()) {
929 capturer_.reset(test::VideoCapturer::Create(input, params_.common.width, 929 capturer_.reset(test::VideoCapturer::Create(input, params_.common.width,
930 params_.common.height, 930 params_.common.height,
931 params_.common.fps, clock_)); 931 params_.common.fps, clock_));
932 } else { 932 } else {
933 capturer_.reset(test::FrameGeneratorCapturer::CreateFromYuvFile( 933 capturer_.reset(test::FrameGeneratorCapturer::CreateFromYuvFile(
934 input, test::ResourcePath(params_.video.clip_name, "yuv"), 934 input, test::ResourcePath(params_.video.clip_name, "yuv"),
935 params_.common.width, params_.common.height, params_.common.fps, 935 params_.common.width, params_.common.height, params_.common.fps,
936 clock_)); 936 clock_));
937 ASSERT_TRUE(capturer_.get() != nullptr) 937 ASSERT_TRUE(capturer_) << "Could not create capturer for "
938 << "Could not create capturer for " << params_.video.clip_name 938 << params_.video.clip_name
939 << ".yuv. Is this resource file present?"; 939 << ".yuv. Is this resource file present?";
940 } 940 }
941 } 941 }
942 } 942 }
943 943
944 void VideoQualityTest::RunWithAnalyzer(const Params& params) { 944 void VideoQualityTest::RunWithAnalyzer(const Params& params) {
945 params_ = params; 945 params_ = params;
946 946
947 // TODO(ivica): Merge with RunWithRenderer and use a flag / argument to 947 // TODO(ivica): Merge with RunWithRenderer and use a flag / argument to
948 // differentiate between the analyzer and the renderer case. 948 // differentiate between the analyzer and the renderer case.
949 CheckParams(); 949 CheckParams();
950 950
951 FILE* graph_data_output_file = nullptr; 951 FILE* graph_data_output_file = nullptr;
952 if (!params_.analyzer.graph_data_output_filename.empty()) { 952 if (!params_.analyzer.graph_data_output_filename.empty()) {
953 graph_data_output_file = 953 graph_data_output_file =
954 fopen(params_.analyzer.graph_data_output_filename.c_str(), "w"); 954 fopen(params_.analyzer.graph_data_output_filename.c_str(), "w");
955 RTC_CHECK(graph_data_output_file != nullptr) 955 RTC_CHECK(graph_data_output_file)
956 << "Can't open the file " << params_.analyzer.graph_data_output_filename 956 << "Can't open the file " << params_.analyzer.graph_data_output_filename
957 << "!"; 957 << "!";
958 } 958 }
959 959
960 Call::Config call_config; 960 Call::Config call_config;
961 call_config.bitrate_config = params.common.call_bitrate_config; 961 call_config.bitrate_config = params.common.call_bitrate_config;
962 CreateCalls(call_config, call_config); 962 CreateCalls(call_config, call_config);
963 963
964 test::LayerFilteringTransport send_transport( 964 test::LayerFilteringTransport send_transport(
965 params.pipe, sender_call_.get(), kPayloadTypeVP8, kPayloadTypeVP9, 965 params.pipe, sender_call_.get(), kPayloadTypeVP8, kPayloadTypeVP9,
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 video_send_stream_->Stop(); 1098 video_send_stream_->Stop();
1099 receive_stream->Stop(); 1099 receive_stream->Stop();
1100 1100
1101 call->DestroyVideoReceiveStream(receive_stream); 1101 call->DestroyVideoReceiveStream(receive_stream);
1102 call->DestroyVideoSendStream(video_send_stream_); 1102 call->DestroyVideoSendStream(video_send_stream_);
1103 1103
1104 transport.StopSending(); 1104 transport.StopSending();
1105 } 1105 }
1106 1106
1107 } // namespace webrtc 1107 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_decoder.cc ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698