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

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

Issue 74563002: AndroidVideoEncodeAccelerator is born! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: kbr comments. Created 7 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_encode_accelerator.cc
diff --git a/content/common/gpu/media/gpu_video_encode_accelerator.cc b/content/common/gpu/media/gpu_video_encode_accelerator.cc
index 8d115ee656c2c0ab54805d3e108de93aa06c8775..89c2527f9f7ae9047db2cb42f1fabd197d51e7d7 100644
--- a/content/common/gpu/media/gpu_video_encode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_encode_accelerator.cc
@@ -17,6 +17,8 @@
#if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11)
#include "content/common/gpu/media/exynos_video_encode_accelerator.h"
+#elif defined(OS_ANDROID)
+#include "content/common/gpu/media/android_video_encode_accelerator.h"
#endif
namespace content {
@@ -88,6 +90,8 @@ GpuVideoEncodeAccelerator::GetSupportedProfiles() {
#if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11)
profiles = ExynosVideoEncodeAccelerator::GetSupportedProfiles();
+#elif defined(OS_ANDROID)
+ profiles = AndroidVideoEncodeAccelerator::GetSupportedProfiles();
#endif
// TODO(sheu): return platform-specific profiles.
@@ -95,8 +99,11 @@ GpuVideoEncodeAccelerator::GetSupportedProfiles() {
}
void GpuVideoEncodeAccelerator::CreateEncoder() {
+ DCHECK(!encoder_);
#if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11)
encoder_.reset(new ExynosVideoEncodeAccelerator(this));
+#elif defined(OS_ANDROID)
+ encoder_.reset(new AndroidVideoEncodeAccelerator(this));
#endif
}

Powered by Google App Engine
This is Rietveld 408576698