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

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

Issue 2763023002: Propagate input capture time in ViEEncoder::OnFrame. (Closed)
Patch Set: Undo change to FrameGenerators, only FrameGeneratorCapturer need to set timestamp. Created 3 years, 6 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 | « no previous file | webrtc/test/frame_generator_capturer.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) 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); 119 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
120 return encoder_->SetPeriodicKeyFrames(enable); 120 return encoder_->SetPeriodicKeyFrames(enable);
121 } 121 }
122 122
123 int32_t VCMGenericEncoder::RequestFrame( 123 int32_t VCMGenericEncoder::RequestFrame(
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 126
127 // TODO(nisse): Used only with internal source. Delete as soon as 127 // TODO(nisse): Used only with internal source. Delete as soon as
128 // that feature is removed. The only implementation I've been able 128 // that feature is removed. The only implementation I've been able
129 // to find ignores what's in the frame. 129 // to find ignores what's in the frame. With one exception: It seems
130 // a few test cases, e.g.,
131 // VideoSendStreamTest.VideoSendStreamStopSetEncoderRateToZero, set
132 // internal_source to true and use FakeEncoder. And the latter will
133 // happily encode this 1x1 frame and pass it on down the pipeline.
130 return encoder_->Encode(VideoFrame(I420Buffer::Create(1, 1), 134 return encoder_->Encode(VideoFrame(I420Buffer::Create(1, 1),
131 kVideoRotation_0, 0), 135 kVideoRotation_0, 0),
132 NULL, &frame_types); 136 NULL, &frame_types);
133 return 0; 137 return 0;
134 } 138 }
135 139
136 bool VCMGenericEncoder::InternalSource() const { 140 bool VCMGenericEncoder::InternalSource() const {
137 return internal_source_; 141 return internal_source_;
138 } 142 }
139 143
(...skipping 26 matching lines...) Expand all
166 media_opt_->UpdateWithEncodedData(encoded_image); 170 media_opt_->UpdateWithEncodedData(encoded_image);
167 if (internal_source_) { 171 if (internal_source_) {
168 // Signal to encoder to drop next frame. 172 // Signal to encoder to drop next frame.
169 result.drop_next_frame = media_opt_->DropFrame(); 173 result.drop_next_frame = media_opt_->DropFrame();
170 } 174 }
171 } 175 }
172 return result; 176 return result;
173 } 177 }
174 178
175 } // namespace webrtc 179 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/test/frame_generator_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698