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

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

Issue 10534077: Revert 141302 - hook up new MacVideoDecodeAccelerator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | « no previous file | gpu/command_buffer/common/gles2_cmd_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/gpu_video_decode_accelerator.cc
===================================================================
--- content/common/gpu/media/gpu_video_decode_accelerator.cc (revision 141304)
+++ content/common/gpu/media/gpu_video_decode_accelerator.cc (working copy)
@@ -10,26 +10,30 @@
#include "base/logging.h"
#include "base/stl_util.h"
+#if defined(OS_WIN)
+#include "base/win/windows_version.h"
+#endif // OS_WIN
+
#include "content/common/gpu/gpu_channel.h"
#include "content/common/gpu/gpu_command_buffer_stub.h"
#include "content/common/gpu/gpu_messages.h"
#include "gpu/command_buffer/common/command_buffer.h"
-#include "gpu/command_buffer/service/texture_manager.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"
-#include "ui/gfx/size.h"
-#include "ui/gl/gl_context.h"
-#include "ui/gl/gl_surface_egl.h"
+#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)) || defined(OS_WIN)
#if defined(OS_WIN)
-#include "base/win/windows_version.h"
#include "content/common/gpu/media/dxva_video_decode_accelerator.h"
-#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
+#else // OS_WIN
#include "content/common/gpu/media/omx_video_decode_accelerator.h"
-#elif defined(OS_MACOSX)
-#include "content/common/gpu/media/mac_video_decode_accelerator.h"
+#endif // OS_WIN
+#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_surface_egl.h"
#endif
+#include "gpu/command_buffer/service/texture_manager.h"
+#include "ui/gfx/size.h"
+
using gpu::gles2::TextureManager;
GpuVideoDecodeAccelerator::GpuVideoDecodeAccelerator(
@@ -121,6 +125,8 @@
DCHECK(init_done_msg);
init_done_msg_ = init_done_msg;
+#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)) || defined(OS_WIN)
+ DCHECK(stub_ && stub_->decoder());
#if defined(OS_WIN)
if (base::win::GetVersion() < base::win::VERSION_WIN7) {
NOTIMPLEMENTED() << "HW video decode acceleration not available.";
@@ -128,29 +134,22 @@
return;
}
DLOG(INFO) << "Initializing DXVA HW decoder for windows.";
- scoped_refptr<DXVAVideoDecodeAccelerator> video_decoder(
- new DXVAVideoDecodeAccelerator(this));
- video_decode_accelerator_ = video_decoder;
-#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
- scoped_refptr<OmxVideoDecodeAccelerator> video_decoder(
- new OmxVideoDecodeAccelerator(this));
+ DXVAVideoDecodeAccelerator* video_decoder =
+ new DXVAVideoDecodeAccelerator(this);
+#else // OS_WIN
+ OmxVideoDecodeAccelerator* video_decoder =
+ new OmxVideoDecodeAccelerator(this);
video_decoder->SetEglState(
gfx::GLSurfaceEGL::GetHardwareDisplay(),
stub_->decoder()->GetGLContext()->GetHandle());
-#elif defined(OS_MACOSX)
- scoped_refptr<MacVideoDecodeAccelerator> video_decoder(
- new MacVideoDecodeAccelerator(this));
- video_decoder->SetCGLContext(static_cast<CGLContextObj>(
- stub_->decoder()->GetGLContext()->GetHandle()));
+#endif // OS_WIN
video_decode_accelerator_ = video_decoder;
-#else
- NOTIMPLEMENTED() << "HW video decode acceleration not available.";
- NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE);
- return;
-#endif
-
if (!video_decode_accelerator_->Initialize(profile))
NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE);
+#else // Update RenderViewImpl::createMediaPlayer when adding clauses.
+ NOTIMPLEMENTED() << "HW video decode acceleration not available.";
+ NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE);
+#endif // defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
}
void GpuVideoDecodeAccelerator::OnDecode(
« no previous file with comments | « no previous file | gpu/command_buffer/common/gles2_cmd_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698