Skip to content

Instantly share code, notes, and snippets.

View jebai's full-sized avatar

chen ming jebai

View GitHub Profile
- (void) parseBuffer:(CMSampleBufferRef) sampleBuffer
{
CVImageBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
CVPixelBufferLockBaseAddress( pixelBuffer, 0 );
//Processing here
int bufferWidth = CVPixelBufferGetWidth(pixelBuffer);
int bufferHeight = CVPixelBufferGetHeight(pixelBuffer);