GithubHelp home page GithubHelp logo

ioshardwaredecoder's Introduction

iOSHardwareDecoder

iOS hardware decoder demo

这是iOS硬解码 H.264 视频的例子

AAPLEAGLLayer.m 是用OpenGL渲染 YUV的Layer,我从苹果例子里抄的

VideoFileParser.m 是个很简陋的264文件的解析,只是用来做例子,不要模仿

ViewController.m 重点看这里,演示了VideoToolbox的API如何调用

注意几点:

iOS解码器接受的Nal数据需要MP4格式的,就是在每个包头的前4字节放Big-endian的size,而不是00 00 00 01的startcode,需要转换下。

初始化解码器用的sps pps数据是不包括startcode的。

解码播放后的视频会抖动,这就对了,因为视频里是有B-frame的,iOS解码器不负责重排B帧顺序,需要应用自己根据PTS去做。

ioshardwaredecoder's People

Contributors

stevenyao avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.