| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 143 |
| 144 private: | 144 private: |
| 145 friend class AVDATimerManager; | 145 friend class AVDATimerManager; |
| 146 | 146 |
| 147 // TODO(timav): evaluate the need for more states in the AVDA state machine. | 147 // TODO(timav): evaluate the need for more states in the AVDA state machine. |
| 148 enum State { | 148 enum State { |
| 149 NO_ERROR, | 149 NO_ERROR, |
| 150 ERROR, | 150 ERROR, |
| 151 WAITING_FOR_KEY, | 151 WAITING_FOR_KEY, |
| 152 WAITING_FOR_EOS, | 152 WAITING_FOR_EOS, |
| 153 PENDING_CODEC_RECONFIGURE, |
| 153 }; | 154 }; |
| 154 | 155 |
| 155 // Configures |media_codec_| with the given codec parameters from the client. | 156 // Configures |media_codec_| with the given codec parameters from the client. |
| 156 bool ConfigureMediaCodec(); | 157 bool ConfigureMediaCodec(); |
| 157 | 158 |
| 158 // Sends the decoded frame specified by |codec_buffer_index| to the client. | 159 // Sends the decoded frame specified by |codec_buffer_index| to the client. |
| 159 void SendDecodedFrameToClient(int32_t codec_buffer_index, | 160 void SendDecodedFrameToClient(int32_t codec_buffer_index, |
| 160 int32_t bitstream_id); | 161 int32_t bitstream_id); |
| 161 | 162 |
| 162 // Does pending IO tasks if any. Once this is called, it polls |media_codec_| | 163 // Does pending IO tasks if any. Once this is called, it polls |media_codec_| |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 | 335 |
| 335 // WeakPtrFactory for posting tasks back to |this|. | 336 // WeakPtrFactory for posting tasks back to |this|. |
| 336 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; | 337 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; |
| 337 | 338 |
| 338 friend class AndroidVideoDecodeAcceleratorTest; | 339 friend class AndroidVideoDecodeAcceleratorTest; |
| 339 }; | 340 }; |
| 340 | 341 |
| 341 } // namespace content | 342 } // namespace content |
| 342 | 343 |
| 343 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 344 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |