Giter Site home page Giter Site logo

swipswaps / hap-in-avfoundation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from synopsis/hap-in-avfoundation

0.0 1.0 0.0 2.03 MB

A framework that allows AVFoundation to play back and record Hap video

License: Other

Objective-C 67.14% GLSL 1.61% C 22.21% C++ 7.95% Objective-C++ 1.09%

hap-in-avfoundation's Introduction

HapInAVFoundation Framework

Hap is a video codec for fast decompression on modern graphics hardware. This is the home of the HapInAVFoundation framework. For general information about Hap, see the Hap project.

The HapInAVFoundation framework supports encoding and decoding Hap video. Unlike the QuickTime codec, the HapInAVFoundation framework will only decode to S3TC/DXT frames suitable for upload to graphics hardware at this time. If requested, decoding to RGB(A) pixel formats can be added. Encoding RGB(A) frames is supported. For the most part, this is a port of the hap quicktime codec.

Sample code for a test application ("HapInAVF Test App") that demonstrates the use of this framework for accelerated playback is included.

Download

A compiled version of the framework can be downloaded from the Releases page.

Requires at minimum MacOS 10.10 Yosemite.

Using the HapInAVFoundation.framework

The general idea is to either download or compile the framework, add the framework to your XCode project so you may link against it, and then set up a build phase to copy the framework into your application bundle. This is fairly important: most of the time when you link against a framework, the framework is expected to be installed on your OS. HapInAVFoundation is different: your application will include a compiled copy of the framework. Here's the exact procedure:

If you downloaded a compiled framework

  1. Unzip the framework, add it to your source tree, and then drag the framework into your xcode project file's workspace.
  2. Locate the "Build Phases" section for your project/application's target.
  3. Add the HapInAVFoundation framework to the "Link Binary with Libraries" section.
  4. Create a new "Copy Files" build phase, set its destination to the "Frameworks" folder, and add the HapInAVFoundation framework to this build phase- the goal is to copy the framework you need into the "Frameworks" folder inside your app package.
  5. Switch to the "Build Settings" section of your project's target, locate the "Runpath Search Paths" settings, and make sure that the following paths exist: "@loader_path/../Frameworks" and "@executable_path/../Frameworks".

If you're compiling from source

  1. In XCode, close the HapInAVFoundation project (if it is open), and then open your project.
  2. In the Finder, drag "HapInAVFoundation.xcodeproj" into your project's workspace.
  3. Switch back to XCode, and locate the "Build Phases" section for your project/application's target.
  4. Add a dependency for the "HapInAVFoundation" framework. This will ensure that the framework gets compiled before your project, so there won't be any missing dependencies.
  5. Add the HapInAVFoundation framework to the "Link Binary with Libraries" section.
  6. Create a new "Copy Files" build phase, set its destination to the "Frameworks" folder, and add the HapInAVFoundation framework to this build phase- the goal is to copy the framework you need into the "Frameworks" folder inside your app package.
  7. Switch to the "Build Settings" section of your project's target, locate the "Runpath Search Paths" settings, and make sure that the following paths exist: "@loader_path/../Frameworks" and "@executable_path/../Frameworks".
  8. That's it- you're done now. You can import/include objects from the framework in your source just as you normally would.

Documentation

Documentation for this framework can be found here. The header files are also commented extensively, and the included sample application demonstrates the use of the framework to play back Hap video to GL textures.

Open-Source

The Hap codec project is open-source, licensed under a FreeBSD License, meaning you can use it in your commercial or non-commercial applications free of charge. The hap project was originally written by Tom Butterworth and commissioned by VIDVOX, 2012.

hap-in-avfoundation's People

Contributors

mrray avatar vade avatar bangnoise avatar anome avatar pixlwave avatar

Watchers

 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.