I have been used ffmpeg to decode every single frame that I received from my ip cam. The brief code looks like this:
-(void) decodeFrame:(unsigned char *)frameDa
iOS does not provide any public access directly to the hardware decode engine, because hardware is always used to decode H.264 video on iOS.
Therefore, session 513 gives you all the information you need to allow frame-by-frame decoding on iOS. In short, per that session:
CMVideoFormatDescriptionRef
from your SPS and PPS NALUs via CMVideoFormatDescriptionCreateFromH264ParameterSets()
CMSampleBuffer
s per session 513.VTDecompressionSessionRef
, and feed VTDecompressionSessionDecodeFrame()
with the sample buffers
AVSampleBufferDisplayLayer
, whose -enqueueSampleBuffer:
method obviates the need to create your own decoder.