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

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

Issue 490233002: VaapiVideoAccelerator: make Vaapi accelerator work with ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't limit h264_bitstream_buffer_unittest to x11 Created 6 years, 3 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_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 0fb613aeaeff3c44538864f9cb8a8392d2373627..5f7ab10994feebe7f933c37eea94afde95e9365b 100644
--- a/content/common/gpu/media/gpu_video_encode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_encode_accelerator.cc
@@ -17,13 +17,12 @@
#include "media/base/limits.h"
#include "media/base/video_frame.h"
-#if defined(OS_CHROMEOS) && defined(USE_X11)
+#if defined(OS_CHROMEOS)
-#if defined(ARCH_CPU_ARMEL)
+#if defined(ARCH_CPU_ARMEL) && defined(USE_X11)
#include "content/common/gpu/media/v4l2_video_encode_accelerator.h"
#elif defined(ARCH_CPU_X86_FAMILY)
#include "content/common/gpu/media/vaapi_video_encode_accelerator.h"
-#include "ui/gfx/x/x11_types.h"
#endif
#elif defined(OS_ANDROID) && defined(ENABLE_WEBRTC)
@@ -167,8 +166,8 @@ std::vector<media::VideoEncodeAccelerator::SupportedProfile>
GpuVideoEncodeAccelerator::GetSupportedProfiles() {
std::vector<media::VideoEncodeAccelerator::SupportedProfile> profiles;
-#if defined(OS_CHROMEOS) && defined(USE_X11)
-#if defined(ARCH_CPU_ARMEL)
+#if defined(OS_CHROMEOS)
+#if defined(ARCH_CPU_ARMEL) && defined(USE_X11)
profiles = V4L2VideoEncodeAccelerator::GetSupportedProfiles();
#elif defined(ARCH_CPU_X86_FAMILY)
profiles = VaapiVideoEncodeAccelerator::GetSupportedProfiles();
@@ -183,17 +182,17 @@ GpuVideoEncodeAccelerator::GetSupportedProfiles() {
void GpuVideoEncodeAccelerator::CreateEncoder() {
DCHECK(!encoder_);
-#if defined(OS_CHROMEOS) && defined(USE_X11)
-#if defined(ARCH_CPU_ARMEL)
+#if defined(OS_CHROMEOS)
+#if defined(ARCH_CPU_ARMEL) && defined(USE_X11)
scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder);
if (!device.get())
return;
encoder_.reset(new V4L2VideoEncodeAccelerator(device.Pass()));
#elif defined(ARCH_CPU_X86_FAMILY)
- const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
+ const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
Pawel Osciak 2014/09/24 11:27:10 Please don't remove base::.
if (!cmd_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode))
- encoder_.reset(new VaapiVideoEncodeAccelerator(gfx::GetXDisplay()));
+ encoder_.reset(new VaapiVideoEncodeAccelerator());
#endif
#elif defined(OS_ANDROID) && defined(ENABLE_WEBRTC)
encoder_.reset(new AndroidVideoEncodeAccelerator());

Powered by Google App Engine
This is Rietveld 408576698