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

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

Issue 808973004: GVDA, vdatest: Enable V4L2SliceVideoDecodeAccelerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vp8_slice_based
Patch Set: Created 5 years, 11 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/gpu_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc
index 89e74b1ce852200c8b799f18aaa9c5b1fe011ef1..9ef0a537f2b9e63ac72cea9b39f80adf50e9e1e6 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -30,6 +30,9 @@
#elif defined(OS_MACOSX)
#include "content/common/gpu/media/vt_video_decode_accelerator.h"
#elif defined(OS_CHROMEOS)
+#if defined(ARCH_CPU_ARMEL)
+#include "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h"
+#endif // defined(ARCH_CPU_ARMEL)
#if defined(ARCH_CPU_ARMEL) || (defined(USE_OZONE) && defined(USE_V4L2_CODEC))
#include "content/common/gpu/media/v4l2_video_decode_accelerator.h"
#include "content/common/gpu/media/v4l2_video_device.h"
@@ -275,6 +278,7 @@ GpuVideoDecodeAccelerator::CreateVDAFps() {
std::vector<GpuVideoDecodeAccelerator::CreateVDAFp> create_vda_fps;
create_vda_fps.push_back(&GpuVideoDecodeAccelerator::CreateDXVAVDA);
create_vda_fps.push_back(&GpuVideoDecodeAccelerator::CreateV4L2VDA);
+ create_vda_fps.push_back(&GpuVideoDecodeAccelerator::CreateV4L2SliceVDA);
create_vda_fps.push_back(&GpuVideoDecodeAccelerator::CreateVaapiVDA);
create_vda_fps.push_back(&GpuVideoDecodeAccelerator::CreateVTVDA);
create_vda_fps.push_back(&GpuVideoDecodeAccelerator::CreateOzoneVDA);
@@ -316,6 +320,24 @@ GpuVideoDecodeAccelerator::CreateV4L2VDA() {
}
scoped_ptr<media::VideoDecodeAccelerator>
+GpuVideoDecodeAccelerator::CreateV4L2SliceVDA() {
+ scoped_ptr<media::VideoDecodeAccelerator> decoder;
+#if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
+ scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
+ if (device.get()) {
+ decoder.reset(new V4L2SliceVideoDecodeAccelerator(
+ device,
+ gfx::GLSurfaceEGL::GetHardwareDisplay(),
+ stub_->decoder()->GetGLContext()->GetHandle(),
+ weak_factory_for_io_.GetWeakPtr(),
+ make_context_current_,
+ io_message_loop_));
+ }
+#endif
+ return decoder.Pass();
+}
+
+scoped_ptr<media::VideoDecodeAccelerator>
GpuVideoDecodeAccelerator::CreateVaapiVDA() {
scoped_ptr<media::VideoDecodeAccelerator> decoder;
#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)

Powered by Google App Engine
This is Rietveld 408576698