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

Unified Diff: content/common/gpu/media/video_decode_accelerator_unittest.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
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/video_decode_accelerator_unittest.cc
diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc
index 461c9a940585e158949e452510c9889cb143fdfc..d5b8e9a9e22e36cbaa3d7643e316391ab50d773c 100644
--- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
@@ -57,6 +57,9 @@
#include "base/win/windows_version.h"
#include "content/common/gpu/media/dxva_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"
@@ -288,6 +291,7 @@ class GLRenderingVDAClient
scoped_ptr<media::VideoDecodeAccelerator> CreateDXVAVDA();
scoped_ptr<media::VideoDecodeAccelerator> CreateV4L2VDA();
+ scoped_ptr<media::VideoDecodeAccelerator> CreateV4L2SliceVDA();
scoped_ptr<media::VideoDecodeAccelerator> CreateVaapiVDA();
void SetState(ClientState new_state);
@@ -454,6 +458,24 @@ GLRenderingVDAClient::CreateV4L2VDA() {
}
scoped_ptr<media::VideoDecodeAccelerator>
+GLRenderingVDAClient::CreateV4L2SliceVDA() {
wuchengli 2015/01/12 06:05:55 We have more duplication like this in GVDA and VDA
+ scoped_ptr<media::VideoDecodeAccelerator> decoder;
+#if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
+ scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
+ if (device.get()) {
+ base::WeakPtr<VideoDecodeAccelerator::Client> weak_client = AsWeakPtr();
+ decoder.reset(new V4L2SliceVideoDecodeAccelerator(
+ device,
+ static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()),
+ static_cast<EGLContext>(rendering_helper_->GetGLContextHandle()),
+ weak_client,
+ base::Bind(&DoNothingReturnTrue),
+ base::MessageLoopProxy::current()));
+ }
+#endif
+ return decoder.Pass();
+}
+scoped_ptr<media::VideoDecodeAccelerator>
GLRenderingVDAClient::CreateVaapiVDA() {
scoped_ptr<media::VideoDecodeAccelerator> decoder;
#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
@@ -472,7 +494,8 @@ void GLRenderingVDAClient::CreateAndStartDecoder() {
scoped_ptr<media::VideoDecodeAccelerator> decoders[] = {
CreateDXVAVDA(),
CreateV4L2VDA(),
- CreateVaapiVDA()
+ CreateV4L2SliceVDA(),
+ CreateVaapiVDA(),
};
for (size_t i = 0; i < arraysize(decoders); ++i) {
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698