¡@

Home 

2014/10/15 ¤U¤È 10:12:37

iphone Programming Glossary: pixel_buffer

Faster alternative to glReadPixels in iPhone OpenGL ES 2.0

http://stackoverflow.com/questions/9550297/faster-alternative-to-glreadpixels-in-iphone-opengl-es-2-0

target for my FBO. Once I've rendered a frame I lock the base address of the pixel buffer CVPixelBufferLockBaseAddress pixel_buffer 0 and then simply feed it into my asset writer to be encoded CMTime currentTime CMTimeMakeWithSeconds NSDate date timeIntervalSinceDate.. CMTimeMakeWithSeconds NSDate date timeIntervalSinceDate startTime 120 if assetWriterPixelBufferInput appendPixelBuffer pixel_buffer withPresentationTime currentTime NSLog @ Problem appending pixel buffer at time lld currentTime.value else NSLog @ Recorded.. lld currentTime.value else NSLog @ Recorded pixel buffer at time lld currentTime.value CVPixelBufferUnlockBaseAddress pixel_buffer 0 if GPUImageOpenGLESContext supportsFastTextureUpload CVPixelBufferRelease pixel_buffer Note that at no point here am I..

Record the drawing as a m4v video file - OpenGL

http://stackoverflow.com/questions/9661259/record-the-drawing-as-a-m4v-video-file-opengl

startSessionAtSourceTime kCMTimeZero I grab and encode a color swizzled frame using the following CVPixelBufferRef pixel_buffer NULL CVReturn status CVPixelBufferPoolCreatePixelBuffer NULL assetWriterPixelBufferInput pixelBufferPool pixel_buffer if.. pixel_buffer NULL CVReturn status CVPixelBufferPoolCreatePixelBuffer NULL assetWriterPixelBufferInput pixelBufferPool pixel_buffer if pixel_buffer NULL status kCVReturnSuccess return else CVPixelBufferLockBaseAddress pixel_buffer 0 GLubyte pixelBufferData.. CVReturn status CVPixelBufferPoolCreatePixelBuffer NULL assetWriterPixelBufferInput pixelBufferPool pixel_buffer if pixel_buffer NULL status kCVReturnSuccess return else CVPixelBufferLockBaseAddress pixel_buffer 0 GLubyte pixelBufferData GLubyte CVPixelBufferGetBaseAddress..