¡@

Home 

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

iphone Programming Glossary: lastsampletime

This code to write video+audio through AVAssetWriter and AVAssetWriterInputs is not working. Why?

http://stackoverflow.com/questions/4149963/this-code-to-write-videoaudio-through-avassetwriter-and-avassetwriterinputs-is

if _isRecording _isRecording NO _videoWriterInput markAsFinished _videoWriter endSessionAtSourceTime lastSampleTime _videoWriter finishWriting NSLog @ video recording stopped And finally the CaptureOutput code void captureOutput AVCaptureOutput.. sampleBuffer NSLog @ sample buffer is not ready. Skipping sample return if _isRecording YES lastSampleTime CMSampleBufferGetPresentationTimeStamp sampleBuffer if _videoWriter.status AVAssetWriterStatusWriting _videoWriter startWriting.. if _videoWriter.status AVAssetWriterStatusWriting _videoWriter startWriting _videoWriter startSessionAtSourceTime lastSampleTime if captureOutput _videoOutput self newVideoSample sampleBuffer If I add audio to the video then the output file gets..

iOS - Scale and crop CMSampleBufferRef/CVImageBufferRef

http://stackoverflow.com/questions/8493583/ios-scale-and-crop-cmsamplebufferref-cvimagebufferref

I can write it directly to videoWriter by using void writeBufferFrame CMSampleBufferRef sampleBuffer CMTime lastSampleTime CMSampleBufferGetPresentationTimeStamp sampleBuffer if self.videoWriter.status AVAssetWriterStatusWriting self.videoWriter.. AVAssetWriterStatusWriting self.videoWriter startWriting self.videoWriter startSessionAtSourceTime lastSampleTime self.videoWriterInput appendSampleBuffer sampleBuffer What I want to do now is to crop and scale the image inside the CMSampleBufferRef..

AVCaptureSession only got video buffer

http://stackoverflow.com/questions/9257052/avcapturesession-only-got-video-buffer

We start the capture self.captureSession startRunning Code from AVCaptureSession delegate captureOutput method lastSampleTime CMSampleBufferGetPresentationTimeStamp sampleBuffer if CMSampleBufferDataIsReady sampleBuffer NSLog @ sample buffer is.. YES switch videoWriter.status case AVAssetWriterStatusUnknown NSLog @ First time execute if CMTimeCompare lastSampleTime kCMTimeZero 0 lastSampleTime CMSampleBufferGetPresentationTimeStamp sampleBuffer videoWriter startWriting videoWriter.. case AVAssetWriterStatusUnknown NSLog @ First time execute if CMTimeCompare lastSampleTime kCMTimeZero 0 lastSampleTime CMSampleBufferGetPresentationTimeStamp sampleBuffer videoWriter startWriting videoWriter startSessionAtSourceTime lastSampleTime..