| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 265 |
| 266 if (apply_rotation) { | 266 if (apply_rotation) { |
| 267 // Rotating resolution when for 90/270 degree rotations. | 267 // Rotating resolution when for 90/270 degree rotations. |
| 268 if (_rotateFrame == kVideoRotation_90 || | 268 if (_rotateFrame == kVideoRotation_90 || |
| 269 _rotateFrame == kVideoRotation_270) { | 269 _rotateFrame == kVideoRotation_270) { |
| 270 target_width = abs(height); | 270 target_width = abs(height); |
| 271 target_height = width; | 271 target_height = width; |
| 272 } | 272 } |
| 273 } | 273 } |
| 274 | 274 |
| 275 // TODO(mikhal): Update correct aligned stride values. | |
| 276 //Calc16ByteAlignedStride(target_width, &stride_y, &stride_uv); | |
| 277 // Setting absolute height (in case it was negative). | 275 // Setting absolute height (in case it was negative). |
| 278 // In Windows, the image starts bottom left, instead of top left. | 276 // In Windows, the image starts bottom left, instead of top left. |
| 279 // Setting a negative source height, inverts the image (within LibYuv). | 277 // Setting a negative source height, inverts the image (within LibYuv). |
| 280 _captureFrame.CreateEmptyFrame(target_width, | 278 _captureFrame.CreateEmptyFrame(target_width, |
| 281 abs(target_height), | 279 abs(target_height), |
| 282 stride_y, | 280 stride_y, |
| 283 stride_uv, stride_uv); | 281 stride_uv, stride_uv); |
| 284 const int conversionResult = ConvertToI420( | 282 const int conversionResult = ConvertToI420( |
| 285 commonVideoType, videoFrame, 0, 0, // No cropping | 283 commonVideoType, videoFrame, 0, 0, // No cropping |
| 286 width, height, videoFrameLength, | 284 width, height, videoFrameLength, |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 if (diff > 0) | 382 if (diff > 0) |
| 385 { | 383 { |
| 386 return uint32_t((nrOfFrames * 1000.0f / diff) + 0.5f); | 384 return uint32_t((nrOfFrames * 1000.0f / diff) + 0.5f); |
| 387 } | 385 } |
| 388 } | 386 } |
| 389 | 387 |
| 390 return nrOfFrames; | 388 return nrOfFrames; |
| 391 } | 389 } |
| 392 } // namespace videocapturemodule | 390 } // namespace videocapturemodule |
| 393 } // namespace webrtc | 391 } // namespace webrtc |
| OLD | NEW |