24#include <absl/types/optional.h>
25#include <api/notifier.h>
26#include <api/sequence_checker.h>
27#include <api/video/recordable_encoded_frame.h>
28#include <api/video/video_frame.h>
29#include <api/video/video_sink_interface.h>
30#include <api/video/video_source_interface.h>
31#include <media/base/media_channel.h>
37namespace visualization {
38namespace webrtc_server {
58 virtual void OnFrame(
const std::shared_ptr<core::Tensor>&
frame) = 0;
64 void SetState(webrtc::MediaSourceInterface::SourceState new_state);
65 webrtc::MediaSourceInterface::SourceState
state()
const override {
68 bool remote()
const override {
return remote_; }
73 bool GetStats(Stats* stats)
override {
return false; }
74 void AddOrUpdateSink(webrtc::VideoSinkInterface<webrtc::VideoFrame>* sink,
75 const webrtc::VideoSinkWants& wants)
override;
77 webrtc::VideoSinkInterface<webrtc::VideoFrame>* sink)
override;
81 webrtc::VideoSinkInterface<webrtc::RecordableEncodedFrame>* sink)
84 webrtc::VideoSinkInterface<webrtc::RecordableEncodedFrame>* sink)
87 virtual void OnFrame(
const std::shared_ptr<core::Tensor>&
frame)
override {
89 utility::LogError(
"BitmapTrackSource::OnFrame called");
93 virtual webrtc::VideoSourceInterface<webrtc::VideoFrame>*
source() = 0;
96 webrtc::SequenceChecker worker_thread_checker_;
97 webrtc::MediaSourceInterface::SourceState state_;
Rect frame
Definition BitmapWindowSystem.cpp:31
Definition BitmapTrackSource.h:61
virtual void OnFrame(const std::shared_ptr< core::Tensor > &frame) override
Definition BitmapTrackSource.h:87
bool SupportsEncodedOutput() const override
Definition BitmapTrackSource.h:78
bool GetStats(Stats *stats) override
Definition BitmapTrackSource.h:73
virtual webrtc::VideoSourceInterface< webrtc::VideoFrame > * source()=0
void AddEncodedSink(webrtc::VideoSinkInterface< webrtc::RecordableEncodedFrame > *sink) override
Definition BitmapTrackSource.h:80
bool remote() const override
Definition BitmapTrackSource.h:68
absl::optional< bool > needs_denoising() const override
Definition BitmapTrackSource.h:70
void RemoveSink(webrtc::VideoSinkInterface< webrtc::VideoFrame > *sink) override
Definition BitmapTrackSource.cpp:48
void RemoveEncodedSink(webrtc::VideoSinkInterface< webrtc::RecordableEncodedFrame > *sink) override
Definition BitmapTrackSource.h:83
void AddOrUpdateSink(webrtc::VideoSinkInterface< webrtc::VideoFrame > *sink, const webrtc::VideoSinkWants &wants) override
Definition BitmapTrackSource.cpp:41
void SetState(webrtc::MediaSourceInterface::SourceState new_state)
Definition BitmapTrackSource.cpp:33
webrtc::MediaSourceInterface::SourceState state() const override
Definition BitmapTrackSource.h:65
bool is_screencast() const override
Definition BitmapTrackSource.h:69
void GenerateKeyFrame() override
Definition BitmapTrackSource.h:79
Definition BitmapTrackSource.h:56
virtual void OnFrame(const std::shared_ptr< core::Tensor > &frame)=0
Definition PinholeCameraIntrinsic.cpp:16