Index: webrtc/test/frame_generator.cc |
diff --git a/webrtc/test/frame_generator.cc b/webrtc/test/frame_generator.cc |
index 2ae739a01fa2dee99f14869cf0d3644fdaff4cae..eeb0b0f9e5c1ed099f281f881b993f0e19a41bec 100644 |
--- a/webrtc/test/frame_generator.cc |
+++ b/webrtc/test/frame_generator.cc |
@@ -258,6 +258,7 @@ void FrameForwarder::AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, |
rtc::CritScope lock(&crit_); |
RTC_DCHECK(!sink_ || sink_ == sink); |
sink_ = sink; |
+ sink_wants_ = wants; |
} |
void FrameForwarder::RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) { |
@@ -266,6 +267,16 @@ void FrameForwarder::RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) { |
sink_ = nullptr; |
} |
+rtc::VideoSinkWants FrameForwarder::sink_wants() const { |
+ rtc::CritScope lock(&crit_); |
+ return sink_wants_; |
+} |
+ |
+bool FrameForwarder::has_sinks() const { |
+ rtc::CritScope lock(&crit_); |
+ return sink_ != nullptr; |
+} |
+ |
FrameGenerator* FrameGenerator::CreateChromaGenerator(size_t width, |
size_t height) { |
return new ChromaGenerator(width, height); |