| 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> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // from any other. OMX callbacks are trampolined from the OMX component's | 35 // from any other. OMX callbacks are trampolined from the OMX component's |
| 36 // thread to maintain this invariant. The only exception to thread-unsafety is | 36 // thread to maintain this invariant. The only exception to thread-unsafety is |
| 37 // that references can be added from any thread (practically used only by the | 37 // that references can be added from any thread (practically used only by the |
| 38 // OMX thread). | 38 // OMX thread). |
| 39 class OmxVideoDecodeAccelerator : public media::VideoDecodeAccelerator { | 39 class OmxVideoDecodeAccelerator : public media::VideoDecodeAccelerator { |
| 40 public: | 40 public: |
| 41 // Does not take ownership of |client| which must outlive |*this|. | 41 // Does not take ownership of |client| which must outlive |*this|. |
| 42 OmxVideoDecodeAccelerator(media::VideoDecodeAccelerator::Client* client); | 42 OmxVideoDecodeAccelerator(media::VideoDecodeAccelerator::Client* client); |
| 43 | 43 |
| 44 // media::VideoDecodeAccelerator implementation. | 44 // media::VideoDecodeAccelerator implementation. |
| 45 bool Initialize(media::VideoCodecProfile profile) OVERRIDE; | 45 bool Initialize(media::VideoCodecProfile profile, |
| 46 const gfx::Size& frame_size, |
| 47 const std::vector<uint8_t>& extra_data) OVERRIDE; |
| 46 void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; | 48 void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; |
| 47 virtual void AssignPictureBuffers( | 49 virtual void AssignPictureBuffers( |
| 48 const std::vector<media::PictureBuffer>& buffers) OVERRIDE; | 50 const std::vector<media::PictureBuffer>& buffers) OVERRIDE; |
| 49 void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE; | 51 void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE; |
| 50 void Flush() OVERRIDE; | 52 void Flush() OVERRIDE; |
| 51 void Reset() OVERRIDE; | 53 void Reset() OVERRIDE; |
| 52 void Destroy() OVERRIDE; | 54 void Destroy() OVERRIDE; |
| 53 | 55 |
| 54 void SetEglState(EGLDisplay egl_display, EGLContext egl_context); | 56 void SetEglState(EGLDisplay egl_display, EGLContext egl_context); |
| 55 | 57 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 OMX_PTR event_data); | 218 OMX_PTR event_data); |
| 217 static OMX_ERRORTYPE EmptyBufferCallback(OMX_HANDLETYPE component, | 219 static OMX_ERRORTYPE EmptyBufferCallback(OMX_HANDLETYPE component, |
| 218 OMX_PTR priv_data, | 220 OMX_PTR priv_data, |
| 219 OMX_BUFFERHEADERTYPE* buffer); | 221 OMX_BUFFERHEADERTYPE* buffer); |
| 220 static OMX_ERRORTYPE FillBufferCallback(OMX_HANDLETYPE component, | 222 static OMX_ERRORTYPE FillBufferCallback(OMX_HANDLETYPE component, |
| 221 OMX_PTR priv_data, | 223 OMX_PTR priv_data, |
| 222 OMX_BUFFERHEADERTYPE* buffer); | 224 OMX_BUFFERHEADERTYPE* buffer); |
| 223 }; | 225 }; |
| 224 | 226 |
| 225 #endif // CONTENT_COMMON_GPU_MEDIA_OMX_VIDEO_DECODE_ACCELERATOR_H_ | 227 #endif // CONTENT_COMMON_GPU_MEDIA_OMX_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |