OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_OMX_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_OMX_VIDEO_DECODE_ACCELERATOR_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_OMX_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_OMX_VIDEO_DECODE_ACCELERATOR_H_ |
7 | 7 |
8 #include <dlfcn.h> | 8 #include <dlfcn.h> |
9 #include <map> | 9 #include <map> |
10 #include <queue> | 10 #include <queue> |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 void FreeInputBuffers(); | 70 void FreeInputBuffers(); |
71 void FreeOutputBuffers(); | 71 void FreeOutputBuffers(); |
72 | 72 |
73 // Methods to handle OMX state transitions. | 73 // Methods to handle OMX state transitions. |
74 bool TransitionToState(OMX_STATETYPE new_state); | 74 bool TransitionToState(OMX_STATETYPE new_state); |
75 void OnStateChangeLoadedToIdle(OMX_STATETYPE state); | 75 void OnStateChangeLoadedToIdle(OMX_STATETYPE state); |
76 void OnStateChangeIdleToExecuting(OMX_STATETYPE state); | 76 void OnStateChangeIdleToExecuting(OMX_STATETYPE state); |
77 void OnStateChangeExecutingToIdle(OMX_STATETYPE state); | 77 void OnStateChangeExecutingToIdle(OMX_STATETYPE state); |
78 void OnStateChangeIdleToLoaded(OMX_STATETYPE state); | 78 void OnStateChangeIdleToLoaded(OMX_STATETYPE state); |
79 // Stop the components when error is detected. | 79 // Stop the components when error is detected. |
80 void StopOnError(); | 80 void StopOnError(media::VideoDecodeAccelerator::Error error); |
81 // Methods for shutdown | 81 // Methods for shutdown |
82 void PauseFromExecuting(OMX_STATETYPE ignored); | 82 void PauseFromExecuting(OMX_STATETYPE ignored); |
83 void FlushIOPorts(); | 83 void FlushIOPorts(); |
84 void InputPortFlushDone(int port); | 84 void InputPortFlushDone(int port); |
85 void OutputPortFlushDone(int port); | 85 void OutputPortFlushDone(int port); |
86 void FlushBegin(); | 86 void FlushBegin(); |
87 void ShutDownOMXFromExecuting(); | 87 void ShutDownOMXFromExecuting(); |
88 | 88 |
89 // Determine whether we actually start decoding the bitstream. | 89 // Determine whether we actually start decoding the bitstream. |
90 bool CanAcceptInput(); | 90 bool CanAcceptInput(); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 OMX_PTR event_data); | 168 OMX_PTR event_data); |
169 static OMX_ERRORTYPE EmptyBufferCallback(OMX_HANDLETYPE component, | 169 static OMX_ERRORTYPE EmptyBufferCallback(OMX_HANDLETYPE component, |
170 OMX_PTR priv_data, | 170 OMX_PTR priv_data, |
171 OMX_BUFFERHEADERTYPE* buffer); | 171 OMX_BUFFERHEADERTYPE* buffer); |
172 static OMX_ERRORTYPE FillBufferCallback(OMX_HANDLETYPE component, | 172 static OMX_ERRORTYPE FillBufferCallback(OMX_HANDLETYPE component, |
173 OMX_PTR priv_data, | 173 OMX_PTR priv_data, |
174 OMX_BUFFERHEADERTYPE* buffer); | 174 OMX_BUFFERHEADERTYPE* buffer); |
175 }; | 175 }; |
176 | 176 |
177 #endif // CONTENT_COMMON_GPU_MEDIA_OMX_VIDEO_DECODE_ACCELERATOR_H_ | 177 #endif // CONTENT_COMMON_GPU_MEDIA_OMX_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |