Replace VideoCapturerInput with VideoSinkInterface.
Adds new method VideoSendStream::SetSource(rtc::VideoSourceInterface* and VieEncoder::SetSource(rtc::VideoSourceInterface*) This is the first step needed in order for the ViEEncoder to request downscaling using rtc::VideoSinkWants instead of separately reporting CPU overuse and internally doing downscaling due to QP values. BUG=webrtc:5687 // Android CQ seems broken. NOTRY=true Review-Url: https://codereview.webrtc.org/2257413002 Cr-Commit-Position: refs/heads/master@{#14238}
This commit is contained in:
@ -239,6 +239,27 @@ class ScrollingImageFrameGenerator : public FrameGenerator {
|
||||
|
||||
} // namespace
|
||||
|
||||
FrameForwarder::FrameForwarder() : sink_(nullptr) {}
|
||||
|
||||
void FrameForwarder::IncomingCapturedFrame(const VideoFrame& video_frame) {
|
||||
rtc::CritScope lock(&crit_);
|
||||
if (sink_)
|
||||
sink_->OnFrame(video_frame);
|
||||
}
|
||||
|
||||
void FrameForwarder::AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink,
|
||||
const rtc::VideoSinkWants& wants) {
|
||||
rtc::CritScope lock(&crit_);
|
||||
RTC_DCHECK(!sink_ || sink_ == sink);
|
||||
sink_ = sink;
|
||||
}
|
||||
|
||||
void FrameForwarder::RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) {
|
||||
rtc::CritScope lock(&crit_);
|
||||
RTC_DCHECK_EQ(sink, sink_);
|
||||
sink_ = nullptr;
|
||||
}
|
||||
|
||||
FrameGenerator* FrameGenerator::CreateChromaGenerator(size_t width,
|
||||
size_t height) {
|
||||
return new ChromaGenerator(width, height);
|
||||
|
||||
Reference in New Issue
Block a user