OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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/test/encoder_settings.h" | 10 #include "webrtc/test/encoder_settings.h" |
11 | 11 |
12 #include <algorithm> | 12 #include <algorithm> |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h" | 15 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h" |
16 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" | 16 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" |
17 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h" | 17 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h" |
18 #include "webrtc/test/fake_decoder.h" | 18 #include "webrtc/test/fake_decoder.h" |
19 | 19 |
20 namespace webrtc { | 20 namespace webrtc { |
21 namespace test { | 21 namespace test { |
22 | 22 |
23 const size_t DefaultVideoStreamFactory::kMaxNumberOfStreams; | 23 const size_t DefaultVideoStreamFactory::kMaxNumberOfStreams; |
24 const int DefaultVideoStreamFactory::kMaxBitratePerStream[] = {150000, 450000, | 24 const int DefaultVideoStreamFactory::kMaxBitratePerStream[] = {150000, 450000, |
25 1500000}; | 25 1500000}; |
26 const int DefaultVideoStreamFactory::kDefaultMinBitratePerStream[] = { | 26 const int DefaultVideoStreamFactory::kDefaultMinBitratePerStream[] = { |
27 50000, 200000, 700000}; | 27 30000, 200000, 700000}; |
28 | 28 |
29 // static | 29 // static |
30 std::vector<VideoStream> CreateVideoStreams( | 30 std::vector<VideoStream> CreateVideoStreams( |
31 int width, | 31 int width, |
32 int height, | 32 int height, |
33 const webrtc::VideoEncoderConfig& encoder_config) { | 33 const webrtc::VideoEncoderConfig& encoder_config) { |
34 RTC_DCHECK(encoder_config.number_of_streams <= | 34 RTC_DCHECK(encoder_config.number_of_streams <= |
35 DefaultVideoStreamFactory::kMaxNumberOfStreams); | 35 DefaultVideoStreamFactory::kMaxNumberOfStreams); |
36 | 36 |
37 std::vector<VideoStream> stream_settings(encoder_config.number_of_streams); | 37 std::vector<VideoStream> stream_settings(encoder_config.number_of_streams); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 decoder.decoder = VP8Decoder::Create(); | 92 decoder.decoder = VP8Decoder::Create(); |
93 } else if (encoder_settings.payload_name == "VP9") { | 93 } else if (encoder_settings.payload_name == "VP9") { |
94 decoder.decoder = VP9Decoder::Create(); | 94 decoder.decoder = VP9Decoder::Create(); |
95 } else { | 95 } else { |
96 decoder.decoder = new FakeDecoder(); | 96 decoder.decoder = new FakeDecoder(); |
97 } | 97 } |
98 return decoder; | 98 return decoder; |
99 } | 99 } |
100 } // namespace test | 100 } // namespace test |
101 } // namespace webrtc | 101 } // namespace webrtc |
OLD | NEW |