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

Unified Diff: webrtc/test/frame_generator.cc

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.h ('k') | webrtc/test/frame_generator_capturer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « webrtc/test/frame_generator.h ('k') | webrtc/test/frame_generator_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698