OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ |
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ | 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 195 |
196 // Queries factories_ whether |profile| is supported and return true is so, | 196 // Queries factories_ whether |profile| is supported and return true is so, |
197 // false otherwise. If true, also set resolution limits for |profile| | 197 // false otherwise. If true, also set resolution limits for |profile| |
198 // in min/max_resolution_. | 198 // in min/max_resolution_. |
199 bool IsProfileSupported(media::VideoCodecProfile profile); | 199 bool IsProfileSupported(media::VideoCodecProfile profile); |
200 | 200 |
201 // Clears the pending_buffers_ queue, freeing memory. | 201 // Clears the pending_buffers_ queue, freeing memory. |
202 void ClearPendingBuffers(); | 202 void ClearPendingBuffers(); |
203 | 203 |
204 // Resets |vda_error_counter_| after a successfull run of decode. | 204 // Resets |vda_error_counter_| after a successfull run of decode. |
205 void TryResetVDAErrorCounter_Locked(); | 205 void TryResetVDAErrorCounter(); |
206 | 206 |
207 enum State { | 207 enum State { |
208 UNINITIALIZED, // The decoder has not initialized. | 208 UNINITIALIZED, // The decoder has not initialized. |
209 INITIALIZED, // The decoder has initialized. | 209 INITIALIZED, // The decoder has initialized. |
210 RESETTING, // The decoder is being reset. | 210 RESETTING, // The decoder is being reset. |
211 DECODE_ERROR, // Decoding error happened. | 211 DECODE_ERROR, // Decoding error happened. |
212 }; | 212 }; |
213 | 213 |
214 static const int32_t ID_LAST; // maximum bitstream buffer id | 214 static const int32_t ID_LAST; // maximum bitstream buffer id |
215 static const int32_t ID_HALF; // half of the maximum bitstream buffer id | 215 static const int32_t ID_HALF; // half of the maximum bitstream buffer id |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 // Must be destroyed, or invalidated, on |vda_loop_proxy_| | 300 // Must be destroyed, or invalidated, on |vda_loop_proxy_| |
301 // NOTE: Weak pointers must be invalidated before all other member variables. | 301 // NOTE: Weak pointers must be invalidated before all other member variables. |
302 base::WeakPtrFactory<RTCVideoDecoder> weak_factory_; | 302 base::WeakPtrFactory<RTCVideoDecoder> weak_factory_; |
303 | 303 |
304 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder); | 304 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder); |
305 }; | 305 }; |
306 | 306 |
307 } // namespace content | 307 } // namespace content |
308 | 308 |
309 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ | 309 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_ |
OLD | NEW |