#include "content/browser/renderer_host/media/video_capture_controller.h"
#include <stdint.h>
#include <string.h>
#include <memory>
#include <string>
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/task/single_thread_task_runner.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/browser/renderer_host/media/media_stream_provider.h"
#include "content/browser/renderer_host/media/mock_video_capture_provider.h"
#include "content/browser/renderer_host/media/video_capture_controller_event_handler.h"
#include "content/browser/renderer_host/media/video_capture_manager.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/browser_task_environment.h"
#include "media/base/video_frame_metadata.h"
#include "media/base/video_util.h"
#include "media/capture/video/video_capture_buffer_pool_impl.h"
#include "media/capture/video/video_capture_buffer_pool_util.h"
#include "media/capture/video/video_capture_buffer_tracker_factory_impl.h"
#include "media/capture/video/video_capture_device_client.h"
#include "media/capture/video/video_frame_receiver_on_task_runner.h"
#include "media/capture/video_capture_types.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "media/capture/video/chromeos/video_capture_jpeg_decoder_impl.h"
#endif
_;
AnyNumber;
InSequence;
Mock;
NiceMock;
SaveArg;
StrEq;
namespace content {
namespace {
struct ControllerIDAndSize { … };
bool operator==(const ControllerIDAndSize& x, const ControllerIDAndSize& y) { … }
class MockVideoCaptureControllerEventHandler
: public VideoCaptureControllerEventHandler { … };
class VideoCaptureControllerTest
: public testing::Test,
public testing::WithParamInterface<media::VideoPixelFormat> { … };
TEST_F(VideoCaptureControllerTest, AddAndRemoveClients) { … }
TEST_P(VideoCaptureControllerTest, NormalCaptureMultipleClients) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(VideoCaptureControllerTest, ErrorBeforeDeviceCreation) { … }
TEST_F(VideoCaptureControllerTest, ErrorAfterDeviceCreation) { … }
TEST_F(VideoCaptureControllerTest, FrameFeedbackIsReportedForSequenceOfFrames) { … }
TEST_F(VideoCaptureControllerTest,
DeviceClientIsReleasedBeforeAnyBufferWasShared) { … }
TEST_F(VideoCaptureControllerTest,
DeviceClientIsReleasedAfterFrameHasBeenConsumed) { … }
TEST_F(VideoCaptureControllerTest,
DeviceClientIsReleasedWhileFrameIsBeingConsumed) { … }
TEST_F(VideoCaptureControllerTest,
NewDeviceClientSendsNewBufferWhileRetiredBufferStillBeingConsumed) { … }
TEST_F(VideoCaptureControllerTest, OnStartedForMultipleClients) { … }
TEST_F(VideoCaptureControllerTest, OnFrameDroppedIsForwarded) { … }
TEST_F(VideoCaptureControllerTest, DeviceClientWithColorSpace) { … }
}
}