OLD | NEW |
1 /* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 1 /* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
2 * | 2 * |
3 * Use of this source code is governed by a BSD-style license | 3 * Use of this source code is governed by a BSD-style license |
4 * that can be found in the LICENSE file in the root of the source | 4 * that can be found in the LICENSE file in the root of the source |
5 * tree. An additional intellectual property rights grant can be found | 5 * tree. An additional intellectual property rights grant can be found |
6 * in the file PATENTS. All contributing project authors may | 6 * in the file PATENTS. All contributing project authors may |
7 * be found in the AUTHORS file in the root of the source tree. | 7 * be found in the AUTHORS file in the root of the source tree. |
8 */ | 8 */ |
9 | 9 |
10 #include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h" | 10 #include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 ScreenshareLayers::~ScreenshareLayers() { | 77 ScreenshareLayers::~ScreenshareLayers() { |
78 UpdateHistograms(); | 78 UpdateHistograms(); |
79 } | 79 } |
80 | 80 |
81 int ScreenshareLayers::CurrentLayerId() const { | 81 int ScreenshareLayers::CurrentLayerId() const { |
82 // Codec does not use temporal layers for screenshare. | 82 // Codec does not use temporal layers for screenshare. |
83 return 0; | 83 return 0; |
84 } | 84 } |
85 | 85 |
| 86 uint8_t ScreenshareLayers::Tl0PicIdx() const { |
| 87 return tl0_pic_idx_; |
| 88 } |
| 89 |
86 TemporalReferences ScreenshareLayers::UpdateLayerConfig(uint32_t timestamp) { | 90 TemporalReferences ScreenshareLayers::UpdateLayerConfig(uint32_t timestamp) { |
87 if (number_of_temporal_layers_ <= 1) { | 91 if (number_of_temporal_layers_ <= 1) { |
88 // No flags needed for 1 layer screenshare. | 92 // No flags needed for 1 layer screenshare. |
89 // TODO(pbos): Consider updating only last, and not all buffers. | 93 // TODO(pbos): Consider updating only last, and not all buffers. |
90 return TemporalReferences(kReferenceAndUpdate, kReferenceAndUpdate, | 94 return TemporalReferences(kReferenceAndUpdate, kReferenceAndUpdate, |
91 kReferenceAndUpdate); | 95 kReferenceAndUpdate); |
92 } | 96 } |
93 | 97 |
94 const int64_t now_ms = clock_->TimeInMilliseconds(); | 98 const int64_t now_ms = clock_->TimeInMilliseconds(); |
95 if (target_framerate_.value_or(0) > 0 && | 99 if (target_framerate_.value_or(0) > 0 && |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.Screenshare.Layer1.Qp", | 421 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.Screenshare.Layer1.Qp", |
418 stats_.tl1_qp_sum_ / stats_.num_tl1_frames_); | 422 stats_.tl1_qp_sum_ / stats_.num_tl1_frames_); |
419 RTC_HISTOGRAM_COUNTS_10000( | 423 RTC_HISTOGRAM_COUNTS_10000( |
420 "WebRTC.Video.Screenshare.Layer1.TargetBitrate", | 424 "WebRTC.Video.Screenshare.Layer1.TargetBitrate", |
421 stats_.tl1_target_bitrate_sum_ / stats_.num_tl1_frames_); | 425 stats_.tl1_target_bitrate_sum_ / stats_.num_tl1_frames_); |
422 } | 426 } |
423 } | 427 } |
424 } | 428 } |
425 | 429 |
426 } // namespace webrtc | 430 } // namespace webrtc |
OLD | NEW |