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

Unified Diff: content/common/gpu/media/exynos_video_decode_accelerator.h

Issue 23125014: Run VDA::Decode on GPU IO thread if VDA supports it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix try bot errors Created 7 years, 4 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/media/exynos_video_decode_accelerator.h
diff --git a/content/common/gpu/media/exynos_video_decode_accelerator.h b/content/common/gpu/media/exynos_video_decode_accelerator.h
index 77471402ff0d61f259f228cc3d12403c332076e8..757218c2981c92588766d11c142f4ff661cf8cf3 100644
--- a/content/common/gpu/media/exynos_video_decode_accelerator.h
+++ b/content/common/gpu/media/exynos_video_decode_accelerator.h
@@ -16,8 +16,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/threading/thread.h"
#include "content/common/content_export.h"
+#include "content/common/gpu/media/video_decode_accelerator_impl.h"
#include "media/base/video_decoder_config.h"
-#include "media/video/video_decode_accelerator.h"
#include "ui/gfx/size.h"
#include "ui/gl/gl_bindings.h"
@@ -54,14 +54,15 @@ class H264Parser;
// decoder_thread_, so there are no synchronization issues.
// ... well, there are, but it's a matter of getting messages posted in the
// right order, not fiddling with locks.
-class CONTENT_EXPORT ExynosVideoDecodeAccelerator :
- public media::VideoDecodeAccelerator {
+class CONTENT_EXPORT ExynosVideoDecodeAccelerator
+ : public VideoDecodeAcceleratorImpl {
public:
ExynosVideoDecodeAccelerator(
EGLDisplay egl_display,
EGLContext egl_context,
Client* client,
- const base::Callback<bool(void)>& make_context_current);
+ const base::Callback<bool(void)>& make_context_current,
+ const scoped_refptr<base::MessageLoopProxy>& io_message_loop_proxy);
virtual ~ExynosVideoDecodeAccelerator();
// media::VideoDecodeAccelerator implementation.
@@ -75,6 +76,9 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator :
virtual void Reset() OVERRIDE;
virtual void Destroy() OVERRIDE;
+ // VideoDecodeAcceleratorImpl implementation.
+ virtual bool CanDecodeOnIOThread() OVERRIDE { return true; }
piman 2013/08/27 17:14:22 nit: don't inline virtual methods.
wuchengli 2013/08/28 13:18:21 Done.
+
// Do any necessary initialization before the sandbox is enabled.
static void PreSandboxInitialization();
@@ -178,7 +182,7 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator :
// Enqueue a BitstreamBuffer to decode. This will enqueue a buffer to the
// decoder_input_queue_, then queue a DecodeBufferTask() to actually decode
// the buffer.
- void DecodeTask(scoped_ptr<BitstreamBufferRef> bitstream_record);
+ void DecodeTask(const media::BitstreamBuffer& bitstream_buffer);
// Decode from the buffers queued in decoder_input_queue_. Calls
// DecodeBufferInitial() or DecodeBufferContinue() as appropriate.
@@ -311,6 +315,9 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator :
// Our original calling message loop for the child thread.
scoped_refptr<base::MessageLoopProxy> child_message_loop_proxy_;
+ // Message loop of the IO thread.
+ scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
+
// WeakPtr<> pointing to |this| for use in posting tasks from the decoder or
// device worker threads back to the child thread. Because the worker threads
// are members of this class, any task running on those threads is guaranteed

Powered by Google App Engine
This is Rietveld 408576698