Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(390)

Side by Side Diff: webrtc/video/video_send_stream.cc

Issue 1328113004: Work on flexible mode and screen sharing. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Use alt_fb_idx for keyframes, fully initialize structure. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698