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 |
11 #include "webrtc/modules/video_coding/codecs/vp8/simulcast_rate_allocator.h" | 11 #include "webrtc/modules/video_coding/codecs/vp8/simulcast_rate_allocator.h" |
12 | 12 |
13 #include <algorithm> | 13 #include <algorithm> |
14 #include <memory> | 14 #include <memory> |
15 #include <vector> | 15 #include <vector> |
16 #include <utility> | 16 #include <utility> |
17 | 17 |
18 #include "webrtc/rtc_base/checks.h" | 18 #include "webrtc/base/checks.h" |
19 | 19 |
20 namespace webrtc { | 20 namespace webrtc { |
21 | 21 |
22 SimulcastRateAllocator::SimulcastRateAllocator( | 22 SimulcastRateAllocator::SimulcastRateAllocator( |
23 const VideoCodec& codec, | 23 const VideoCodec& codec, |
24 std::unique_ptr<TemporalLayersFactory> tl_factory) | 24 std::unique_ptr<TemporalLayersFactory> tl_factory) |
25 : codec_(codec), tl_factory_(std::move(tl_factory)) { | 25 : codec_(codec), tl_factory_(std::move(tl_factory)) { |
26 if (tl_factory_.get()) | 26 if (tl_factory_.get()) |
27 tl_factory_->SetListener(this); | 27 tl_factory_->SetListener(this); |
28 } | 28 } |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 BitrateAllocation allocation = | 154 BitrateAllocation allocation = |
155 temp_allocator.GetAllocation(codec_.maxBitrate * 1000, framerate); | 155 temp_allocator.GetAllocation(codec_.maxBitrate * 1000, framerate); |
156 return allocation.get_sum_bps(); | 156 return allocation.get_sum_bps(); |
157 } | 157 } |
158 | 158 |
159 const VideoCodec& webrtc::SimulcastRateAllocator::GetCodec() const { | 159 const VideoCodec& webrtc::SimulcastRateAllocator::GetCodec() const { |
160 return codec_; | 160 return codec_; |
161 } | 161 } |
162 | 162 |
163 } // namespace webrtc | 163 } // namespace webrtc |
OLD | NEW |