#include "overlay_video.h" COverlayVideo::COverlayVideo() { } void COverlayVideo::OnVideoData(const webrtc::VideoFrame& frame) { _broadcaster.OnFrame(frame); } void COverlayVideo::AddOrUpdateSink(rtc::VideoSinkInterface* sink, const rtc::VideoSinkWants& wants) { _broadcaster.AddOrUpdateSink(sink, wants); } void COverlayVideo::RemoveSink(rtc::VideoSinkInterface* sink) { _broadcaster.RemoveSink(sink); } rtc::scoped_refptr OpenOverlayVideoTrack(IOverlayVideo* cap) { // ANativeWindow* window=(ANativeWindow *)data; auto capturer = dynamic_cast(cap); if (capturer == nullptr) { return { }; } std::unique_ptr video_capture(capturer); rtc::scoped_refptr video_source = COverlayTrackSource::Create(std::move(video_capture)); return video_source; } IOverlayVideo* CreateOverlayVideo() { return new COverlayVideo(); }