来源:http://stackoverflow.com/questions/25197169/how-to-decode-a-h-264-frame-on-ios-by-hardware-decoding
I have been used ffmpeg to decode every single frame that I received from my ip cam. The brief code looks like this:
The code woks fine, but it's software decoding. I want to enhance the decoding performance by hardware decoding. After lots of research, I know it may be achieved by AVFoundation framework. The AVAssetReader class may help, but I can't figure out what's the next.Could anyone points out the following steps for me? Any help would be appreciated. | |||
add a comment
|
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:
| |||||||||||||||||
|
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:
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? | |||||
|