OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 29 matching lines...) Expand all Loading... |
40 const std::vector<FrameType>* frame_types) override; | 40 const std::vector<FrameType>* frame_types) override; |
41 | 41 |
42 int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override; | 42 int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override; |
43 | 43 |
44 int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; | 44 int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; |
45 | 45 |
46 int SetRates(uint32_t new_bitrate_kbit, uint32_t frame_rate) override; | 46 int SetRates(uint32_t new_bitrate_kbit, uint32_t frame_rate) override; |
47 | 47 |
48 void OnDroppedFrame() override {} | 48 void OnDroppedFrame() override {} |
49 | 49 |
| 50 const char* ImplementationName() const override; |
| 51 |
50 struct LayerFrameRefSettings { | 52 struct LayerFrameRefSettings { |
51 int8_t upd_buf = -1; // -1 - no update, 0..7 - update buffer 0..7 | 53 int8_t upd_buf = -1; // -1 - no update, 0..7 - update buffer 0..7 |
52 int8_t ref_buf1 = -1; // -1 - no reference, 0..7 - reference buffer 0..7 | 54 int8_t ref_buf1 = -1; // -1 - no reference, 0..7 - reference buffer 0..7 |
53 int8_t ref_buf2 = -1; // -1 - no reference, 0..7 - reference buffer 0..7 | 55 int8_t ref_buf2 = -1; // -1 - no reference, 0..7 - reference buffer 0..7 |
54 int8_t ref_buf3 = -1; // -1 - no reference, 0..7 - reference buffer 0..7 | 56 int8_t ref_buf3 = -1; // -1 - no reference, 0..7 - reference buffer 0..7 |
55 }; | 57 }; |
56 | 58 |
57 struct SuperFrameRefSettings { | 59 struct SuperFrameRefSettings { |
58 LayerFrameRefSettings layer[kMaxVp9NumberOfSpatialLayers]; | 60 LayerFrameRefSettings layer[kMaxVp9NumberOfSpatialLayers]; |
59 uint8_t start_layer = 0; // The first spatial layer to be encoded. | 61 uint8_t start_layer = 0; // The first spatial layer to be encoded. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 const RTPFragmentationHeader* fragmentation, | 143 const RTPFragmentationHeader* fragmentation, |
142 const CodecSpecificInfo* codec_specific_info, | 144 const CodecSpecificInfo* codec_specific_info, |
143 int64_t /*render_time_ms*/) override; | 145 int64_t /*render_time_ms*/) override; |
144 | 146 |
145 int RegisterDecodeCompleteCallback(DecodedImageCallback* callback) override; | 147 int RegisterDecodeCompleteCallback(DecodedImageCallback* callback) override; |
146 | 148 |
147 int Release() override; | 149 int Release() override; |
148 | 150 |
149 int Reset() override; | 151 int Reset() override; |
150 | 152 |
| 153 const char* ImplementationName() const override; |
| 154 |
151 private: | 155 private: |
152 int ReturnFrame(const vpx_image_t* img, uint32_t timeStamp); | 156 int ReturnFrame(const vpx_image_t* img, uint32_t timeStamp); |
153 | 157 |
154 // Memory pool used to share buffers between libvpx and webrtc. | 158 // Memory pool used to share buffers between libvpx and webrtc. |
155 Vp9FrameBufferPool frame_buffer_pool_; | 159 Vp9FrameBufferPool frame_buffer_pool_; |
156 DecodedImageCallback* decode_complete_callback_; | 160 DecodedImageCallback* decode_complete_callback_; |
157 bool inited_; | 161 bool inited_; |
158 vpx_codec_ctx_t* decoder_; | 162 vpx_codec_ctx_t* decoder_; |
159 VideoCodec codec_; | 163 VideoCodec codec_; |
160 bool key_frame_required_; | 164 bool key_frame_required_; |
161 }; | 165 }; |
162 } // namespace webrtc | 166 } // namespace webrtc |
163 | 167 |
164 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_IMPL_H_ | 168 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_IMPL_H_ |
OLD | NEW |