| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 adapted_height != captured_height || crop_height != captured_height) { | 711 adapted_height != captured_height || crop_height != captured_height) { |
| 712 // TODO(magjed): Avoid converting to I420. | 712 // TODO(magjed): Avoid converting to I420. |
| 713 rtc::scoped_refptr<webrtc::I420Buffer> scaled_buffer( | 713 rtc::scoped_refptr<webrtc::I420Buffer> scaled_buffer( |
| 714 _buffer_pool.CreateBuffer(adapted_width, adapted_height)); | 714 _buffer_pool.CreateBuffer(adapted_width, adapted_height)); |
| 715 scaled_buffer->CropAndScaleFrom(buffer->NativeToI420Buffer(), crop_x, | 715 scaled_buffer->CropAndScaleFrom(buffer->NativeToI420Buffer(), crop_x, |
| 716 crop_y, crop_width, crop_height); | 716 crop_y, crop_width, crop_height); |
| 717 buffer = scaled_buffer; | 717 buffer = scaled_buffer; |
| 718 } | 718 } |
| 719 | 719 |
| 720 OnFrame(cricket::WebRtcVideoFrame(buffer, webrtc::kVideoRotation_0, | 720 OnFrame(cricket::WebRtcVideoFrame(buffer, webrtc::kVideoRotation_0, |
| 721 translated_camera_time_us), | 721 translated_camera_time_us, 0), |
| 722 captured_width, captured_height); | 722 captured_width, captured_height); |
| 723 | 723 |
| 724 CVBufferRelease(image_buffer); | 724 CVBufferRelease(image_buffer); |
| 725 } | 725 } |
| 726 | 726 |
| 727 } // namespace webrtc | 727 } // namespace webrtc |
| OLD | NEW |