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 "webrtc/video/video_quality_test.h" | 10 #include "webrtc/video/video_quality_test.h" |
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 void VideoQualityTest::SetupVideo(Transport* send_transport, | 1002 void VideoQualityTest::SetupVideo(Transport* send_transport, |
1003 Transport* recv_transport) { | 1003 Transport* recv_transport) { |
1004 if (params_.logs) | 1004 if (params_.logs) |
1005 trace_to_stderr_.reset(new test::TraceToStderr); | 1005 trace_to_stderr_.reset(new test::TraceToStderr); |
1006 | 1006 |
1007 size_t num_streams = params_.ss.streams.size(); | 1007 size_t num_streams = params_.ss.streams.size(); |
1008 CreateSendConfig(num_streams, 0, 0, send_transport); | 1008 CreateSendConfig(num_streams, 0, 0, send_transport); |
1009 | 1009 |
1010 int payload_type; | 1010 int payload_type; |
1011 if (params_.video.codec == "H264") { | 1011 if (params_.video.codec == "H264") { |
1012 video_encoder_.reset(H264Encoder::Create()); | 1012 video_encoder_.reset(H264Encoder::Create(cricket::VideoCodec("H264"))); |
1013 payload_type = kPayloadTypeH264; | 1013 payload_type = kPayloadTypeH264; |
1014 } else if (params_.video.codec == "VP8") { | 1014 } else if (params_.video.codec == "VP8") { |
1015 video_encoder_.reset(VP8Encoder::Create()); | 1015 video_encoder_.reset(VP8Encoder::Create()); |
1016 payload_type = kPayloadTypeVP8; | 1016 payload_type = kPayloadTypeVP8; |
1017 } else if (params_.video.codec == "VP9") { | 1017 } else if (params_.video.codec == "VP9") { |
1018 video_encoder_.reset(VP9Encoder::Create()); | 1018 video_encoder_.reset(VP9Encoder::Create()); |
1019 payload_type = kPayloadTypeVP9; | 1019 payload_type = kPayloadTypeVP9; |
1020 } else { | 1020 } else { |
1021 RTC_NOTREACHED() << "Codec not supported!"; | 1021 RTC_NOTREACHED() << "Codec not supported!"; |
1022 return; | 1022 return; |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1485 std::ostringstream str; | 1485 std::ostringstream str; |
1486 str << receive_logs_++; | 1486 str << receive_logs_++; |
1487 std::string path = | 1487 std::string path = |
1488 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; | 1488 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; |
1489 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), | 1489 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), |
1490 10000000); | 1490 10000000); |
1491 } | 1491 } |
1492 } | 1492 } |
1493 | 1493 |
1494 } // namespace webrtc | 1494 } // namespace webrtc |
OLD | NEW |