| 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 #include <algorithm> // max | 10 #include <algorithm> // max |
| (...skipping 2379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2390 EncodedImage encoded(buffer, sizeof(buffer), sizeof(buffer)); | 2390 EncodedImage encoded(buffer, sizeof(buffer), sizeof(buffer)); |
| 2391 encoded._timeStamp = input_image.timestamp(); | 2391 encoded._timeStamp = input_image.timestamp(); |
| 2392 encoded.capture_time_ms_ = input_image.render_time_ms(); | 2392 encoded.capture_time_ms_ = input_image.render_time_ms(); |
| 2393 | 2393 |
| 2394 for (size_t i = 0; i < kNumStreams; ++i) { | 2394 for (size_t i = 0; i < kNumStreams; ++i) { |
| 2395 specifics.codecSpecific.generic.simulcast_idx = static_cast<uint8_t>(i); | 2395 specifics.codecSpecific.generic.simulcast_idx = static_cast<uint8_t>(i); |
| 2396 encoded._frameType = (*frame_types)[i]; | 2396 encoded._frameType = (*frame_types)[i]; |
| 2397 encoded._encodedWidth = kEncodedResolution[i].width; | 2397 encoded._encodedWidth = kEncodedResolution[i].width; |
| 2398 encoded._encodedHeight = kEncodedResolution[i].height; | 2398 encoded._encodedHeight = kEncodedResolution[i].height; |
| 2399 RTC_DCHECK(callback_); | 2399 RTC_DCHECK(callback_); |
| 2400 if (callback_->Encoded(encoded, &specifics, nullptr) != 0) | 2400 if (callback_->OnEncodedImage(encoded, &specifics, nullptr).error != |
| 2401 EncodedImageCallback::Result::OK) { |
| 2401 return -1; | 2402 return -1; |
| 2403 } |
| 2402 } | 2404 } |
| 2403 | 2405 |
| 2404 observation_complete_.Set(); | 2406 observation_complete_.Set(); |
| 2405 return 0; | 2407 return 0; |
| 2406 } | 2408 } |
| 2407 void ModifyVideoConfigs( | 2409 void ModifyVideoConfigs( |
| 2408 VideoSendStream::Config* send_config, | 2410 VideoSendStream::Config* send_config, |
| 2409 std::vector<VideoReceiveStream::Config>* receive_configs, | 2411 std::vector<VideoReceiveStream::Config>* receive_configs, |
| 2410 VideoEncoderConfig* encoder_config) override { | 2412 VideoEncoderConfig* encoder_config) override { |
| 2411 send_config->encoder_settings.encoder = this; | 2413 send_config->encoder_settings.encoder = this; |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2888 observation_complete_.Set(); | 2890 observation_complete_.Set(); |
| 2889 } | 2891 } |
| 2890 } | 2892 } |
| 2891 } test; | 2893 } test; |
| 2892 | 2894 |
| 2893 RunBaseTest(&test); | 2895 RunBaseTest(&test); |
| 2894 } | 2896 } |
| 2895 #endif // !defined(RTC_DISABLE_VP9) | 2897 #endif // !defined(RTC_DISABLE_VP9) |
| 2896 | 2898 |
| 2897 } // namespace webrtc | 2899 } // namespace webrtc |
| OLD | NEW |