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

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

Issue 2911193002: Implement timing frames. (Closed)
Patch Set: Implement Holmer@ comments 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 | « webrtc/test/constants.cc ('k') | 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) 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 encoded._timeStamp = input_image.timestamp(); 141 encoded._timeStamp = input_image.timestamp();
142 encoded.capture_time_ms_ = input_image.render_time_ms(); 142 encoded.capture_time_ms_ = input_image.render_time_ms();
143 encoded._frameType = (*frame_types)[i]; 143 encoded._frameType = (*frame_types)[i];
144 encoded._encodedWidth = simulcast_streams[i].width; 144 encoded._encodedWidth = simulcast_streams[i].width;
145 encoded._encodedHeight = simulcast_streams[i].height; 145 encoded._encodedHeight = simulcast_streams[i].height;
146 encoded.rotation_ = input_image.rotation(); 146 encoded.rotation_ = input_image.rotation();
147 encoded.content_type_ = (mode == kScreensharing) 147 encoded.content_type_ = (mode == kScreensharing)
148 ? VideoContentType::SCREENSHARE 148 ? VideoContentType::SCREENSHARE
149 : VideoContentType::UNSPECIFIED; 149 : VideoContentType::UNSPECIFIED;
150 specifics.codec_name = ImplementationName(); 150 specifics.codec_name = ImplementationName();
151 specifics.codecSpecific.generic.simulcast_idx = i;
151 RTC_DCHECK(callback); 152 RTC_DCHECK(callback);
152 if (callback->OnEncodedImage(encoded, &specifics, nullptr).error != 153 if (callback->OnEncodedImage(encoded, &specifics, nullptr).error !=
153 EncodedImageCallback::Result::OK) { 154 EncodedImageCallback::Result::OK) {
154 return -1; 155 return -1;
155 } 156 }
156 bits_available -= std::min(encoded._length * 8, bits_available); 157 bits_available -= std::min(encoded._length * 8, bits_available);
157 } 158 }
158 return 0; 159 return 0;
159 } 160 }
160 161
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); 356 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_);
356 357
357 queue1_.reset(); 358 queue1_.reset();
358 queue2_.reset(); 359 queue2_.reset();
359 360
360 return FakeH264Encoder::Release(); 361 return FakeH264Encoder::Release();
361 } 362 }
362 363
363 } // namespace test 364 } // namespace test
364 } // namespace webrtc 365 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/test/constants.cc ('k') | webrtc/test/frame_generator_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698