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

Side by Side Diff: webrtc/test/frame_generator_capturer.cc

Issue 2351633002: Let ViEEncoder handle resolution changes. (Closed)
Patch Set: rebased Created 4 years, 2 months 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 unified diff | Download patch
« no previous file with comments | « webrtc/test/frame_generator_capturer.h ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void FrameGeneratorCapturer::Start() { 117 void FrameGeneratorCapturer::Start() {
118 rtc::CritScope cs(&lock_); 118 rtc::CritScope cs(&lock_);
119 sending_ = true; 119 sending_ = true;
120 } 120 }
121 121
122 void FrameGeneratorCapturer::Stop() { 122 void FrameGeneratorCapturer::Stop() {
123 rtc::CritScope cs(&lock_); 123 rtc::CritScope cs(&lock_);
124 sending_ = false; 124 sending_ = false;
125 } 125 }
126 126
127 void FrameGeneratorCapturer::ChangeResolution(size_t width, size_t height) {
128 rtc::CritScope cs(&lock_);
129 frame_generator_->ChangeResolution(width, height);
130 }
131
127 void FrameGeneratorCapturer::AddOrUpdateSink( 132 void FrameGeneratorCapturer::AddOrUpdateSink(
128 rtc::VideoSinkInterface<VideoFrame>* sink, 133 rtc::VideoSinkInterface<VideoFrame>* sink,
129 const rtc::VideoSinkWants& wants) { 134 const rtc::VideoSinkWants& wants) {
130 rtc::CritScope cs(&lock_); 135 rtc::CritScope cs(&lock_);
131 RTC_CHECK(!sink_); 136 RTC_CHECK(!sink_);
132 sink_ = sink; 137 sink_ = sink;
133 } 138 }
134 139
135 void FrameGeneratorCapturer::RemoveSink( 140 void FrameGeneratorCapturer::RemoveSink(
136 rtc::VideoSinkInterface<VideoFrame>* sink) { 141 rtc::VideoSinkInterface<VideoFrame>* sink) {
137 rtc::CritScope cs(&lock_); 142 rtc::CritScope cs(&lock_);
138 RTC_CHECK(sink_ == sink); 143 RTC_CHECK(sink_ == sink);
139 sink_ = nullptr; 144 sink_ = nullptr;
140 } 145 }
141 146
142 void FrameGeneratorCapturer::ForceFrame() { 147 void FrameGeneratorCapturer::ForceFrame() {
143 tick_->Set(); 148 tick_->Set();
144 } 149 }
145 } // test 150 } // test
146 } // webrtc 151 } // webrtc
OLDNEW
« no previous file with comments | « webrtc/test/frame_generator_capturer.h ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698