| 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 2fc071cb0927d2fecf69a1da1f087ce9ca58ce76..5ba85f3aa0e543c7e4717e93a654d963abba8bba 100644
|
| --- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
|
| +++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/command_line.h"
|
| +#include "base/cpu.h"
|
| #include "base/logging.h"
|
| #include "base/message_loop/message_loop_proxy.h"
|
| #include "base/stl_util.h"
|
| @@ -20,6 +21,7 @@
|
| #include "ipc/ipc_message_utils.h"
|
| #include "ipc/message_filter.h"
|
| #include "media/base/limits.h"
|
| +#include "media/base/media_switches.h"
|
| #include "ui/gl/gl_context.h"
|
| #include "ui/gl/gl_surface_egl.h"
|
|
|
| @@ -356,6 +358,33 @@ GpuVideoDecodeAccelerator::CreateAndroidVDA() {
|
| return decoder.Pass();
|
| }
|
|
|
| +// static
|
| +gpu::VideoDecodeAcceleratorSupportedResolution
|
| +GpuVideoDecodeAccelerator::GetSupportedResolution() {
|
| + media::VideoDecodeAccelerator::SupportedResolution resolution;
|
| +#if defined(OS_WIN)
|
| + resolution = DXVAVideoDecodeAccelerator::GetSupportedResolution();
|
| +#elif defined(OS_MACOSX)
|
| + resolution = VTVideoDecodeAccelerator::GetSupportedResolution();
|
| +#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
|
| + resolution = V4L2VideoDecodeAccelerator::GetSupportedResolution();
|
| +#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
|
| + resolution = VaapiVideoDecodeAccelerator::GetSupportedResolution();
|
| +#elif defined(OS_ANDROID)
|
| + resolution = AndroidVideoDecodeAccelerator::GetSupportedResolution();
|
| +#elif defined(USE_OZONE)
|
| + resolution.min.SetSize(16, 16);
|
| + resolution.max.SetSize(1920, 1088);
|
| +#else
|
| + NOTIMPLEMENTED() << "HW video decode acceleration get supported resolution"
|
| + << " not available.";
|
| +#endif
|
| + gpu::VideoDecodeAcceleratorSupportedResolution gpu_resolution;
|
| + gpu_resolution.min = resolution.min;
|
| + gpu_resolution.max = resolution.max;
|
| + return gpu_resolution;
|
| +}
|
| +
|
| // Runs on IO thread if video_decode_accelerator_->CanDecodeOnIOThread() is
|
| // true, otherwise on the main thread.
|
| void GpuVideoDecodeAccelerator::OnDecode(
|
|
|