#include "remoting/protocol/webrtc_video_track_source.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/task/sequenced_task_runner.h"
#include "remoting/protocol/webrtc_video_frame_adapter.h"
namespace remoting::protocol {
WebrtcVideoTrackSource::WebrtcVideoTrackSource(
AddSinkCallback add_sink_callback)
: … { … }
WebrtcVideoTrackSource::~WebrtcVideoTrackSource() = default;
webrtc::MediaSourceInterface::SourceState WebrtcVideoTrackSource::state()
const { … }
bool WebrtcVideoTrackSource::remote() const { … }
bool WebrtcVideoTrackSource::is_screencast() const { … }
std::optional<bool> WebrtcVideoTrackSource::needs_denoising() const { … }
bool WebrtcVideoTrackSource::GetStats(
webrtc::VideoTrackSourceInterface::Stats* stats) { … }
void WebrtcVideoTrackSource::AddOrUpdateSink(
rtc::VideoSinkInterface<webrtc::VideoFrame>* sink,
const rtc::VideoSinkWants& wants) { … }
void WebrtcVideoTrackSource::RemoveSink(
rtc::VideoSinkInterface<webrtc::VideoFrame>* sink) { … }
bool WebrtcVideoTrackSource::SupportsEncodedOutput() const { … }
void WebrtcVideoTrackSource::GenerateKeyFrame() { … }
void WebrtcVideoTrackSource::AddEncodedSink(
rtc::VideoSinkInterface<webrtc::RecordableEncodedFrame>* sink) { … }
void WebrtcVideoTrackSource::RemoveEncodedSink(
rtc::VideoSinkInterface<webrtc::RecordableEncodedFrame>* sink) { … }
void WebrtcVideoTrackSource::SendCapturedFrame(
std::unique_ptr<webrtc::DesktopFrame> desktop_frame,
std::unique_ptr<WebrtcVideoEncoder::FrameStats> frame_stats) { … }
}