¡@

Home 

2014/10/15 ¤U¤È 10:04:04

iphone Programming Glossary: assetwriterpixelbufferinput

OpenGL ES 2d rendering into image

http://stackoverflow.com/questions/10455329/opengl-es-2d-rendering-into-image

CFDictionarySetValue attrs kCVPixelBufferIOSurfacePropertiesKey empty CVPixelBufferPoolCreatePixelBuffer NULL assetWriterPixelBufferInput pixelBufferPool renderTarget CVPixelBufferCreate kCFAllocatorDefault int imageSize.width int imageSize.height kCVPixelFormatType_32BGRA..

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

videoSize.width kCVPixelBufferWidthKey NSNumber numberWithInt videoSize.height kCVPixelBufferHeightKey nil assetWriterPixelBufferInput AVAssetWriterInputPixelBufferAdaptor assetWriterInputPixelBufferAdaptorWithAssetWriterInput assetWriterVideoInput sourcePixelBufferAttributes.. if err NSAssert NO @ Error at CVOpenGLESTextureCacheCreate d CVPixelBufferPoolCreatePixelBuffer NULL assetWriterPixelBufferInput pixelBufferPool renderTarget CVOpenGLESTextureRef renderTexture CVOpenGLESTextureCacheCreateTextureFromImage kCFAllocatorDefault.. asset writer to be encoded CMTime currentTime CMTimeMakeWithSeconds NSDate date timeIntervalSinceDate startTime 120 if assetWriterPixelBufferInput appendPixelBuffer pixel_buffer withPresentationTime currentTime NSLog @ Problem appending pixel buffer at time lld currentTime.value..

Record the drawing as a m4v video file - OpenGL

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

videoSize.width kCVPixelBufferWidthKey NSNumber numberWithInt videoSize.height kCVPixelBufferHeightKey nil assetWriterPixelBufferInput AVAssetWriterInputPixelBufferAdaptor assetWriterInputPixelBufferAdaptorWithAssetWriterInput assetWriterVideoInput sourcePixelBufferAttributes.. frame using the following CVPixelBufferRef pixel_buffer NULL CVReturn status CVPixelBufferPoolCreatePixelBuffer NULL assetWriterPixelBufferInput pixelBufferPool pixel_buffer if pixel_buffer NULL status kCVReturnSuccess return else CVPixelBufferLockBaseAddress pixel_buffer.. movie it aborts recording CMTime currentTime CMTimeMakeWithSeconds NSDate date timeIntervalSinceDate startTime 120 if assetWriterPixelBufferInput appendPixelBuffer pixel_buffer withPresentationTime currentTime NSLog @ Problem appending pixel buffer at time lld currentTime.value..