| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 video_codec.codecSpecific.VP8 = *reinterpret_cast<const VideoCodecVP8*>( | 338 video_codec.codecSpecific.VP8 = *reinterpret_cast<const VideoCodecVP8*>( |
| 339 config.encoder_specific_settings); | 339 config.encoder_specific_settings); |
| 340 } | 340 } |
| 341 video_codec.codecSpecific.VP8.numberOfTemporalLayers = | 341 video_codec.codecSpecific.VP8.numberOfTemporalLayers = |
| 342 static_cast<unsigned char>( | 342 static_cast<unsigned char>( |
| 343 streams.back().temporal_layer_thresholds_bps.size() + 1); | 343 streams.back().temporal_layer_thresholds_bps.size() + 1); |
| 344 } else if (video_codec.codecType == kVideoCodecVP9) { | 344 } else if (video_codec.codecType == kVideoCodecVP9) { |
| 345 if (config.encoder_specific_settings != nullptr) { | 345 if (config.encoder_specific_settings != nullptr) { |
| 346 video_codec.codecSpecific.VP9 = *reinterpret_cast<const VideoCodecVP9*>( | 346 video_codec.codecSpecific.VP9 = *reinterpret_cast<const VideoCodecVP9*>( |
| 347 config.encoder_specific_settings); | 347 config.encoder_specific_settings); |
| 348 if (video_codec.mode == kScreensharing) { | |
| 349 video_codec.codecSpecific.VP9.flexibleMode = true; | |
| 350 // For now VP9 screensharing use 1 temporal and 2 spatial layers. | |
| 351 RTC_DCHECK_EQ(video_codec.codecSpecific.VP9.numberOfTemporalLayers, 1); | |
| 352 RTC_DCHECK_EQ(video_codec.codecSpecific.VP9.numberOfSpatialLayers, 2); | |
| 353 } | |
| 354 } | 348 } |
| 355 video_codec.codecSpecific.VP9.numberOfTemporalLayers = | 349 video_codec.codecSpecific.VP9.numberOfTemporalLayers = |
| 356 static_cast<unsigned char>( | 350 static_cast<unsigned char>( |
| 357 streams.back().temporal_layer_thresholds_bps.size() + 1); | 351 streams.back().temporal_layer_thresholds_bps.size() + 1); |
| 358 } else if (video_codec.codecType == kVideoCodecH264) { | 352 } else if (video_codec.codecType == kVideoCodecH264) { |
| 359 if (config.encoder_specific_settings != nullptr) { | 353 if (config.encoder_specific_settings != nullptr) { |
| 360 video_codec.codecSpecific.H264 = *reinterpret_cast<const VideoCodecH264*>( | 354 video_codec.codecSpecific.H264 = *reinterpret_cast<const VideoCodecH264*>( |
| 361 config.encoder_specific_settings); | 355 config.encoder_specific_settings); |
| 362 } | 356 } |
| 363 } else { | 357 } else { |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 vie_channel_->IsSendingFecEnabled()); | 566 vie_channel_->IsSendingFecEnabled()); |
| 573 | 567 |
| 574 // Restart the media flow | 568 // Restart the media flow |
| 575 vie_encoder_->Restart(); | 569 vie_encoder_->Restart(); |
| 576 | 570 |
| 577 return true; | 571 return true; |
| 578 } | 572 } |
| 579 | 573 |
| 580 } // namespace internal | 574 } // namespace internal |
| 581 } // namespace webrtc | 575 } // namespace webrtc |
| OLD | NEW |