¡@

Home 

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

iphone Programming Glossary: bufferheight

Hardware accelerated h.264 decoding to texture, overlay or similar in iOS

http://stackoverflow.com/questions/10646657/hardware-accelerated-h-264-decoding-to-texture-overlay-or-similar-in-ios

movieSampleBuffer CVImageBufferRef movieFrame CMSampleBufferGetImageBuffer movieSampleBuffer int bufferHeight CVPixelBufferGetHeight movieFrame int bufferWidth CVPixelBufferGetWidth movieFrame CFAbsoluteTime startTime CFAbsoluteTimeGetCurrent.. kCFAllocatorDefault coreVideoTextureCache movieFrame NULL GL_TEXTURE_2D GL_RGBA bufferWidth bufferHeight GL_BGRA GL_UNSIGNED_BYTE 0 texture if texture err NSLog @ Movie CVOpenGLESTextureCacheCreateTextureFromImage failed error.. targetTextureIndices objectAtIndex indexOfObject integerValue currentTarget setInputSize CGSizeMake bufferWidth bufferHeight atIndex targetTextureIndex currentTarget setInputTexture outputTexture atIndex targetTextureIndex currentTarget newFrameReadyAtTime..

How to grab YUV formatted video from the camera, display it and process it

http://stackoverflow.com/questions/4205191/how-to-grab-yuv-formatted-video-from-the-camera-display-it-and-process-it

instead of looping void processPixelBuffer CVImageBufferRef pixelBuffer CVPixelBufferLockBaseAddress pixelBuffer 0 int bufferHeight CVPixelBufferGetHeight pixelBuffer int bufferWidth CVPixelBufferGetWidth pixelBuffer allocate space for ychannel reallocating.. CVPixelBufferGetWidth pixelBuffer allocate space for ychannel reallocating as needed. if bufferWidth y_channel.width bufferHeight y_channel.height if y_channel.data free y_channel.data y_channel.width bufferWidth y_channel.height bufferHeight y_channel.data.. bufferHeight y_channel.height if y_channel.data free y_channel.data y_channel.width bufferWidth y_channel.height bufferHeight y_channel.data malloc y_channel.width y_channel.height uint8_t yc CVPixelBufferGetBaseAddressOfPlane pixelBuffer 0 int..

iOS CVImageBuffer distorted from AVCaptureSessionDataOutput with AVCaptureSessionPresetPhoto

http://stackoverflow.com/questions/6540710/ios-cvimagebuffer-distorted-from-avcapturesessiondataoutput-with-avcapturesessio

draws them void processNewCameraFrame CVImageBufferRef cameraFrame CVPixelBufferLockBaseAddress cameraFrame 0 int bufferHeight CVPixelBufferGetHeight cameraFrame int bufferWidth CVPixelBufferGetWidth cameraFrame glClear GL_COLOR_BUFFER_BIT glGenTextures.. glTexParameteri GL_TEXTURE_2D GL_TEXTURE_WRAP_T GL_CLAMP_TO_EDGE glTexImage2D GL_TEXTURE_2D 0 GL_RGBA bufferWidth bufferHeight 0 GL_BGRA GL_UNSIGNED_BYTE CVPixelBufferGetBaseAddress cameraFrame glBindBuffer GL_ARRAY_BUFFER self vertexBuffer glBindBuffer.. CGContextRef context CGBitmapContextCreate CVPixelBufferGetBaseAddress cameraFrame bufferWidth bufferHeight 8 bytesPerRow colorSpace kCGBitmapByteOrder32Little kCGImageAlphaPremultipliedFirst CGImageRef cgImage CGBitmapContextCreateImage..