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

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

Issue 2383493005: Revert of Let ViEEncoder handle resolution changes. (Closed)
Patch Set: 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
132 void FrameGeneratorCapturer::AddOrUpdateSink( 127 void FrameGeneratorCapturer::AddOrUpdateSink(
133 rtc::VideoSinkInterface<VideoFrame>* sink, 128 rtc::VideoSinkInterface<VideoFrame>* sink,
134 const rtc::VideoSinkWants& wants) { 129 const rtc::VideoSinkWants& wants) {
135 rtc::CritScope cs(&lock_); 130 rtc::CritScope cs(&lock_);
136 RTC_CHECK(!sink_); 131 RTC_CHECK(!sink_);
137 sink_ = sink; 132 sink_ = sink;
138 } 133 }
139 134
140 void FrameGeneratorCapturer::RemoveSink( 135 void FrameGeneratorCapturer::RemoveSink(
141 rtc::VideoSinkInterface<VideoFrame>* sink) { 136 rtc::VideoSinkInterface<VideoFrame>* sink) {
142 rtc::CritScope cs(&lock_); 137 rtc::CritScope cs(&lock_);
143 RTC_CHECK(sink_ == sink); 138 RTC_CHECK(sink_ == sink);
144 sink_ = nullptr; 139 sink_ = nullptr;
145 } 140 }
146 141
147 void FrameGeneratorCapturer::ForceFrame() { 142 void FrameGeneratorCapturer::ForceFrame() {
148 tick_->Set(); 143 tick_->Set();
149 } 144 }
150 } // test 145 } // test
151 } // webrtc 146 } // 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