¡@

Home 

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

iphone Programming Glossary: bufferwidth

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

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

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

pixelBuffer CVPixelBufferLockBaseAddress pixelBuffer 0 int bufferHeight CVPixelBufferGetHeight pixelBuffer int bufferWidth CVPixelBufferGetWidth pixelBuffer allocate space for ychannel reallocating as needed. if bufferWidth y_channel.width bufferHeight.. pixelBuffer int bufferWidth 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.. 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 malloc y_channel.width y_channel.height uint8_t yc CVPixelBufferGetBaseAddressOfPlane..

iOS CVImageBuffer distorted from AVCaptureSessionDataOutput with AVCaptureSessionPresetPhoto

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

cameraFrame CVPixelBufferLockBaseAddress cameraFrame 0 int bufferHeight CVPixelBufferGetHeight cameraFrame int bufferWidth CVPixelBufferGetWidth cameraFrame glClear GL_COLOR_BUFFER_BIT glGenTextures 1 videoFrameTexture_ glBindTexture GL_TEXTURE_2D.. GL_CLAMP_TO_EDGE 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.. CGColorSpaceCreateDeviceRGB CGContextRef context CGBitmapContextCreate CVPixelBufferGetBaseAddress cameraFrame bufferWidth bufferHeight 8 bytesPerRow colorSpace kCGBitmapByteOrder32Little kCGImageAlphaPremultipliedFirst CGImageRef cgImage CGBitmapContextCreateImage..