¡@

Home 

2014/10/15 ¤U¤È 10:09:22

iphone Programming Glossary: frametime

Merge Two Video files in iPhone Application

http://stackoverflow.com/questions/10071029/merge-two-video-files-in-iphone-application

writerInput isReadyForMoreMediaData NSLog @ inside for loop d i for int pframetime 1 pframetime 2 pframetime CMTime frameTime CMTimeMake pframetime 25 CMTime lastTime CMTimeMake i 1 i is from 0 to 19 of the loop above CMTime presentTime CMTimeAdd.. pframetime 25 CMTime lastTime CMTimeMake i 1 i is from 0 to 19 of the loop above CMTime presentTime CMTimeAdd lastTime frameTime if i 0 buffer self pixelBufferFromCGImage UIImage imageNamed @ 1.jpeg CGImage else buffer self pixelBufferFromCGImage..

IOSurfaces - Artefacts in video and unable to grab video surfaces

http://stackoverflow.com/questions/14135215/iosurfaces-artefacts-in-video-and-unable-to-grab-video-surfaces

IOSurfaceGetBaseAddress destSurf IOSurfaceGetBytesPerRow destSurf NULL NULL NULL sampleBuffer CMTime frameTime CMTimeMake frameCount int32_t 5 adaptor appendPixelBuffer sampleBuffer withPresentationTime frameTime CFRelease sampleBuffer.. CMTime frameTime CMTimeMake frameCount int32_t 5 adaptor appendPixelBuffer sampleBuffer withPresentationTime frameTime CFRelease sampleBuffer CFRelease destSurf frameCount P.S The last 4 5 lines of code are the most relevant if you need to..

AVFoundation + AssetWriter: Generate Movie With Images and Audio

http://stackoverflow.com/questions/5640657/avfoundation-assetwriter-generate-movie-with-images-and-audio

j 30 if adaptor.assetWriterInput.readyForMoreMediaData printf appending d attemp d n frameCount j CMTime frameTime CMTimeMake frameCount int32_t kRecordingFPS append_ok adaptor appendPixelBuffer buffer withPresentationTime frameTime .. frameTime CMTimeMake frameCount int32_t kRecordingFPS append_ok adaptor appendPixelBuffer buffer withPresentationTime frameTime if buffer CVBufferRelease buffer NSThread sleepForTimeInterval 0.05 else printf adaptor not ready d d n frameCount..

Make movie file with picture Array and song file, using AVAsset

http://stackoverflow.com/questions/6061092/make-movie-file-with-picture-array-and-song-file-using-avasset

append_ok j 30 if adaptor.assetWriterInput.readyForMoreMediaData printf appending d attemp d n frameCount j CMTime frameTime CMTimeMake frameCount int32_t 10 CVPixelBufferPoolCreatePixelBuffer kCFAllocatorDefault adaptor.pixelBufferPool buffer.. kCFAllocatorDefault adaptor.pixelBufferPool buffer append_ok adaptor appendPixelBuffer buffer withPresentationTime frameTime CVPixelBufferPoolRef bufferPool adaptor.pixelBufferPool NSParameterAssert bufferPool NULL NSThread sleepForTimeInterval.. j 30 if adaptor.assetWriterInput.readyForMoreMediaData printf appending d attemp d n frameCount j CMTime frameTime CMTimeMake frameCount int32_t 10 append_ok adaptor appendPixelBuffer buffer withPresentationTime frameTime CVPixelBufferPoolRef..

AVAssetWriter Woes

http://stackoverflow.com/questions/6189535/avassetwriter-woes

the pixel buffer to append. void writeImageToMovie CGImageRef image if writerInput isReadyForMoreMediaData CMTime frameTime CMTimeMake 1 20 CMTime lastTime CMTimeMake i 20 i is from 0 to 24 of the loop above CMTime presentTime CMTimeAdd lastTime.. 1 20 CMTime lastTime CMTimeMake i 20 i is from 0 to 24 of the loop above CMTime presentTime CMTimeAdd lastTime frameTime buffer self pixelBufferFromCGImage image BOOL success adaptor appendPixelBuffer buffer withPresentationTime presentTime.. pixelBuffer 0 ...fill the pixelbuffer here CVPixelBufferUnlockBaseAddress pixelBuffer 0 CMTime frameTime CMTimeMake frameCount int32_t 30 BOOL res adaptor appendPixelBuffer pixelBuffer withPresentationTime frameTime CVPixelBufferRelease..