#include "media/capture/video/video_capture_effects_processor.h"
#include <numeric>
#include <optional>
#include "base/memory/scoped_refptr.h"
#include "base/notreached.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "base/time/time.h"
#include "components/viz/test/test_context_provider.h"
#include "gpu/command_buffer/client/shared_image_interface.h"
#include "gpu/command_buffer/client/test_gpu_memory_buffer_manager.h"
#include "media/base/video_frame_metadata.h"
#include "media/base/video_types.h"
#include "media/capture/mojom/video_capture_buffer.mojom.h"
#include "media/capture/video/video_capture_device.h"
#include "media/capture/video/video_capture_gpu_channel_host.h"
#include "media/capture/video_capture_types.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "services/video_effects/public/mojom/video_effects_processor.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/color_space.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
namespace media {
namespace {
size_t GetBitsPerPixel(VideoPixelFormat format) { … }
class HandleProvider
: public VideoCaptureDevice::Client::Buffer::HandleProvider { … };
class ScopedAccessPermission
: public VideoCaptureDevice::Client::Buffer::ScopedAccessPermission { … };
class VideoEffectsProcessor
: public video_effects::mojom::VideoEffectsProcessor { … };
constexpr gfx::Size kValidFrameSize = …;
constexpr base::TimeDelta kValidTimeDelta = …;
constexpr float kValidFrameRate = …;
}
class VideoCaptureEffectsProcessorTest
: public testing::TestWithParam<VideoPixelFormat> { … };
TEST_P(VideoCaptureEffectsProcessorTest, PostProcessDataSucceeds) { … }
TEST_P(VideoCaptureEffectsProcessorTest, PostProcessBufferSucceeds) { … }
INSTANTIATE_TEST_SUITE_P(…);
}