Last active
January 19, 2017 20:58
-
-
Save omarojo/934863e6f4ddf4bb3f0de7445da573cd to your computer and use it in GitHub Desktop.
GPUImage newFrameAvailable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.rawG8OutputTarget = [[GPUImageRawDataOutput alloc] initWithImageSize: aspectSize resultsInBGRAFormat:YES]; | |
[filterChain.output addTarget:self.rawG8OutputTarget]; | |
__weak GPUImageRawDataOutput *weakRawOutput = self.rawG8OutputTarget; | |
[self.rawG8OutputTarget setNewFrameAvailableBlock:^{ | |
GLubyte *outputBytes = [weakRawOutput rawBytesForImage]; | |
NSInteger bytesPerRow = [weakRawOutput bytesPerRowInOutput]; | |
//I use this variables to create the image to be streamed. | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment