OLD | NEW |
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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 std::unique_ptr<uint8_t[]> encoded_buffer(new uint8_t[num_encoded_bytes]); | 136 std::unique_ptr<uint8_t[]> encoded_buffer(new uint8_t[num_encoded_bytes]); |
137 memcpy(encoded_buffer.get(), encoded_buffer_, num_encoded_bytes); | 137 memcpy(encoded_buffer.get(), encoded_buffer_, num_encoded_bytes); |
138 EncodedImage encoded(encoded_buffer.get(), stream_bytes, num_encoded_bytes); | 138 EncodedImage encoded(encoded_buffer.get(), stream_bytes, num_encoded_bytes); |
139 encoded._timeStamp = input_image.timestamp(); | 139 encoded._timeStamp = input_image.timestamp(); |
140 encoded.capture_time_ms_ = input_image.render_time_ms(); | 140 encoded.capture_time_ms_ = input_image.render_time_ms(); |
141 encoded._frameType = (*frame_types)[i]; | 141 encoded._frameType = (*frame_types)[i]; |
142 encoded._encodedWidth = simulcast_streams[i].width; | 142 encoded._encodedWidth = simulcast_streams[i].width; |
143 encoded._encodedHeight = simulcast_streams[i].height; | 143 encoded._encodedHeight = simulcast_streams[i].height; |
144 encoded.rotation_ = input_image.rotation(); | 144 encoded.rotation_ = input_image.rotation(); |
| 145 encoded.content_type_ = input_image.content_type(); |
145 specifics.codec_name = ImplementationName(); | 146 specifics.codec_name = ImplementationName(); |
146 RTC_DCHECK(callback); | 147 RTC_DCHECK(callback); |
147 if (callback->OnEncodedImage(encoded, &specifics, nullptr).error != | 148 if (callback->OnEncodedImage(encoded, &specifics, nullptr).error != |
148 EncodedImageCallback::Result::OK) { | 149 EncodedImageCallback::Result::OK) { |
149 return -1; | 150 return -1; |
150 } | 151 } |
151 bits_available -= std::min(encoded._length * 8, bits_available); | 152 bits_available -= std::min(encoded._length * 8, bits_available); |
152 } | 153 } |
153 return 0; | 154 return 0; |
154 } | 155 } |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); | 351 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); |
351 | 352 |
352 queue1_.reset(); | 353 queue1_.reset(); |
353 queue2_.reset(); | 354 queue2_.reset(); |
354 | 355 |
355 return FakeH264Encoder::Release(); | 356 return FakeH264Encoder::Release(); |
356 } | 357 } |
357 | 358 |
358 } // namespace test | 359 } // namespace test |
359 } // namespace webrtc | 360 } // namespace webrtc |
OLD | NEW |