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 <stdlib.h> | 10 #include <stdlib.h> |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 212 |
213 return true; | 213 return true; |
214 } | 214 } |
215 | 215 |
216 int EncodeFlags(uint32_t timestamp) override { | 216 int EncodeFlags(uint32_t timestamp) override { |
217 frame_counter_++; | 217 frame_counter_++; |
218 return CurrentEncodeFlags(); | 218 return CurrentEncodeFlags(); |
219 } | 219 } |
220 | 220 |
221 int CurrentEncodeFlags() const { | 221 int CurrentEncodeFlags() const { |
222 assert(encode_flags_length_ > 0 && encode_flags_ != NULL); | 222 assert(encode_flags_length_ > 0 && encode_flags_ != nullptr); |
223 int index = frame_counter_ % encode_flags_length_; | 223 int index = frame_counter_ % encode_flags_length_; |
224 assert(index >= 0 && index < encode_flags_length_); | 224 assert(index >= 0 && index < encode_flags_length_); |
225 return encode_flags_[index]; | 225 return encode_flags_[index]; |
226 } | 226 } |
227 | 227 |
228 int CurrentLayerId() const override { | 228 int CurrentLayerId() const override { |
229 assert(layer_ids_length_ > 0 && layer_ids_ != NULL); | 229 assert(layer_ids_length_ > 0 && layer_ids_ != nullptr); |
230 int index = frame_counter_ % layer_ids_length_; | 230 int index = frame_counter_ % layer_ids_length_; |
231 assert(index >= 0 && index < layer_ids_length_); | 231 assert(index >= 0 && index < layer_ids_length_); |
232 return layer_ids_[index]; | 232 return layer_ids_[index]; |
233 } | 233 } |
234 | 234 |
235 void PopulateCodecSpecific(bool base_layer_sync, | 235 void PopulateCodecSpecific(bool base_layer_sync, |
236 CodecSpecificInfoVP8* vp8_info, | 236 CodecSpecificInfoVP8* vp8_info, |
237 uint32_t timestamp) override { | 237 uint32_t timestamp) override { |
238 assert(temporal_layers_ > 0); | 238 assert(temporal_layers_ > 0); |
239 | 239 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 int simulcast_id, | 302 int simulcast_id, |
303 int max_temporal_layers, | 303 int max_temporal_layers, |
304 uint8_t initial_tl0_pic_idx) const { | 304 uint8_t initial_tl0_pic_idx) const { |
305 TemporalLayers* tl = | 305 TemporalLayers* tl = |
306 new RealTimeTemporalLayers(max_temporal_layers, initial_tl0_pic_idx); | 306 new RealTimeTemporalLayers(max_temporal_layers, initial_tl0_pic_idx); |
307 if (listener_) | 307 if (listener_) |
308 listener_->OnTemporalLayersCreated(simulcast_id, tl); | 308 listener_->OnTemporalLayersCreated(simulcast_id, tl); |
309 return tl; | 309 return tl; |
310 } | 310 } |
311 } // namespace webrtc | 311 } // namespace webrtc |
OLD | NEW |