| 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 22 matching lines...) Expand all Loading... |
| 33 } | 33 } |
| 34 | 34 |
| 35 - (size_t)chromaHeight { | 35 - (size_t)chromaHeight { |
| 36 return (self.height + 1) / 2; | 36 return (self.height + 1) / 2; |
| 37 } | 37 } |
| 38 | 38 |
| 39 - (const uint8_t *)yPlane { | 39 - (const uint8_t *)yPlane { |
| 40 if (!self.i420Buffer) { | 40 if (!self.i420Buffer) { |
| 41 return nullptr; | 41 return nullptr; |
| 42 } | 42 } |
| 43 return self.i420Buffer->data(webrtc::kYPlane); | 43 return self.i420Buffer->DataY(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 - (const uint8_t *)uPlane { | 46 - (const uint8_t *)uPlane { |
| 47 if (!self.i420Buffer) { | 47 if (!self.i420Buffer) { |
| 48 return nullptr; | 48 return nullptr; |
| 49 } | 49 } |
| 50 return self.i420Buffer->data(webrtc::kUPlane); | 50 return self.i420Buffer->DataU(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 - (const uint8_t *)vPlane { | 53 - (const uint8_t *)vPlane { |
| 54 if (!self.i420Buffer) { | 54 if (!self.i420Buffer) { |
| 55 return nullptr; | 55 return nullptr; |
| 56 } | 56 } |
| 57 return self.i420Buffer->data(webrtc::kVPlane); | 57 return self.i420Buffer->DataV(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 - (int32_t)yPitch { | 60 - (int32_t)yPitch { |
| 61 if (!self.i420Buffer) { | 61 if (!self.i420Buffer) { |
| 62 return 0; | 62 return 0; |
| 63 } | 63 } |
| 64 return self.i420Buffer->stride(webrtc::kYPlane); | 64 return self.i420Buffer->StrideY(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 - (int32_t)uPitch { | 67 - (int32_t)uPitch { |
| 68 if (!self.i420Buffer) { | 68 if (!self.i420Buffer) { |
| 69 return 0; | 69 return 0; |
| 70 } | 70 } |
| 71 return self.i420Buffer->stride(webrtc::kUPlane); | 71 return self.i420Buffer->StrideU(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 - (int32_t)vPitch { | 74 - (int32_t)vPitch { |
| 75 if (!self.i420Buffer) { | 75 if (!self.i420Buffer) { |
| 76 return 0; | 76 return 0; |
| 77 } | 77 } |
| 78 return self.i420Buffer->stride(webrtc::kVPlane); | 78 return self.i420Buffer->StrideV(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 - (int64_t)timeStamp { | 81 - (int64_t)timeStamp { |
| 82 return _videoFrame->GetTimeStamp(); | 82 return _videoFrame->GetTimeStamp(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 - (CVPixelBufferRef)nativeHandle { | 85 - (CVPixelBufferRef)nativeHandle { |
| 86 return static_cast<CVPixelBufferRef>( | 86 return static_cast<CVPixelBufferRef>( |
| 87 _videoFrame->video_frame_buffer()->native_handle()); | 87 _videoFrame->video_frame_buffer()->native_handle()); |
| 88 } | 88 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 109 } | 109 } |
| 110 return self; | 110 return self; |
| 111 } | 111 } |
| 112 | 112 |
| 113 - (rtc::scoped_refptr<webrtc::VideoFrameBuffer>)i420Buffer { | 113 - (rtc::scoped_refptr<webrtc::VideoFrameBuffer>)i420Buffer { |
| 114 [self convertBufferIfNeeded]; | 114 [self convertBufferIfNeeded]; |
| 115 return _i420Buffer; | 115 return _i420Buffer; |
| 116 } | 116 } |
| 117 | 117 |
| 118 @end | 118 @end |
| OLD | NEW |