#include "third_party/blink/renderer/modules/mediastream/mock_media_stream_video_source.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "third_party/blink/public/mojom/mediastream/media_stream.mojom-blink.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
#include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier_media.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
namespace blink {
MockMediaStreamVideoSource::MockMediaStreamVideoSource()
: … { … }
MockMediaStreamVideoSource::MockMediaStreamVideoSource(
bool respond_to_request_refresh_frame)
: … { … }
MockMediaStreamVideoSource::MockMediaStreamVideoSource(
const media::VideoCaptureFormat& format,
bool respond_to_request_refresh_frame)
: … { … }
MockMediaStreamVideoSource::~MockMediaStreamVideoSource() = default;
void MockMediaStreamVideoSource::StartMockedSource() { … }
void MockMediaStreamVideoSource::FailToStartMockedSource() { … }
void MockMediaStreamVideoSource::RequestKeyFrame() { … }
void MockMediaStreamVideoSource::RequestRefreshFrame() { … }
void MockMediaStreamVideoSource::OnHasConsumers(bool has_consumers) { … }
base::WeakPtr<MediaStreamVideoSource> MockMediaStreamVideoSource::GetWeakPtr() { … }
void MockMediaStreamVideoSource::DoChangeSource(
const MediaStreamDevice& new_device) { … }
void MockMediaStreamVideoSource::StartSourceImpl(
VideoCaptureDeliverFrameCB frame_callback,
EncodedVideoFrameCB encoded_frame_callback,
VideoCaptureSubCaptureTargetVersionCB sub_capture_target_version_callback,
VideoCaptureNotifyFrameDroppedCB frame_dropped_callback) { … }
void MockMediaStreamVideoSource::StopSourceImpl() { … }
std::optional<media::VideoCaptureFormat>
MockMediaStreamVideoSource::GetCurrentFormat() const { … }
void MockMediaStreamVideoSource::DeliverVideoFrame(
scoped_refptr<media::VideoFrame> frame) { … }
void MockMediaStreamVideoSource::DeliverEncodedVideoFrame(
scoped_refptr<EncodedVideoFrame> frame) { … }
void MockMediaStreamVideoSource::DropFrame(
media::VideoCaptureFrameDropReason reason) { … }
void MockMediaStreamVideoSource::DeliverNewSubCaptureTargetVersion(
uint32_t sub_capture_target_version) { … }
void MockMediaStreamVideoSource::StopSourceForRestartImpl() { … }
void MockMediaStreamVideoSource::RestartSourceImpl(
const media::VideoCaptureFormat& new_format) { … }
}