| 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_GPU_RTC_VIDEO_DECODER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_DECODER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_DECODER_H_ | 6 #define CONTENT_RENDERER_MEDIA_GPU_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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 void DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() const; | 194 void DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() const; |
| 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. | |
| 205 void TryResetVDAErrorCounter_Locked(); | |
| 206 | |
| 207 enum State { | 204 enum State { |
| 208 UNINITIALIZED, // The decoder has not initialized. | 205 UNINITIALIZED, // The decoder has not initialized. |
| 209 INITIALIZED, // The decoder has initialized. | 206 INITIALIZED, // The decoder has initialized. |
| 210 RESETTING, // The decoder is being reset. | 207 RESETTING, // The decoder is being reset. |
| 211 DECODE_ERROR, // Decoding error happened. | 208 DECODE_ERROR, // Decoding error happened. |
| 212 }; | 209 }; |
| 213 | 210 |
| 214 static const int32_t ID_LAST; // maximum bitstream buffer id | 211 static const int32_t ID_LAST; // maximum bitstream buffer id |
| 215 static const int32_t ID_HALF; // half of the maximum bitstream buffer id | 212 static const int32_t ID_HALF; // half of the maximum bitstream buffer id |
| 216 static const int32_t ID_INVALID; // indicates Reset or Release never occurred | 213 static const int32_t ID_INVALID; // indicates Reset or Release never occurred |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 // Must be destroyed, or invalidated, on |vda_loop_proxy_| | 297 // Must be destroyed, or invalidated, on |vda_loop_proxy_| |
| 301 // NOTE: Weak pointers must be invalidated before all other member variables. | 298 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 302 base::WeakPtrFactory<RTCVideoDecoder> weak_factory_; | 299 base::WeakPtrFactory<RTCVideoDecoder> weak_factory_; |
| 303 | 300 |
| 304 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder); | 301 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder); |
| 305 }; | 302 }; |
| 306 | 303 |
| 307 } // namespace content | 304 } // namespace content |
| 308 | 305 |
| 309 #endif // CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_DECODER_H_ | 306 #endif // CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_DECODER_H_ |
| OLD | NEW |