| Index: media/gpu/gpu_video_decode_accelerator_factory_impl.cc
|
| diff --git a/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.cc b/media/gpu/gpu_video_decode_accelerator_factory_impl.cc
|
| similarity index 84%
|
| rename from content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.cc
|
| rename to media/gpu/gpu_video_decode_accelerator_factory_impl.cc
|
| index e4f3a35a5fbb2b785c902a9104a69a179a277d89..dee5b6a9beb74cacaa6454698e38cdcfd0db7d62 100644
|
| --- a/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.cc
|
| +++ b/media/gpu/gpu_video_decode_accelerator_factory_impl.cc
|
| @@ -2,37 +2,37 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h"
|
| +#include "media/gpu/gpu_video_decode_accelerator_factory_impl.h"
|
|
|
| #include "base/memory/ptr_util.h"
|
| -#include "content/common/gpu/media/gpu_video_decode_accelerator.h"
|
| #include "gpu/command_buffer/service/gpu_preferences.h"
|
| -#include "media/gpu/ipc/common/gpu_video_accelerator_util.h"
|
| +#include "media/gpu/gpu_video_accelerator_util.h"
|
| +#include "media/gpu/media_gpu_export.h"
|
|
|
| #if defined(OS_WIN)
|
| #include "base/win/windows_version.h"
|
| -#include "content/common/gpu/media/dxva_video_decode_accelerator_win.h"
|
| +#include "media/gpu/dxva_video_decode_accelerator_win.h"
|
| #elif defined(OS_MACOSX)
|
| -#include "content/common/gpu/media/vt_video_decode_accelerator_mac.h"
|
| +#include "media/gpu/vt_video_decode_accelerator_mac.h"
|
| #elif defined(OS_CHROMEOS)
|
| #if defined(USE_V4L2_CODEC)
|
| -#include "content/common/gpu/media/v4l2_device.h"
|
| -#include "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h"
|
| -#include "content/common/gpu/media/v4l2_video_decode_accelerator.h"
|
| +#include "media/gpu/v4l2_device.h"
|
| +#include "media/gpu/v4l2_slice_video_decode_accelerator.h"
|
| +#include "media/gpu/v4l2_video_decode_accelerator.h"
|
| #include "ui/gl/gl_surface_egl.h"
|
| #endif
|
| #if defined(ARCH_CPU_X86_FAMILY)
|
| -#include "content/common/gpu/media/vaapi_video_decode_accelerator.h"
|
| +#include "media/gpu/vaapi_video_decode_accelerator.h"
|
| #include "ui/gl/gl_implementation.h"
|
| #endif
|
| #elif defined(OS_ANDROID)
|
| -#include "content/common/gpu/media/android_video_decode_accelerator.h"
|
| +#include "media/gpu/android_video_decode_accelerator.h"
|
| #endif
|
|
|
| -namespace content {
|
| +namespace media {
|
|
|
| // static
|
| -std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl>
|
| +MEDIA_GPU_EXPORT std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl>
|
| GpuVideoDecodeAcceleratorFactoryImpl::Create(
|
| const GetGLContextCallback& get_gl_context_cb,
|
| const MakeGLContextCurrentCallback& make_context_current_cb,
|
| @@ -43,7 +43,7 @@ GpuVideoDecodeAcceleratorFactoryImpl::Create(
|
| }
|
|
|
| // static
|
| -std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl>
|
| +MEDIA_GPU_EXPORT std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl>
|
| GpuVideoDecodeAcceleratorFactoryImpl::CreateWithGLES2Decoder(
|
| const GetGLContextCallback& get_gl_context_cb,
|
| const MakeGLContextCurrentCallback& make_context_current_cb,
|
| @@ -55,27 +55,27 @@ GpuVideoDecodeAcceleratorFactoryImpl::CreateWithGLES2Decoder(
|
| }
|
|
|
| // static
|
| -std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl>
|
| +MEDIA_GPU_EXPORT std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl>
|
| GpuVideoDecodeAcceleratorFactoryImpl::CreateWithNoGL() {
|
| return Create(GetGLContextCallback(), MakeGLContextCurrentCallback(),
|
| BindGLImageCallback());
|
| }
|
|
|
| // static
|
| -gpu::VideoDecodeAcceleratorCapabilities
|
| +MEDIA_GPU_EXPORT gpu::VideoDecodeAcceleratorCapabilities
|
| GpuVideoDecodeAcceleratorFactoryImpl::GetDecoderCapabilities(
|
| const gpu::GpuPreferences& gpu_preferences) {
|
| media::VideoDecodeAccelerator::Capabilities capabilities;
|
| if (gpu_preferences.disable_accelerated_video_decode)
|
| return gpu::VideoDecodeAcceleratorCapabilities();
|
|
|
| - // Query VDAs for their capabilities and construct a set of supported
|
| - // profiles for current platform. This must be done in the same order as in
|
| - // CreateVDA(), as we currently preserve additional capabilities (such as
|
| - // resolutions supported) only for the first VDA supporting the given codec
|
| - // profile (instead of calculating a superset).
|
| - // TODO(posciak,henryhsu): improve this so that we choose a superset of
|
| - // resolutions and other supported profile parameters.
|
| +// Query VDAs for their capabilities and construct a set of supported
|
| +// profiles for current platform. This must be done in the same order as in
|
| +// CreateVDA(), as we currently preserve additional capabilities (such as
|
| +// resolutions supported) only for the first VDA supporting the given codec
|
| +// profile (instead of calculating a superset).
|
| +// TODO(posciak,henryhsu): improve this so that we choose a superset of
|
| +// resolutions and other supported profile parameters.
|
| #if defined(OS_WIN)
|
| capabilities.supported_profiles =
|
| DXVAVideoDecodeAccelerator::GetSupportedProfiles();
|
| @@ -105,7 +105,7 @@ GpuVideoDecodeAcceleratorFactoryImpl::GetDecoderCapabilities(
|
| capabilities);
|
| }
|
|
|
| -std::unique_ptr<media::VideoDecodeAccelerator>
|
| +MEDIA_GPU_EXPORT std::unique_ptr<media::VideoDecodeAccelerator>
|
| GpuVideoDecodeAcceleratorFactoryImpl::CreateVDA(
|
| media::VideoDecodeAccelerator::Client* client,
|
| const media::VideoDecodeAccelerator::Config& config,
|
| @@ -240,4 +240,4 @@ GpuVideoDecodeAcceleratorFactoryImpl::GpuVideoDecodeAcceleratorFactoryImpl(
|
|
|
| GpuVideoDecodeAcceleratorFactoryImpl::~GpuVideoDecodeAcceleratorFactoryImpl() {}
|
|
|
| -} // namespace content
|
| +} // namespace media
|
|
|