Index: webrtc/test/frame_generator_capturer.h |
diff --git a/webrtc/test/frame_generator_capturer.h b/webrtc/test/frame_generator_capturer.h |
index fa001c4edff071a3da446e3aaad95538ece842d2..01bc04b688c66348471cf2ae22bdaa290faed9b9 100644 |
--- a/webrtc/test/frame_generator_capturer.h |
+++ b/webrtc/test/frame_generator_capturer.h |
@@ -31,6 +31,17 @@ class FrameGenerator; |
class FrameGeneratorCapturer : public VideoCapturer { |
public: |
+ class SinkWantsObserver { |
+ public: |
+ // OnSinkWantsChanged is called when FrameGeneratorCapturer::AddOrUpdateSink |
+ // is called. |
+ virtual void OnSinkWantsChanged(rtc::VideoSinkInterface<VideoFrame>* sink, |
+ const rtc::VideoSinkWants& wants) = 0; |
+ |
+ protected: |
+ virtual ~SinkWantsObserver() {} |
+ }; |
+ |
static FrameGeneratorCapturer* Create(size_t width, |
size_t height, |
int target_fps, |
@@ -47,6 +58,8 @@ class FrameGeneratorCapturer : public VideoCapturer { |
void Stop() override; |
void ChangeResolution(size_t width, size_t height); |
+ void SetSinkWantsObserver(SinkWantsObserver* observer); |
+ |
void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, |
const rtc::VideoSinkWants& wants) override; |
void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override; |
@@ -68,6 +81,7 @@ class FrameGeneratorCapturer : public VideoCapturer { |
Clock* const clock_; |
bool sending_; |
rtc::VideoSinkInterface<VideoFrame>* sink_ GUARDED_BY(&lock_); |
+ SinkWantsObserver* sink_wants_observer_ GUARDED_BY(&lock_); |
std::unique_ptr<EventTimerWrapper> tick_; |
rtc::CriticalSection lock_; |