| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 std::unique_ptr<uint8_t[]> encoded_buffer(new uint8_t[num_encoded_bytes]); | 144 std::unique_ptr<uint8_t[]> encoded_buffer(new uint8_t[num_encoded_bytes]); |
| 145 memcpy(encoded_buffer.get(), encoded_buffer_, num_encoded_bytes); | 145 memcpy(encoded_buffer.get(), encoded_buffer_, num_encoded_bytes); |
| 146 EncodedImage encoded(encoded_buffer.get(), stream_bytes, num_encoded_bytes); | 146 EncodedImage encoded(encoded_buffer.get(), stream_bytes, num_encoded_bytes); |
| 147 encoded._timeStamp = input_image.timestamp(); | 147 encoded._timeStamp = input_image.timestamp(); |
| 148 encoded.capture_time_ms_ = input_image.render_time_ms(); | 148 encoded.capture_time_ms_ = input_image.render_time_ms(); |
| 149 encoded._frameType = (*frame_types)[i]; | 149 encoded._frameType = (*frame_types)[i]; |
| 150 encoded._encodedWidth = simulcast_streams[i].width; | 150 encoded._encodedWidth = simulcast_streams[i].width; |
| 151 encoded._encodedHeight = simulcast_streams[i].height; | 151 encoded._encodedHeight = simulcast_streams[i].height; |
| 152 encoded.rotation_ = input_image.rotation(); | 152 encoded.rotation_ = input_image.rotation(); |
| 153 encoded.content_type_ = (mode == kScreensharing) | 153 encoded.content_type_ = (mode == kScreensharing) |
| 154 ? VideoContentType::SCREENSHARE | 154 ? VideoContentType::Screenshare() |
| 155 : VideoContentType::UNSPECIFIED; | 155 : VideoContentType::Unspecified(); |
| 156 specifics.codec_name = ImplementationName(); | 156 specifics.codec_name = ImplementationName(); |
| 157 specifics.codecSpecific.generic.simulcast_idx = i; | 157 specifics.codecSpecific.generic.simulcast_idx = i; |
| 158 RTC_DCHECK(callback); | 158 RTC_DCHECK(callback); |
| 159 if (callback->OnEncodedImage(encoded, &specifics, nullptr).error != | 159 if (callback->OnEncodedImage(encoded, &specifics, nullptr).error != |
| 160 EncodedImageCallback::Result::OK) { | 160 EncodedImageCallback::Result::OK) { |
| 161 return -1; | 161 return -1; |
| 162 } | 162 } |
| 163 bits_available -= std::min(encoded._length * 8, bits_available); | 163 bits_available -= std::min(encoded._length * 8, bits_available); |
| 164 } | 164 } |
| 165 return 0; | 165 return 0; |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); | 368 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); |
| 369 | 369 |
| 370 queue1_.reset(); | 370 queue1_.reset(); |
| 371 queue2_.reset(); | 371 queue2_.reset(); |
| 372 | 372 |
| 373 return FakeH264Encoder::Release(); | 373 return FakeH264Encoder::Release(); |
| 374 } | 374 } |
| 375 | 375 |
| 376 } // namespace test | 376 } // namespace test |
| 377 } // namespace webrtc | 377 } // namespace webrtc |
| OLD | NEW |