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