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

Side by Side Diff: webrtc/modules/video_coding/generic_encoder.cc

Issue 2398963003: Move usage of QualityScaler to ViEEncoder. (Closed)
Patch Set: rebase Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 const std::vector<FrameType>& frame_types) { 124 const std::vector<FrameType>& frame_types) {
125 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); 125 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
126 VideoFrame image; 126 VideoFrame image;
127 return encoder_->Encode(image, NULL, &frame_types); 127 return encoder_->Encode(image, NULL, &frame_types);
128 } 128 }
129 129
130 bool VCMGenericEncoder::InternalSource() const { 130 bool VCMGenericEncoder::InternalSource() const {
131 return internal_source_; 131 return internal_source_;
132 } 132 }
133 133
134 void VCMGenericEncoder::OnDroppedFrame() {
135 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
136 encoder_->OnDroppedFrame();
137 }
138
139 bool VCMGenericEncoder::SupportsNativeHandle() const { 134 bool VCMGenericEncoder::SupportsNativeHandle() const {
140 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); 135 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
141 return encoder_->SupportsNativeHandle(); 136 return encoder_->SupportsNativeHandle();
142 } 137 }
143 138
144 VCMEncodedFrameCallback::VCMEncodedFrameCallback( 139 VCMEncodedFrameCallback::VCMEncodedFrameCallback(
145 EncodedImageCallback* post_encode_callback, 140 EncodedImageCallback* post_encode_callback,
146 media_optimization::MediaOptimization* media_opt) 141 media_optimization::MediaOptimization* media_opt)
147 : internal_source_(false), 142 : internal_source_(false),
148 post_encode_callback_(post_encode_callback), 143 post_encode_callback_(post_encode_callback),
(...skipping 16 matching lines...) Expand all
165 media_opt_->UpdateWithEncodedData(encoded_image); 160 media_opt_->UpdateWithEncodedData(encoded_image);
166 if (internal_source_) { 161 if (internal_source_) {
167 // Signal to encoder to drop next frame. 162 // Signal to encoder to drop next frame.
168 result.drop_next_frame = media_opt_->DropFrame(); 163 result.drop_next_frame = media_opt_->DropFrame();
169 } 164 }
170 } 165 }
171 return result; 166 return result;
172 } 167 }
173 168
174 } // namespace webrtc 169 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp9/vp9_impl.h ('k') | webrtc/modules/video_coding/utility/quality_scaler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698