How to decode a H.264 frame on iOS by hardware decoding?

后端 未结 2 466
遇见更好的自我
遇见更好的自我 2021-02-02 16:28

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         


        
2条回答
  •  渐次进展
    2021-02-02 16:35

    Edit:

    This link provide more detail explanation on how to decode h.264 step by step: stackoverflow.com/a/29525001/3156169

    Original answer:

    I watched the session 513 "Direct Access to Video Encoding and Decoding" in WWDC 2014 yesterday, and got the answer of my own question.

    The speaker says:

    We have Video Toolbox(in iOS 8). Video Toolbox has been there on OS X for a while, but now it's finally populated with headers on iOS.This provides direct access to encoders and decoders.

    So, there is no way to do hardware decoding frame by frame in iOS 7, but it can be done in iOS 8.

    Is there anyone figure out how to directly access to video encoding and decoding frame by frame in iOS 8?

提交回复
热议问题