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>
37 namespace visualization {
38 namespace 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; }
75 const rtc::VideoSinkWants& wants)
override;
76 void RemoveSink(rtc::VideoSinkInterface<webrtc::VideoFrame>* sink)
override;
82 rtc::VideoSinkInterface<webrtc::RecordableEncodedFrame>* sink)
85 virtual void OnFrame(
const std::shared_ptr<core::Tensor>&
frame)
override {
91 virtual rtc::VideoSourceInterface<webrtc::VideoFrame>*
source() = 0;
94 webrtc::SequenceChecker worker_thread_checker_;
95 webrtc::MediaSourceInterface::SourceState state_;
Rect frame
Definition: BitmapWindowSystem.cpp:30
#define LogError(...)
Definition: Logging.h:48
Definition: BitmapTrackSource.h:61
virtual void OnFrame(const std::shared_ptr< core::Tensor > &frame) override
Definition: BitmapTrackSource.h:85
bool SupportsEncodedOutput() const override
Definition: BitmapTrackSource.h:77
bool GetStats(Stats *stats) override
Definition: BitmapTrackSource.h:73
void RemoveEncodedSink(rtc::VideoSinkInterface< webrtc::RecordableEncodedFrame > *sink) override
Definition: BitmapTrackSource.h:81
void RemoveSink(rtc::VideoSinkInterface< webrtc::VideoFrame > *sink) override
Definition: BitmapTrackSource.cpp:48
absl::optional< bool > needs_denoising() const override
Definition: BitmapTrackSource.h:70
BitmapTrackSource(bool remote)
Definition: BitmapTrackSource.cpp:28
bool remote() const override
Definition: BitmapTrackSource.h:68
void AddEncodedSink(rtc::VideoSinkInterface< webrtc::RecordableEncodedFrame > *sink) override
Definition: BitmapTrackSource.h:79
void AddOrUpdateSink(rtc::VideoSinkInterface< webrtc::VideoFrame > *sink, const rtc::VideoSinkWants &wants) override
Definition: BitmapTrackSource.cpp:41
virtual rtc::VideoSourceInterface< webrtc::VideoFrame > * source()=0
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:78
Definition: BitmapTrackSource.h:56
virtual void OnFrame(const std::shared_ptr< core::Tensor > &frame)=0
constexpr nullopt_t nullopt
Definition: Optional.h:152
Definition: PinholeCameraIntrinsic.cpp:16