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

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

Issue 2477773002: Revert of move deprected functions from EncodedImageCallback and RtpRtcp (Closed)
Patch Set: Silly mistake in webrtc/test/fake_encoder.cc Created 4 years, 1 month 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/configurable_frame_size_encoder.cc ('k') | webrtc/video/payload_router_unittest.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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 EncodedImage encoded( 105 EncodedImage encoded(
106 encoded_buffer_, stream_bytes, sizeof(encoded_buffer_)); 106 encoded_buffer_, stream_bytes, sizeof(encoded_buffer_));
107 encoded._timeStamp = input_image.timestamp(); 107 encoded._timeStamp = input_image.timestamp();
108 encoded.capture_time_ms_ = input_image.render_time_ms(); 108 encoded.capture_time_ms_ = input_image.render_time_ms();
109 encoded._frameType = (*frame_types)[i]; 109 encoded._frameType = (*frame_types)[i];
110 encoded._encodedWidth = config_.simulcastStream[i].width; 110 encoded._encodedWidth = config_.simulcastStream[i].width;
111 encoded._encodedHeight = config_.simulcastStream[i].height; 111 encoded._encodedHeight = config_.simulcastStream[i].height;
112 encoded.rotation_ = input_image.rotation(); 112 encoded.rotation_ = input_image.rotation();
113 RTC_DCHECK(callback_ != NULL); 113 RTC_DCHECK(callback_ != NULL);
114 specifics.codec_name = ImplementationName(); 114 specifics.codec_name = ImplementationName();
115 if (callback_->OnEncodedImage(encoded, &specifics, NULL).error != 115 if (callback_->Encoded(encoded, &specifics, NULL) != 0)
116 EncodedImageCallback::Result::OK) {
117 return -1; 116 return -1;
118 }
119 bits_available -= std::min(encoded._length * 8, bits_available); 117 bits_available -= std::min(encoded._length * 8, bits_available);
120 } 118 }
121 return 0; 119 return 0;
122 } 120 }
123 121
124 int32_t FakeEncoder::RegisterEncodeCompleteCallback( 122 int32_t FakeEncoder::RegisterEncodeCompleteCallback(
125 EncodedImageCallback* callback) { 123 EncodedImageCallback* callback) {
126 callback_ = callback; 124 callback_ = callback;
127 return 0; 125 return 0;
128 } 126 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 int delay_ms = 0; 216 int delay_ms = 0;
219 { 217 {
220 rtc::CritScope lock(&lock_); 218 rtc::CritScope lock(&lock_);
221 delay_ms = delay_ms_; 219 delay_ms = delay_ms_;
222 } 220 }
223 SleepMs(delay_ms); 221 SleepMs(delay_ms);
224 return FakeEncoder::Encode(input_image, codec_specific_info, frame_types); 222 return FakeEncoder::Encode(input_image, codec_specific_info, frame_types);
225 } 223 }
226 } // namespace test 224 } // namespace test
227 } // namespace webrtc 225 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/test/configurable_frame_size_encoder.cc ('k') | webrtc/video/payload_router_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698