Skip to content

Instantly share code, notes, and snippets.

@omarojo
Last active January 19, 2017 20:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omarojo/934863e6f4ddf4bb3f0de7445da573cd to your computer and use it in GitHub Desktop.
Save omarojo/934863e6f4ddf4bb3f0de7445da573cd to your computer and use it in GitHub Desktop.
GPUImage newFrameAvailable
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