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

Unified Diff: content/common/gpu/media/gpu_video_decode_accelerator.cc

Issue 8510039: Initial implementation of the DXVA 2.0 H.264 hardware decoder for pepper for Windows. The decodin... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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/gpu_video_decode_accelerator.cc
===================================================================
--- content/common/gpu/media/gpu_video_decode_accelerator.cc (revision 108497)
+++ content/common/gpu/media/gpu_video_decode_accelerator.cc (working copy)
@@ -15,8 +15,12 @@
#include "content/common/gpu/gpu_channel.h"
#include "content/common/gpu/gpu_command_buffer_stub.h"
#include "content/common/gpu/gpu_messages.h"
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
+#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)) || defined(OS_WIN)
+#if defined(OS_WIN)
+#include "content/common/gpu/media/dxva_video_decode_accelerator.h"
+#else // OS_WIN
#include "content/common/gpu/media/omx_video_decode_accelerator.h"
+#endif
#include "ui/gfx/gl/gl_context.h"
#include "ui/gfx/gl/gl_surface_egl.h"
#endif
@@ -109,14 +113,21 @@
DCHECK(!video_decode_accelerator_.get());
DCHECK(!init_done_msg_);
DCHECK(init_done_msg);
-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
+#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)) || defined(OS_WIN)
DCHECK(stub_ && stub_->decoder());
init_done_msg_ = init_done_msg;
- OmxVideoDecodeAccelerator* omx_decoder = new OmxVideoDecodeAccelerator(this);
- omx_decoder->SetEglState(
+#if defined(OS_WIN)
+ DLOG(INFO) << "Initializing DXVA HW decoder for windows.";
+ DXVAVideoDecodeAccelerator* video_decoder =
+ new DXVAVideoDecodeAccelerator(this);
+#else // OS_WIN
+ OmxVideoDecodeAccelerator* video_decoder =
+ new OmxVideoDecodeAccelerator(this);
+#endif // OS_WIN
+ video_decoder->SetEglState(
gfx::GLSurfaceEGL::GetHardwareDisplay(),
stub_->decoder()->GetGLContext()->GetHandle());
- video_decode_accelerator_ = omx_decoder;
+ video_decode_accelerator_ = video_decoder;
video_decode_accelerator_->Initialize(profile);
#else
NOTIMPLEMENTED() << "HW video decode acceleration not available.";
@@ -125,9 +136,11 @@
}
void GpuVideoDecodeAccelerator::OnDecode(
- base::SharedMemoryHandle handle, int32 id, int32 size) {
+ base::SharedMemoryHandle handle, int32 id, int32 size,
+ int32 source_process_id) {
DCHECK(video_decode_accelerator_.get());
- video_decode_accelerator_->Decode(media::BitstreamBuffer(id, handle, size));
+ video_decode_accelerator_->Decode(media::BitstreamBuffer(id, handle, size,
+ source_process_id));
}
void GpuVideoDecodeAccelerator::OnAssignPictureBuffers(

Powered by Google App Engine
This is Rietveld 408576698