#include "services/video_capture/public/cpp/mock_video_frame_handler.h"
#include "base/containers/contains.h"
#include "base/ranges/algorithm.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
_;
namespace video_capture {
MockVideoFrameHandler::MockVideoFrameHandler(
mojo::PendingReceiver<mojom::VideoFrameHandler> handler)
: … { … }
MockVideoFrameHandler::~MockVideoFrameHandler() = default;
void MockVideoFrameHandler::HoldAccessPermissions() { … }
void MockVideoFrameHandler::ReleaseAccessedFrames() { … }
void MockVideoFrameHandler::OnNewBuffer(
int32_t buffer_id,
media::mojom::VideoBufferHandlePtr buffer_handle) { … }
void MockVideoFrameHandler::OnFrameAccessHandlerReady(
mojo::PendingRemote<video_capture::mojom::VideoFrameAccessHandler>
pending_frame_access_handler) { … }
void MockVideoFrameHandler::OnFrameReadyInBuffer(
mojom::ReadyFrameInBufferPtr buffer) { … }
void MockVideoFrameHandler::OnBufferRetired(int32_t buffer_id) { … }
FakeVideoFrameAccessHandler::FakeVideoFrameAccessHandler()
: … { … }
FakeVideoFrameAccessHandler::FakeVideoFrameAccessHandler(
base::RepeatingCallback<void(int32_t)> callback)
: … { … }
FakeVideoFrameAccessHandler::~FakeVideoFrameAccessHandler() = default;
const std::vector<int32_t>& FakeVideoFrameAccessHandler::released_buffer_ids()
const { … }
void FakeVideoFrameAccessHandler::ClearReleasedBufferIds() { … }
void FakeVideoFrameAccessHandler::OnFinishedConsumingBuffer(int32_t buffer_id) { … }
}