OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 20 matching lines...) Expand all Loading... |
31 std::unique_ptr<VideoBitrateAllocator>* bitrate_allocator) { | 31 std::unique_ptr<VideoBitrateAllocator>* bitrate_allocator) { |
32 *codec = | 32 *codec = |
33 VideoEncoderConfigToVideoCodec(config, streams, settings.payload_name, | 33 VideoEncoderConfigToVideoCodec(config, streams, settings.payload_name, |
34 settings.payload_type, nack_enabled); | 34 settings.payload_type, nack_enabled); |
35 | 35 |
36 std::unique_ptr<TemporalLayersFactory> tl_factory; | 36 std::unique_ptr<TemporalLayersFactory> tl_factory; |
37 switch (codec->codecType) { | 37 switch (codec->codecType) { |
38 case kVideoCodecVP8: { | 38 case kVideoCodecVP8: { |
39 if (!codec->VP8()->tl_factory) { | 39 if (!codec->VP8()->tl_factory) { |
40 if (codec->mode == kScreensharing && | 40 if (codec->mode == kScreensharing && |
41 codec->numberOfSimulcastStreams == 1 && | 41 codec->numberOfSimulcastStreams >= 1 && |
42 codec->VP8()->numberOfTemporalLayers == 2) { | 42 codec->VP8()->numberOfTemporalLayers >= 1) { |
43 // Conference mode temporal layering for screen content. | 43 // Conference mode temporal layering for screen content. |
44 tl_factory.reset(new ScreenshareTemporalLayersFactory()); | 44 tl_factory.reset(new ScreenshareTemporalLayersFactory()); |
45 } else { | 45 } else { |
46 // Standard video temporal layers. | 46 // Standard video temporal layers. |
47 tl_factory.reset(new TemporalLayersFactory()); | 47 tl_factory.reset(new TemporalLayersFactory()); |
48 } | 48 } |
49 codec->VP8()->tl_factory = tl_factory.get(); | 49 codec->VP8()->tl_factory = tl_factory.get(); |
50 } | 50 } |
51 break; | 51 break; |
52 } | 52 } |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 } | 216 } |
217 if (video_codec.maxBitrate < kEncoderMinBitrateKbps) | 217 if (video_codec.maxBitrate < kEncoderMinBitrateKbps) |
218 video_codec.maxBitrate = kEncoderMinBitrateKbps; | 218 video_codec.maxBitrate = kEncoderMinBitrateKbps; |
219 | 219 |
220 RTC_DCHECK_GT(streams[0].max_framerate, 0); | 220 RTC_DCHECK_GT(streams[0].max_framerate, 0); |
221 video_codec.maxFramerate = streams[0].max_framerate; | 221 video_codec.maxFramerate = streams[0].max_framerate; |
222 return video_codec; | 222 return video_codec; |
223 } | 223 } |
224 | 224 |
225 } // namespace webrtc | 225 } // namespace webrtc |
OLD | NEW |