| OLD | NEW |
| 1 /* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 1 /* Copyright (c) 2011 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 * This file defines the interface for doing temporal layers with VP8. | 10 * This file defines the interface for doing temporal layers with VP8. |
| 11 */ | 11 */ |
| 12 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_TEMPORAL_LAYERS_H_ | 12 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_TEMPORAL_LAYERS_H_ |
| 13 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_TEMPORAL_LAYERS_H_ | 13 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_TEMPORAL_LAYERS_H_ |
| 14 | 14 |
| 15 #include "vpx/vpx_encoder.h" | 15 #include "vpx/vpx_encoder.h" |
| 16 | 16 |
| 17 #include "webrtc/common.h" | |
| 18 #include "webrtc/common_video/include/video_image.h" | 17 #include "webrtc/common_video/include/video_image.h" |
| 19 #include "webrtc/typedefs.h" | 18 #include "webrtc/typedefs.h" |
| 20 | 19 |
| 21 namespace webrtc { | 20 namespace webrtc { |
| 22 | 21 |
| 23 struct CodecSpecificInfoVP8; | 22 struct CodecSpecificInfoVP8; |
| 24 | 23 |
| 25 class TemporalLayers { | 24 class TemporalLayers { |
| 26 public: | 25 public: |
| 27 // Factory for TemporalLayer strategy. Default behaviour is a fixed pattern | 26 // Factory for TemporalLayer strategy. Default behaviour is a fixed pattern |
| 28 // of temporal layers. See default_temporal_layers.cc | 27 // of temporal layers. See default_temporal_layers.cc |
| 29 struct Factory { | 28 struct Factory { |
| 30 Factory() {} | 29 Factory() {} |
| 31 virtual ~Factory() {} | 30 virtual ~Factory() {} |
| 32 virtual TemporalLayers* Create(int temporal_layers, | 31 virtual TemporalLayers* Create(int temporal_layers, |
| 33 uint8_t initial_tl0_pic_idx) const; | 32 uint8_t initial_tl0_pic_idx) const; |
| 34 static const ConfigOptionID identifier = | |
| 35 ConfigOptionID::kTemporalLayersFactory; | |
| 36 }; | 33 }; |
| 37 | 34 |
| 38 virtual ~TemporalLayers() {} | 35 virtual ~TemporalLayers() {} |
| 39 | 36 |
| 40 // Returns the recommended VP8 encode flags needed. May refresh the decoder | 37 // Returns the recommended VP8 encode flags needed. May refresh the decoder |
| 41 // and/or update the reference buffers. | 38 // and/or update the reference buffers. |
| 42 virtual int EncodeFlags(uint32_t timestamp) = 0; | 39 virtual int EncodeFlags(uint32_t timestamp) = 0; |
| 43 | 40 |
| 44 virtual bool ConfigureBitrates(int bitrate_kbit, | 41 virtual bool ConfigureBitrates(int bitrate_kbit, |
| 45 int max_bitrate_kbit, | 42 int max_bitrate_kbit, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 61 // layers based on input framerate so that the base layer has an acceptable | 58 // layers based on input framerate so that the base layer has an acceptable |
| 62 // framerate. See realtime_temporal_layers.cc | 59 // framerate. See realtime_temporal_layers.cc |
| 63 struct RealTimeTemporalLayersFactory : TemporalLayers::Factory { | 60 struct RealTimeTemporalLayersFactory : TemporalLayers::Factory { |
| 64 virtual ~RealTimeTemporalLayersFactory() {} | 61 virtual ~RealTimeTemporalLayersFactory() {} |
| 65 virtual TemporalLayers* Create(int num_temporal_layers, | 62 virtual TemporalLayers* Create(int num_temporal_layers, |
| 66 uint8_t initial_tl0_pic_idx) const; | 63 uint8_t initial_tl0_pic_idx) const; |
| 67 }; | 64 }; |
| 68 | 65 |
| 69 } // namespace webrtc | 66 } // namespace webrtc |
| 70 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_TEMPORAL_LAYERS_H_ | 67 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_TEMPORAL_LAYERS_H_ |
| OLD | NEW |