Skip to content

Commit f106afc

Browse files
committed
Merge pull request BradLarson#2293 from chenliming777/master
GPUImageFramebuffer add get CVPixelBufferRef method, VideoToolB…
2 parents 4a72158 + 5f8219d commit f106afc

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

framework/Source/GPUImageFramebuffer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,6 @@ typedef struct GPUTextureOptions {
5454
- (void)unlockAfterReading;
5555
- (NSUInteger)bytesPerRow;
5656
- (GLubyte *)byteBuffer;
57+
- (CVPixelBufferRef)pixelBuffer;
5758

5859
@end

framework/Source/GPUImageFramebuffer.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,15 @@ - (GLubyte *)byteBuffer;
439439
#endif
440440
}
441441

442+
- (CVPixelBufferRef )pixelBuffer;
443+
{
444+
#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
445+
return renderTarget;
446+
#else
447+
return NULL; // TODO: do more with this on the non-texture-cache side
448+
#endif
449+
}
450+
442451
- (GLuint)texture;
443452
{
444453
// NSLog(@"Accessing texture: %d from FB: %@", _texture, self);

0 commit comments

Comments
 (0)