| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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> |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <utility> | 13 #include <utility> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/message_loop.h" | 18 #include "base/message_loop.h" |
| 19 #include "base/shared_memory.h" | 19 #include "base/shared_memory.h" |
| 20 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
| 21 #include "media/video/video_decode_accelerator.h" | 21 #include "media/video/video_decode_accelerator.h" |
| 22 #include "third_party/angle/include/EGL/egl.h" | 22 #include "third_party/angle/include/EGL/egl.h" |
| 23 #include "third_party/angle/include/EGL/eglext.h" | 23 #include "third_party/angle/include/EGL/eglext.h" |
| 24 #include "third_party/openmax/il/OMX_Component.h" | 24 #include "third_party/openmax/il/OMX_Component.h" |
| 25 #include "third_party/openmax/il/OMX_Core.h" | 25 #include "third_party/openmax/il/OMX_Core.h" |
| 26 #include "third_party/openmax/il/OMX_Video.h" | 26 #include "third_party/openmax/il/OMX_Video.h" |
| 27 | 27 |
| 28 namespace content { |
| 28 class Gles2TextureToEglImageTranslator; | 29 class Gles2TextureToEglImageTranslator; |
| 29 | 30 |
| 30 // Class to wrap OpenMAX IL accelerator behind VideoDecodeAccelerator interface. | 31 // Class to wrap OpenMAX IL accelerator behind VideoDecodeAccelerator interface. |
| 31 // The implementation assumes an OpenMAX IL 1.1.2 implementation conforming to | 32 // The implementation assumes an OpenMAX IL 1.1.2 implementation conforming to |
| 32 // http://www.khronos.org/registry/omxil/specs/OpenMAX_IL_1_1_2_Specification.pd
f | 33 // http://www.khronos.org/registry/omxil/specs/OpenMAX_IL_1_1_2_Specification.pd
f |
| 33 // | 34 // |
| 34 // This class lives on a single thread (the GPU process ChildThread) and DCHECKs | 35 // This class lives on a single thread (the GPU process ChildThread) and DCHECKs |
| 35 // that it is never accessed from any other. OMX callbacks are trampolined from | 36 // that it is never accessed from any other. OMX callbacks are trampolined from |
| 36 // the OMX component's thread to maintain this invariant, using |weak_this()|. | 37 // the OMX component's thread to maintain this invariant, using |weak_this()|. |
| 37 class CONTENT_EXPORT OmxVideoDecodeAccelerator : | 38 class CONTENT_EXPORT OmxVideoDecodeAccelerator : |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 // to check later. | 266 // to check later. |
| 266 void CheckPictureStatus(int32 picture_buffer_id, | 267 void CheckPictureStatus(int32 picture_buffer_id, |
| 267 scoped_ptr<PictureSyncObject> egl_sync_obj); | 268 scoped_ptr<PictureSyncObject> egl_sync_obj); |
| 268 | 269 |
| 269 // Queue a picture for use by the decoder, either by sending it directly to it | 270 // Queue a picture for use by the decoder, either by sending it directly to it |
| 270 // via OMX_FillThisBuffer, or by queueing it for later if we are RESETTING. | 271 // via OMX_FillThisBuffer, or by queueing it for later if we are RESETTING. |
| 271 void QueuePictureBuffer(int32 picture_buffer_id); | 272 void QueuePictureBuffer(int32 picture_buffer_id); |
| 272 | 273 |
| 273 }; | 274 }; |
| 274 | 275 |
| 276 } // namespace content |
| 277 |
| 275 #endif // CONTENT_COMMON_GPU_MEDIA_OMX_VIDEO_DECODE_ACCELERATOR_H_ | 278 #endif // CONTENT_COMMON_GPU_MEDIA_OMX_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |