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 2401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2412 EncodedImage encoded(buffer, sizeof(buffer), sizeof(buffer)); | 2412 EncodedImage encoded(buffer, sizeof(buffer), sizeof(buffer)); |
2413 encoded._timeStamp = input_image.timestamp(); | 2413 encoded._timeStamp = input_image.timestamp(); |
2414 encoded.capture_time_ms_ = input_image.render_time_ms(); | 2414 encoded.capture_time_ms_ = input_image.render_time_ms(); |
2415 | 2415 |
2416 for (size_t i = 0; i < kNumStreams; ++i) { | 2416 for (size_t i = 0; i < kNumStreams; ++i) { |
2417 specifics.codecSpecific.generic.simulcast_idx = static_cast<uint8_t>(i); | 2417 specifics.codecSpecific.generic.simulcast_idx = static_cast<uint8_t>(i); |
2418 encoded._frameType = (*frame_types)[i]; | 2418 encoded._frameType = (*frame_types)[i]; |
2419 encoded._encodedWidth = kEncodedResolution[i].width; | 2419 encoded._encodedWidth = kEncodedResolution[i].width; |
2420 encoded._encodedHeight = kEncodedResolution[i].height; | 2420 encoded._encodedHeight = kEncodedResolution[i].height; |
2421 RTC_DCHECK(callback_); | 2421 RTC_DCHECK(callback_); |
2422 if (callback_->OnEncodedImage(encoded, &specifics, nullptr).error != | 2422 if (callback_->Encoded(encoded, &specifics, nullptr) != 0) |
2423 EncodedImageCallback::Result::OK) { | |
2424 return -1; | 2423 return -1; |
2425 } | |
2426 } | 2424 } |
2427 | 2425 |
2428 observation_complete_.Set(); | 2426 observation_complete_.Set(); |
2429 return 0; | 2427 return 0; |
2430 } | 2428 } |
2431 void ModifyVideoConfigs( | 2429 void ModifyVideoConfigs( |
2432 VideoSendStream::Config* send_config, | 2430 VideoSendStream::Config* send_config, |
2433 std::vector<VideoReceiveStream::Config>* receive_configs, | 2431 std::vector<VideoReceiveStream::Config>* receive_configs, |
2434 VideoEncoderConfig* encoder_config) override { | 2432 VideoEncoderConfig* encoder_config) override { |
2435 send_config->encoder_settings.encoder = this; | 2433 send_config->encoder_settings.encoder = this; |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2945 RequestSourceRotateIfVideoOrientationExtensionNotSupported) { | 2943 RequestSourceRotateIfVideoOrientationExtensionNotSupported) { |
2946 TestRequestSourceRotateVideo(false); | 2944 TestRequestSourceRotateVideo(false); |
2947 } | 2945 } |
2948 | 2946 |
2949 TEST_F(VideoSendStreamTest, | 2947 TEST_F(VideoSendStreamTest, |
2950 DoNotRequestsRotationIfVideoOrientationExtensionSupported) { | 2948 DoNotRequestsRotationIfVideoOrientationExtensionSupported) { |
2951 TestRequestSourceRotateVideo(true); | 2949 TestRequestSourceRotateVideo(true); |
2952 } | 2950 } |
2953 | 2951 |
2954 } // namespace webrtc | 2952 } // namespace webrtc |
OLD | NEW |