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

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

Issue 11198060: VDA implementation for Exynos, using V4L2 (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Added H264 parsing for frame boundaries. Created 8 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/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 265cc4f08371d464e609f9bd9035d91c9829e97d..a2a5440f7ab07dd7af4ef892fbe4fd02cf61b59d 100644
--- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
@@ -40,6 +40,7 @@
#include "base/threading/thread.h"
#include "base/utf_string_conversions.h"
#include "content/common/gpu/media/rendering_helper.h"
+#include "content/public/common/content_switches.h"
#if defined(OS_WIN)
#include "content/common/gpu/media/dxva_video_decode_accelerator.h"
@@ -48,6 +49,7 @@
#elif defined(ARCH_CPU_X86_FAMILY)
#include "content/common/gpu/media/vaapi_video_decode_accelerator.h"
#elif defined(ARCH_CPU_ARMEL)
+#include "content/common/gpu/media/exynos_video_decode_accelerator.h"
#include "content/common/gpu/media/omx_video_decode_accelerator.h"
#else
#error The VideoAccelerator tests are not supported on this platform.
@@ -324,12 +326,19 @@ void GLRenderingVDAClient::CreateDecoder() {
decoder_.reset(new MacVideoDecodeAccelerator(
static_cast<CGLContextObj>(rendering_helper_->GetGLContext()), this));
#elif defined(ARCH_CPU_ARMEL)
- decoder_.reset(
- new OmxVideoDecodeAccelerator(
- static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()),
- static_cast<EGLContext>(rendering_helper_->GetGLContext()),
- this,
- base::Bind(&DoNothingReturnTrue)));
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseExynosVda)) {
+ decoder_.reset(
+ new ExynosVideoDecodeAccelerator(
+ static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()),
+ static_cast<EGLContext>(rendering_helper_->GetGLContext()),
+ this, base::Bind(&DoNothingReturnTrue)));
+ } else {
+ decoder_.reset(
+ new OmxVideoDecodeAccelerator(
+ static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()),
+ static_cast<EGLContext>(rendering_helper_->GetGLContext()),
+ this, base::Bind(&DoNothingReturnTrue)));
+ }
#elif defined(ARCH_CPU_X86_FAMILY)
decoder_.reset(new VaapiVideoDecodeAccelerator(
static_cast<Display*>(rendering_helper_->GetGLDisplay()),
@@ -883,6 +892,8 @@ int main(int argc, char **argv) {
}
if (it->first == "v" || it->first == "vmodule")
continue;
+ if (it->first == switches::kUseExynosVda)
+ continue;
LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second;
}
@@ -892,7 +903,10 @@ int main(int argc, char **argv) {
#if defined(OS_WIN)
content::DXVAVideoDecodeAccelerator::PreSandboxInitialization();
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
- content::OmxVideoDecodeAccelerator::PreSandboxInitialization();
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseExynosVda))
+ content::ExynosVideoDecodeAccelerator::PreSandboxInitialization();
+ else
+ content::OmxVideoDecodeAccelerator::PreSandboxInitialization();
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
content::VaapiVideoDecodeAccelerator::PreSandboxInitialization();
#endif

Powered by Google App Engine
This is Rietveld 408576698