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

Unified Diff: content/renderer/pepper/pepper_video_decoder_host.h

Issue 213313003: Experimental patch for MediaCodec APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update. Requires chromium @r273920 Created 6 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
« no previous file with comments | « chrome/test/ppapi/ppapi_browsertest.cc ('k') | content/renderer/pepper/pepper_video_decoder_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_video_decoder_host.h
diff --git a/content/renderer/pepper/pepper_video_decoder_host.h b/content/renderer/pepper/pepper_video_decoder_host.h
index bc44fe848dffe9778ae846b106db13647c9c5ca0..0fbb83c851dd23937f6d48a6f9ea07034f316b7a 100644
--- a/content/renderer/pepper/pepper_video_decoder_host.h
+++ b/content/renderer/pepper/pepper_video_decoder_host.h
@@ -10,11 +10,11 @@
#include "base/basictypes.h"
#include "base/containers/hash_tables.h"
-#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "content/common/content_export.h"
#include "gpu/command_buffer/common/mailbox.h"
+#include "media/base/video_decoder.h"
#include "media/video/video_decode_accelerator.h"
#include "ppapi/c/pp_codecs.h"
#include "ppapi/host/host_message_context.h"
@@ -25,11 +25,24 @@ namespace base {
class SharedMemory;
}
+namespace gpu {
+namespace gles2 {
+class GLES2Interface;
+}
+}
+
+namespace webkit {
+namespace gpu {
+class ContextProviderWebContext;
+}
+}
+
namespace content {
class PPB_Graphics3D_Impl;
class RendererPpapiHost;
class RenderViewImpl;
+class SoftwareDecoder;
class CONTENT_EXPORT PepperVideoDecoderHost
: public ppapi::host::ResourceHost,
@@ -50,6 +63,8 @@ class CONTENT_EXPORT PepperVideoDecoderHost
const ppapi::host::ReplyMessageContext reply_context;
};
+ friend class SoftwareDecoder;
+
// ResourceHost implementation.
virtual int32_t OnResourceMessageReceived(
const IPC::Message& msg,
@@ -85,6 +100,14 @@ class CONTENT_EXPORT PepperVideoDecoderHost
int32_t OnHostMsgFlush(ppapi::host::HostMessageContext* context);
int32_t OnHostMsgReset(ppapi::host::HostMessageContext* context);
+ // Software decoder callbacks.
+ void OnInitializeComplete(media::PipelineStatus pipeline_status);
+
+ void RequestTextures(uint32 requested_num_of_buffers,
+ const gfx::Size& dimensions,
+ uint32 texture_target,
+ const std::vector<gpu::Mailbox>& mailboxes);
+
// Non-owning pointer.
RendererPpapiHost* renderer_ppapi_host_;
@@ -107,6 +130,10 @@ class CONTENT_EXPORT PepperVideoDecoderHost
ppapi::host::ReplyMessageContext flush_reply_context_;
ppapi::host::ReplyMessageContext reset_reply_context_;
+ // These are only used when in software fallback mode.
+ scoped_ptr<SoftwareDecoder> software_decoder_;
+ ppapi::host::ReplyMessageContext initialize_reply_context_;
+
bool initialized_;
DISALLOW_COPY_AND_ASSIGN(PepperVideoDecoderHost);
« no previous file with comments | « chrome/test/ppapi/ppapi_browsertest.cc ('k') | content/renderer/pepper/pepper_video_decoder_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698