| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 private: | 150 private: |
| 151 friend class AVDATimerManager; | 151 friend class AVDATimerManager; |
| 152 | 152 |
| 153 // TODO(timav): evaluate the need for more states in the AVDA state machine. | 153 // TODO(timav): evaluate the need for more states in the AVDA state machine. |
| 154 enum State { | 154 enum State { |
| 155 NO_ERROR, | 155 NO_ERROR, |
| 156 ERROR, | 156 ERROR, |
| 157 WAITING_FOR_KEY, | 157 WAITING_FOR_KEY, |
| 158 WAITING_FOR_EOS, | 158 WAITING_FOR_EOS, |
| 159 PENDING_CODEC_REINITIALIZATION, |
| 159 }; | 160 }; |
| 160 | 161 |
| 161 // Configures |media_codec_| with the given codec parameters from the client. | 162 // Configures |media_codec_| with the given codec parameters from the client. |
| 162 bool ConfigureMediaCodec(); | 163 bool ConfigureMediaCodec(); |
| 163 | 164 |
| 164 // Sends the decoded frame specified by |codec_buffer_index| to the client. | 165 // Sends the decoded frame specified by |codec_buffer_index| to the client. |
| 165 void SendDecodedFrameToClient(int32_t codec_buffer_index, | 166 void SendDecodedFrameToClient(int32_t codec_buffer_index, |
| 166 int32_t bitstream_id); | 167 int32_t bitstream_id); |
| 167 | 168 |
| 168 // Does pending IO tasks if any. Once this is called, it polls |media_codec_| | 169 // Does pending IO tasks if any. Once this is called, it polls |media_codec_| |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 | 345 |
| 345 // WeakPtrFactory for posting tasks back to |this|. | 346 // WeakPtrFactory for posting tasks back to |this|. |
| 346 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; | 347 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; |
| 347 | 348 |
| 348 friend class AndroidVideoDecodeAcceleratorTest; | 349 friend class AndroidVideoDecodeAcceleratorTest; |
| 349 }; | 350 }; |
| 350 | 351 |
| 351 } // namespace content | 352 } // namespace content |
| 352 | 353 |
| 353 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 354 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |