Chromium Code Reviews| 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 |
| 11 #import <AVFoundation/AVFoundation.h> | 11 #import <AVFoundation/AVFoundation.h> |
| 12 #import <Foundation/Foundation.h> | 12 #import <Foundation/Foundation.h> |
| 13 | 13 |
| 14 #import <WebRTC/RTCMacros.h> | 14 #import <WebRTC/RTCMacros.h> |
| 15 | 15 |
| 16 #include "webrtc/common_video/rotation.h" | |
|
tkchin_webrtc
2016/08/09 17:42:20
C++ includes cannot be present in pure ObjC header
magjed_webrtc
2016/08/10 10:26:06
Done. I removed the C++ include from this file and
| |
| 17 | |
| 16 NS_ASSUME_NONNULL_BEGIN | 18 NS_ASSUME_NONNULL_BEGIN |
| 17 | 19 |
| 18 // RTCVideoFrame is an ObjectiveC version of cricket::VideoFrame. | 20 // RTCVideoFrame is an ObjectiveC version of cricket::VideoFrame. |
| 19 RTC_EXPORT | 21 RTC_EXPORT |
| 20 @interface RTCVideoFrame : NSObject | 22 @interface RTCVideoFrame : NSObject |
| 21 | 23 |
| 22 /** Width without rotation applied. */ | 24 /** Width without rotation applied. */ |
| 23 @property(nonatomic, readonly) size_t width; | 25 @property(nonatomic, readonly) size_t width; |
| 24 | 26 |
| 25 /** Height without rotation applied. */ | 27 /** Height without rotation applied. */ |
| 26 @property(nonatomic, readonly) size_t height; | 28 @property(nonatomic, readonly) size_t height; |
| 29 @property(nonatomic, readonly) webrtc::VideoRotation rotation; | |
| 27 @property(nonatomic, readonly) size_t chromaWidth; | 30 @property(nonatomic, readonly) size_t chromaWidth; |
| 28 @property(nonatomic, readonly) size_t chromaHeight; | 31 @property(nonatomic, readonly) size_t chromaHeight; |
| 29 // These can return NULL if the object is not backed by a buffer. | 32 // These can return NULL if the object is not backed by a buffer. |
| 30 @property(nonatomic, readonly, nullable) const uint8_t *yPlane; | 33 @property(nonatomic, readonly, nullable) const uint8_t *yPlane; |
| 31 @property(nonatomic, readonly, nullable) const uint8_t *uPlane; | 34 @property(nonatomic, readonly, nullable) const uint8_t *uPlane; |
| 32 @property(nonatomic, readonly, nullable) const uint8_t *vPlane; | 35 @property(nonatomic, readonly, nullable) const uint8_t *vPlane; |
| 33 @property(nonatomic, readonly) int32_t yPitch; | 36 @property(nonatomic, readonly) int32_t yPitch; |
| 34 @property(nonatomic, readonly) int32_t uPitch; | 37 @property(nonatomic, readonly) int32_t uPitch; |
| 35 @property(nonatomic, readonly) int32_t vPitch; | 38 @property(nonatomic, readonly) int32_t vPitch; |
| 36 | 39 |
| 37 /** Timestamp in nanoseconds. */ | 40 /** Timestamp in nanoseconds. */ |
| 38 @property(nonatomic, readonly) int64_t timeStamp; | 41 @property(nonatomic, readonly) int64_t timeStampNs; |
| 39 | 42 |
| 40 /** The native handle should be a pixel buffer on iOS. */ | 43 /** The native handle should be a pixel buffer on iOS. */ |
| 41 @property(nonatomic, readonly) CVPixelBufferRef nativeHandle; | 44 @property(nonatomic, readonly) CVPixelBufferRef nativeHandle; |
| 42 | 45 |
| 43 - (instancetype)init NS_UNAVAILABLE; | 46 - (instancetype)init NS_UNAVAILABLE; |
| 44 | 47 |
| 45 /** If the frame is backed by a CVPixelBuffer, creates a backing i420 frame. | 48 /** If the frame is backed by a CVPixelBuffer, creates a backing i420 frame. |
| 46 * Calling the yuv plane properties will call this method if needed. | 49 * Calling the yuv plane properties will call this method if needed. |
| 47 */ | 50 */ |
| 48 - (void)convertBufferIfNeeded; | 51 - (void)convertBufferIfNeeded; |
| 49 | 52 |
| 50 @end | 53 @end |
| 51 | 54 |
| 52 NS_ASSUME_NONNULL_END | 55 NS_ASSUME_NONNULL_END |
| OLD | NEW |