Add unit tests for RTCCVPixelBuffer and ObjCVideoTrackSource.

This CL also fixes a couple of bugs found in the toI420 method for
RTCCVPixelBuffers backed by RGB CVPixelBuffers.

Bug: webrtc:9007
Change-Id: I19ab8177f4b124a503cfda9f0166bd960f668982
Reviewed-on: https://webrtc-review.googlesource.com/64940
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22656}
This commit is contained in:
Anders Carlsson
2018-03-28 16:18:04 +02:00
committed by Commit Bot
parent 730560a65c
commit 4ea50c2b42
8 changed files with 815 additions and 33 deletions

View File

@ -71,6 +71,8 @@ RTC_EXPORT
@property(nonatomic, readonly) CVPixelBufferRef pixelBuffer;
@property(nonatomic, readonly) int cropX;
@property(nonatomic, readonly) int cropY;
@property(nonatomic, readonly) int cropWidth;
@property(nonatomic, readonly) int cropHeight;
+ (NSSet<NSNumber *> *)supportedPixelFormats;
@ -89,7 +91,8 @@ RTC_EXPORT
/** The minimum size of the |tmpBuffer| must be the number of bytes returned from the
* bufferSizeForCroppingAndScalingToWidth:height: method.
*/
- (BOOL)cropAndScaleTo:(CVPixelBufferRef)outputPixelBuffer withTempBuffer:(uint8_t *)tmpBuffer;
- (BOOL)cropAndScaleTo:(CVPixelBufferRef)outputPixelBuffer
withTempBuffer:(nullable uint8_t *)tmpBuffer;
@end