Support more formats in RTCVideoFrame
Implement Obj-C version of webrtc::VideoFrameBuffer and use that in RTCVideoFrame. Bug: webrtc:7785 Change-Id: I49f42bcf451dd6769b3a79a65fe7b400dce22677 Reviewed-on: https://chromium-review.googlesource.com/536773 Commit-Queue: Anders Carlsson <andersc@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#18691}
This commit is contained in:
committed by
Commit Bot
parent
7f84aeaef6
commit
bd2220a9c4
@ -17,6 +17,7 @@
|
||||
#import "RTCNV12TextureCache.h"
|
||||
#import "WebRTC/RTCLogging.h"
|
||||
#import "WebRTC/RTCVideoFrame.h"
|
||||
#import "WebRTC/RTCVideoFrameBuffer.h"
|
||||
|
||||
// RTCDisplayLinkTimer wraps a CADisplayLink and is set to fire every two screen
|
||||
// refreshes, which should be 30fps. We wrap the display link in order to avoid
|
||||
@ -220,7 +221,7 @@
|
||||
}
|
||||
[self ensureGLContext];
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
if (frame.nativeHandle) {
|
||||
if ([frame.buffer isKindOfClass:[RTCCVPixelBuffer class]]) {
|
||||
if (!_nv12TextureCache) {
|
||||
_nv12TextureCache = [[RTCNV12TextureCache alloc] initWithContext:_glContext];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user