OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |