Commit 5dc635d6 authored by Chih-Yu Huang's avatar Chih-Yu Huang Committed by Commit Bot

media/gpu: Move DmabufVideoFramePool related files into //media/gpu/chromeos.

Currently only ChromeOS platform uses DmabufVideoFramePool. This CL
moves the related files //media/gpu/chromeos.

BUG=chromium:1012587
TEST=ninja chrome on kevin and eve.
TEST=ninja video_decode_accelerator_tests on kevin and eve
TEST=ninja media_unittests
TEST=gn check on kevin and eve

Change-Id: I553831492b238046e454af73cee5e62876240e61
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1877495
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: default avatarShuo-Peng Liao <deanliao@chromium.org>
Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarAlexandre Courbot <acourbot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709424}
parent 489e90e0
......@@ -46,6 +46,8 @@ source_set("chromeos") {
source_set("common") {
defines = [ "MEDIA_GPU_IMPLEMENTATION" ]
sources = [
"dmabuf_video_frame_pool.cc",
"dmabuf_video_frame_pool.h",
"image_processor.cc",
"image_processor.h",
"image_processor_factory.h",
......@@ -53,6 +55,8 @@ source_set("common") {
"libyuv_image_processor.h",
"mailbox_video_frame_converter.cc",
"mailbox_video_frame_converter.h",
"platform_video_frame_pool.cc",
"platform_video_frame_pool.h",
"video_decoder_pipeline.cc",
"video_decoder_pipeline.h",
"video_frame_converter.cc",
......@@ -110,6 +114,7 @@ source_set("unit_tests") {
sources = [
"fourcc_unittests.cc",
"mailbox_video_frame_converter_unittest.cc",
"platform_video_frame_pool_unittest.cc",
]
}
......
......@@ -12,8 +12,8 @@
#if BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
#include "media/gpu/chromeos/mailbox_video_frame_converter.h"
#include "media/gpu/chromeos/platform_video_frame_pool.h"
#include "media/gpu/chromeos/video_decoder_pipeline.h"
#include "media/gpu/linux/platform_video_frame_pool.h"
#endif // BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
#if BUILDFLAG(USE_VAAPI)
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/gpu/linux/dmabuf_video_frame_pool.h"
#include "media/gpu/chromeos/dmabuf_video_frame_pool.h"
namespace media {
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_GPU_LINUX_DMABUF_VIDEO_FRAME_POOL_H_
#define MEDIA_GPU_LINUX_DMABUF_VIDEO_FRAME_POOL_H_
#ifndef MEDIA_GPU_CHROMEOS_DMABUF_VIDEO_FRAME_POOL_H_
#define MEDIA_GPU_CHROMEOS_DMABUF_VIDEO_FRAME_POOL_H_
#include "base/memory/scoped_refptr.h"
#include "base/optional.h"
......@@ -72,4 +72,4 @@ class MEDIA_GPU_EXPORT DmabufVideoFramePool {
} // namespace media
#endif // MEDIA_GPU_LINUX_DMABUF_VIDEO_FRAME_POOL_H_
#endif // MEDIA_GPU_CHROMEOS_DMABUF_VIDEO_FRAME_POOL_H_
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/gpu/linux/platform_video_frame_pool.h"
#include "media/gpu/chromeos/platform_video_frame_pool.h"
#include <utility>
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_GPU_LINUX_PLATFORM_VIDEO_FRAME_POOL_H_
#define MEDIA_GPU_LINUX_PLATFORM_VIDEO_FRAME_POOL_H_
#ifndef MEDIA_GPU_CHROMEOS_PLATFORM_VIDEO_FRAME_POOL_H_
#define MEDIA_GPU_CHROMEOS_PLATFORM_VIDEO_FRAME_POOL_H_
#include <stddef.h>
#include <vector>
......@@ -18,7 +18,7 @@
#include "base/thread_annotations.h"
#include "media/base/video_frame.h"
#include "media/base/video_frame_layout.h"
#include "media/gpu/linux/dmabuf_video_frame_pool.h"
#include "media/gpu/chromeos/dmabuf_video_frame_pool.h"
#include "media/gpu/media_gpu_export.h"
namespace gpu {
......@@ -137,4 +137,4 @@ class MEDIA_GPU_EXPORT PlatformVideoFramePool : public DmabufVideoFramePool {
};
} // namespace media
#endif // MEDIA_GPU_LINUX_PLATFORM_VIDEO_FRAME_POOL_H_
#endif // MEDIA_GPU_CHROMEOS_PLATFORM_VIDEO_FRAME_POOL_H_
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/gpu/chromeos/platform_video_frame_pool.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
......@@ -13,7 +15,6 @@
#include "base/files/scoped_file.h"
#include "base/test/task_environment.h"
#include "base/threading/thread_task_runner_handle.h"
#include "media/gpu/linux/platform_video_frame_pool.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace media {
......
......@@ -9,8 +9,8 @@
#include "base/sequenced_task_runner.h"
#include "base/task/post_task.h"
#include "base/task/task_traits.h"
#include "media/gpu/linux/dmabuf_video_frame_pool.h"
#include "media/gpu/linux/platform_video_frame_pool.h"
#include "media/gpu/chromeos/dmabuf_video_frame_pool.h"
#include "media/gpu/chromeos/platform_video_frame_pool.h"
#include "media/gpu/macros.h"
namespace media {
......
......@@ -10,10 +10,6 @@ assert(use_v4l2_codec || use_vaapi)
source_set("common") {
defines = [ "MEDIA_GPU_IMPLEMENTATION" ]
sources = [
"dmabuf_video_frame_pool.cc",
"dmabuf_video_frame_pool.h",
"platform_video_frame_pool.cc",
"platform_video_frame_pool.h",
"platform_video_frame_utils.cc",
"platform_video_frame_utils.h",
]
......@@ -55,7 +51,6 @@ source_set("video_frame_mapper") {
source_set("unit_tests") {
testonly = true
sources = [
"platform_video_frame_pool_unittest.cc",
"platform_video_frame_utils_unittest.cc",
]
deps = [
......
......@@ -20,13 +20,10 @@
#include "media/gpu/test/video_player/video.h"
#if BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
#include "media/gpu/linux/platform_video_frame_pool.h"
#endif // BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
#if defined(OS_CHROMEOS)
#include "media/gpu/chromeos/chromeos_video_decoder_factory.h"
#include "media/gpu/chromeos/platform_video_frame_pool.h"
#include "media/gpu/chromeos/video_frame_converter.h"
#endif // defined(OS_CHROMEOS)
#endif // BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
namespace media {
namespace test {
......@@ -180,7 +177,7 @@ void VideoDecoderClient::CreateDecoderTask(bool* success,
LOG_ASSERT(!decoder_) << "Can't create decoder: already created";
if (decoder_client_config_.use_vd) {
#if defined(OS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
#if BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
if (decoder_client_config_.allocation_mode == AllocationMode::kImport) {
decoder_ = ChromeosVideoDecoderFactory::Create(
base::ThreadTaskRunnerHandle::Get(),
......@@ -189,7 +186,7 @@ void VideoDecoderClient::CreateDecoderTask(bool* success,
} else {
LOG(ERROR) << "VD-based video decoders only support import mode";
}
#endif // defined(OS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
#endif // BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
} else {
// The video decoder client expects decoders to use the VD interface. We
// can use the TestVDAVideoDecoder wrapper here to test VDA-based video
......
......@@ -12,9 +12,9 @@
#include "base/memory/ptr_util.h"
#include "base/task/post_task.h"
#include "media/base/video_util.h"
#include "media/gpu/chromeos/dmabuf_video_frame_pool.h"
#include "media/gpu/chromeos/fourcc.h"
#include "media/gpu/gpu_video_decode_accelerator_helpers.h"
#include "media/gpu/linux/dmabuf_video_frame_pool.h"
#include "media/gpu/macros.h"
#include "media/gpu/v4l2/v4l2_video_decoder_backend_stateless.h"
......
......@@ -12,7 +12,7 @@
#include "base/sequenced_task_runner.h"
#include "media/base/decode_status.h"
#include "media/base/video_decoder.h"
#include "media/gpu/linux/dmabuf_video_frame_pool.h"
#include "media/gpu/chromeos/dmabuf_video_frame_pool.h"
#include "media/gpu/v4l2/v4l2_decode_surface_handler.h"
#include "media/gpu/v4l2/v4l2_video_decoder_backend.h"
......
......@@ -14,8 +14,8 @@
#include "media/base/format_utils.h"
#include "media/base/video_frame.h"
#include "media/base/video_util.h"
#include "media/gpu/chromeos/dmabuf_video_frame_pool.h"
#include "media/gpu/gpu_video_decode_accelerator_helpers.h"
#include "media/gpu/linux/dmabuf_video_frame_pool.h"
#include "media/gpu/macros.h"
#include "media/gpu/vaapi/va_surface.h"
#include "media/gpu/vaapi/vaapi_h264_accelerator.h"
......
......@@ -50,7 +50,7 @@
#include "media/gpu/chromeos/chromeos_video_decoder_factory.h"
#if BUILDFLAG(USE_V4L2_CODEC) || BUILDFLAG(USE_VAAPI)
#include "media/gpu/chromeos/mailbox_video_frame_converter.h"
#include "media/gpu/linux/platform_video_frame_pool.h"
#include "media/gpu/chromeos/platform_video_frame_pool.h"
#endif // BUILDFLAG(USE_V4L2_CODEC) || BUILDFLAG(USE_VAAPI)
#endif // defined(OS_CHROMEOS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment