1 #ifndef OPENTERA_WEBRTC_NATIVE_CLIENT_SOURCES_VIDEO_SOURCE_H
2 #define OPENTERA_WEBRTC_NATIVE_CLIENT_SOURCES_VIDEO_SOURCE_H
4 #include <OpenteraWebrtcNativeClient/Configurations/VideoSourceConfiguration.h>
5 #include <OpenteraWebrtcNativeClient/Utils/ClassMacro.h>
7 #include <media/base/adapted_video_track_source.h>
8 #include <opencv2/core/mat.hpp>
9 #include <rtc_base/ref_counted_object.h>
33 void sendFrame(
const cv::Mat& bgrImg, int64_t timestampUs);
37 bool remote()
const override;
38 webrtc::MediaSourceInterface::SourceState
state()
const override;
42 void AddRef()
const override;
43 rtc::RefCountReleaseStatus Release()
const override;
70 return webrtc::MediaSourceInterface::kLive;
Represents a configuration of a video source that can be added to a WebRTC call.
Definition: VideoSourceConfiguration.h:10
bool isScreencast() const
Indicates if this source is screencast.
Definition: VideoSourceConfiguration.h:52
bool needsDenoising() const
Indicates if this source needs denoising.
Definition: VideoSourceConfiguration.h:46
Represents a video source that can be added to a WebRTC call.
Definition: VideoSource.h:21
bool remote() const override
Indicates if this source is remote.
Definition: VideoSource.h:62
VideoSource(VideoSourceConfiguration configuration)
Creates a VideoSource.
Definition: VideoSource.cpp:16
bool is_screencast() const override
Indicates if this source is screencast.
Definition: VideoSource.h:50
void sendFrame(const cv::Mat &bgrImg, int64_t timestampUs)
Sends a frame to the WebRTC transport layer.
Definition: VideoSource.cpp:27
absl::optional< bool > needs_denoising() const override
Indicates if this source needs denoising.
Definition: VideoSource.h:56
webrtc::MediaSourceInterface::SourceState state() const override
Indicates if this source is live.
Definition: VideoSource.h:68