Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(947)

Unified Diff: content/common/gpu/omx_video_decode_accelerator.h

Issue 7088021: OmxVideoDecodeAcceleratorTest is born! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/omx_video_decode_accelerator.h
diff --git a/content/common/gpu/omx_video_decode_accelerator.h b/content/common/gpu/omx_video_decode_accelerator.h
index 5f8e324c69deeecc6de9f037c457b966b889fe33..59819b85d504de8b0a9803ba38a69beafbdb9857 100644
--- a/content/common/gpu/omx_video_decode_accelerator.h
+++ b/content/common/gpu/omx_video_decode_accelerator.h
@@ -18,6 +18,7 @@
#include "base/message_loop.h"
#include "base/shared_memory.h"
#include "media/video/video_decode_accelerator.h"
+#include "third_party/angle/include/EGL/egl.h"
#include "third_party/openmax/il/OMX_Component.h"
#include "third_party/openmax/il/OMX_Core.h"
#include "third_party/openmax/il/OMX_Video.h"
@@ -42,6 +43,8 @@ class OmxVideoDecodeAccelerator : public media::VideoDecodeAccelerator {
bool Flush() OVERRIDE;
bool Abort() OVERRIDE;
+ void SetEglState(EGLDisplay egl_display, EGLContext egl_context);
+
private:
MessageLoop* message_loop_;
OMX_HANDLETYPE component_handle_;
@@ -71,7 +74,8 @@ class OmxVideoDecodeAccelerator : public media::VideoDecodeAccelerator {
// Methods for shutdown
void PauseFromExecuting(OMX_STATETYPE ignored);
void FlushIOPorts();
- void PortFlushDone(int port);
+ void InputPortFlushDone(int port);
+ void OutputPortFlushDone(int port);
void FlushBegin();
// Determine whether we actually start decoding the bitstream.
@@ -103,6 +107,12 @@ class OmxVideoDecodeAccelerator : public media::VideoDecodeAccelerator {
int output_buffers_at_component_;
bool uses_egl_image_;
+ // NOTE: someday there may be multiple contexts for a single decoder. But not
+ // today.
+ // TODO(fischman,vrk): handle lost contexts?
+ EGLDisplay egl_display_;
+ EGLContext egl_context_;
+
// Free input OpenMAX buffers that can be used to take bitstream from demuxer.
std::queue<OMX_BUFFERHEADERTYPE*> free_input_buffers_;
@@ -112,6 +122,7 @@ class OmxVideoDecodeAccelerator : public media::VideoDecodeAccelerator {
std::vector<OutputPicture> output_pictures_;
// To expose client callbacks from VideoDecodeAccelerator.
+ // NOTE: all calls to this object *MUST* be executed in message_loop_.
Client* client_;
std::vector<uint32> texture_ids_;
« no previous file with comments | « content/common/gpu/gles2_texture_to_egl_image_translator.cc ('k') | content/common/gpu/omx_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698