#include "components/media_effects/test/fake_video_source.h"
#include "media/capture/mojom/video_capture_buffer.mojom-forward.h"
#include "media/capture/mojom/video_capture_buffer.mojom.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "services/video_capture/public/cpp/mock_push_subscription.h"
#include "services/video_capture/public/mojom/video_frame_handler.mojom.h"
#include "services/video_capture/public/mojom/video_source.mojom.h"
_;
namespace {
media::mojom::VideoBufferHandlePtr GetBufferHandler(
const gfx::Size& frame_size) { … }
}
FakeVideoSource::FakeVideoSource()
: … { … }
FakeVideoSource::~FakeVideoSource() = default;
void FakeVideoSource::CreatePushSubscription(
mojo::PendingRemote<video_capture::mojom::VideoFrameHandler> subscriber,
const media::VideoCaptureParams& requested_settings,
bool force_reopen_with_new_settings,
mojo::PendingReceiver<video_capture::mojom::PushVideoStreamSubscription>
subscription,
CreatePushSubscriptionCallback callback) { … }
bool FakeVideoSource::WaitForCreatePushSubscription() { … }
bool FakeVideoSource::WaitForPushSubscriptionActivated() { … }
bool FakeVideoSource::WaitForPushSubscriptionClosed() { … }
void FakeVideoSource::SendFrame() { … }
void FakeVideoSource::SendError(media::VideoCaptureError error) { … }