ObjC: Remove RTCVideoFrame I420 functions
Access to I420 data should be done on an RTCI420Buffer that can be accessed through the toI420 method, and not on an RTCVideoFrame directly. BUG=webrtc:7785 Review-Url: https://codereview.webrtc.org/2997453002 Cr-Commit-Position: refs/heads/master@{#19431}
This commit is contained in:
@ -31,54 +31,6 @@
|
||||
return _rotation;
|
||||
}
|
||||
|
||||
- (const uint8_t *)dataY {
|
||||
if ([_buffer conformsToProtocol:@protocol(RTCI420Buffer)]) {
|
||||
return ((id<RTCI420Buffer>)_buffer).dataY;
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
- (const uint8_t *)dataU {
|
||||
if ([_buffer conformsToProtocol:@protocol(RTCI420Buffer)]) {
|
||||
return ((id<RTCI420Buffer>)_buffer).dataU;
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
- (const uint8_t *)dataV {
|
||||
if ([_buffer conformsToProtocol:@protocol(RTCI420Buffer)]) {
|
||||
return ((id<RTCI420Buffer>)_buffer).dataV;
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
- (int)strideY {
|
||||
if ([_buffer conformsToProtocol:@protocol(RTCI420Buffer)]) {
|
||||
return ((id<RTCI420Buffer>)_buffer).strideY;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
- (int)strideU {
|
||||
if ([_buffer conformsToProtocol:@protocol(RTCI420Buffer)]) {
|
||||
return ((id<RTCI420Buffer>)_buffer).strideU;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
- (int)strideV {
|
||||
if ([_buffer conformsToProtocol:@protocol(RTCI420Buffer)]) {
|
||||
return ((id<RTCI420Buffer>)_buffer).strideV;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
- (int64_t)timeStampNs {
|
||||
return _timeStampNs;
|
||||
}
|
||||
|
||||
@ -34,19 +34,6 @@ RTC_EXPORT
|
||||
/** Height without rotation applied. */
|
||||
@property(nonatomic, readonly) int height;
|
||||
@property(nonatomic, readonly) RTCVideoRotation rotation;
|
||||
/** Accessing YUV data should only be done for I420 frames, i.e. if nativeHandle
|
||||
* is null. It is always possible to get such a frame by calling
|
||||
* newI420VideoFrame.
|
||||
*/
|
||||
@property(nonatomic, readonly, nullable)
|
||||
const uint8_t *dataY DEPRECATED_MSG_ATTRIBUTE("use [buffer toI420]");
|
||||
@property(nonatomic, readonly, nullable)
|
||||
const uint8_t *dataU DEPRECATED_MSG_ATTRIBUTE("use [buffer toI420]");
|
||||
@property(nonatomic, readonly, nullable)
|
||||
const uint8_t *dataV DEPRECATED_MSG_ATTRIBUTE("use [buffer toI420]");
|
||||
@property(nonatomic, readonly) int strideY DEPRECATED_MSG_ATTRIBUTE("use [buffer toI420]");
|
||||
@property(nonatomic, readonly) int strideU DEPRECATED_MSG_ATTRIBUTE("use [buffer toI420]");
|
||||
@property(nonatomic, readonly) int strideV DEPRECATED_MSG_ATTRIBUTE("use [buffer toI420]");
|
||||
|
||||
/** Timestamp in nanoseconds. */
|
||||
@property(nonatomic, readonly) int64_t timeStampNs;
|
||||
|
||||
Reference in New Issue
Block a user