#include "third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source.h"
#include "base/synchronization/lock.h"
#include "base/task/bind_post_task.h"
#include "base/task/single_thread_task_runner.h"
#include "third_party/blink/public/mojom/mediastream/media_stream.mojom-blink.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_source.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 {
PushableMediaStreamVideoSource::Broker::Broker(
PushableMediaStreamVideoSource* source)
: … { … }
void PushableMediaStreamVideoSource::Broker::OnClientStarted() { … }
void PushableMediaStreamVideoSource::Broker::OnClientStopped() { … }
bool PushableMediaStreamVideoSource::Broker::IsRunning() { … }
bool PushableMediaStreamVideoSource::Broker::CanDiscardAlpha() { … }
bool PushableMediaStreamVideoSource::Broker::RequireMappedFrame() { … }
void PushableMediaStreamVideoSource::Broker::PushFrame(
scoped_refptr<media::VideoFrame> video_frame,
base::TimeTicks estimated_capture_time) { … }
void PushableMediaStreamVideoSource::Broker::StopSource() { … }
bool PushableMediaStreamVideoSource::Broker::IsMuted() { … }
void PushableMediaStreamVideoSource::Broker::SetMuted(bool muted) { … }
void PushableMediaStreamVideoSource::Broker::OnSourceStarted(
VideoCaptureDeliverFrameCB frame_callback) { … }
void PushableMediaStreamVideoSource::Broker::OnSourceDestroyedOrStopped() { … }
void PushableMediaStreamVideoSource::Broker::StopSourceOnMain() { … }
void PushableMediaStreamVideoSource::Broker::SetCanDiscardAlpha(
bool can_discard_alpha) { … }
void PushableMediaStreamVideoSource::Broker::ProcessFeedback(
const media::VideoCaptureFeedback& feedback) { … }
PushableMediaStreamVideoSource::PushableMediaStreamVideoSource(
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner)
: … { … }
PushableMediaStreamVideoSource::~PushableMediaStreamVideoSource() { … }
void PushableMediaStreamVideoSource::PushFrame(
scoped_refptr<media::VideoFrame> video_frame,
base::TimeTicks estimated_capture_time) { … }
void PushableMediaStreamVideoSource::StartSourceImpl(
VideoCaptureDeliverFrameCB frame_callback,
EncodedVideoFrameCB encoded_frame_callback,
VideoCaptureSubCaptureTargetVersionCB sub_capture_target_version_callback,
VideoCaptureNotifyFrameDroppedCB) { … }
void PushableMediaStreamVideoSource::StopSourceImpl() { … }
base::WeakPtr<MediaStreamVideoSource>
PushableMediaStreamVideoSource::GetWeakPtr() { … }
void PushableMediaStreamVideoSource::OnSourceCanDiscardAlpha(
bool can_discard_alpha) { … }
media::VideoCaptureFeedbackCB
PushableMediaStreamVideoSource::GetFeedbackCallback() const { … }
void PushableMediaStreamVideoSource::ProcessFeedbackInternal(
const media::VideoCaptureFeedback& feedback) { … }
}