Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Unified Diff: webrtc/test/frame_generator_capturer.h

Issue 2304363002: Let ViEEncoder express resolution requests as Sinkwants (Closed)
Patch Set: Rebased. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/test/frame_generator.cc ('k') | webrtc/test/frame_generator_capturer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « webrtc/test/frame_generator.cc ('k') | webrtc/test/frame_generator_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698