Cinder-Hap

所属分类:云数据库/云存储
开发工具:Objective-C
文件大小:0KB
下载次数:0
上传日期:2013-04-16 14:53:21
上 传 者sh-1993
说明:  CinderHap在Cinder.上启用Hap编解码器。,
(CinderHap enables the Hap codec on Cinder.,)

文件列表:
hap/ (0, 2013-04-16)
hap/HapPixelBufferTexture.h (3650, 2013-04-16)
hap/HapPixelBufferTexture.m (9247, 2013-04-16)
hap/HapSupport.c (7817, 2013-04-16)
hap/HapSupport.h (2731, 2013-04-16)
hap/ScaledCoCgYToRGBA.frag (1997, 2013-04-16)
hap/ScaledCoCgYToRGBA.vert (1645, 2013-04-16)
samples/ (0, 2013-04-16)
samples/hapSample/ (0, 2013-04-16)
samples/hapSample/.DS_Store (6148, 2013-04-16)
samples/hapSample/src/ (0, 2013-04-16)
samples/hapSample/src/hapSample.mm (3703, 2013-04-16)
samples/hapSample/xcode/ (0, 2013-04-16)
samples/hapSample/xcode/.DS_Store (6148, 2013-04-16)
samples/hapSample/xcode/Info.plist (838, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/ (0, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/Roger.mode1v3 (41048, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/Roger.pbxuser (3358, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/project.pbxproj (16227, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/project.xcworkspace/ (0, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata (154, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/project.xcworkspace/xcuserdata/ (0, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/project.xcworkspace/xcuserdata/Roger.xcuserdatad/ (0, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/project.xcworkspace/xcuserdata/Roger.xcuserdatad/UserInterfaceState.xcuserstate (95656, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/project.xcworkspace/xcuserdata/Roger.xcuserdatad/WorkspaceSettings.xcsettings (333, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/xcuserdata/ (0, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/xcuserdata/Roger.xcuserdatad/ (0, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/xcuserdata/Roger.xcuserdatad/xcdebugger/ (0, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/xcuserdata/Roger.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist (3113, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/xcuserdata/Roger.xcuserdatad/xcschemes/ (0, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/xcuserdata/Roger.xcuserdatad/xcschemes/quickTimeSample.xcscheme (3159, 2013-04-16)
samples/hapSample/xcode/hapSample.xcodeproj/xcuserdata/Roger.xcuserdatad/xcschemes/xcschememanagement.plist (487, 2013-04-16)
samples/hapSample/xcode/hapSample_Prefix.pch (161, 2013-04-16)
src/ (0, 2013-04-16)
src/.DS_Store (6148, 2013-04-16)
src/MovieGlHap.h (2144, 2013-04-16)
src/MovieGlHap.mm (9588, 2013-04-16)

Cinder-Hap ========== CinderHap enables the [Hap](http://vdmx.vidvox.net/blog/hap) codec on [Cinder](http://github.com/cinder/Cinder). Hap is an [open source](https://github.com/Vidvox) video codec for fast decompression on modern graphics hardware. Usually when a movie is being played, the CPU has to decompress every frame before passing them to the graphics card (GPU). Hap passes the compressed frames to the GPU, who does all the decompression, saving your precious CPU from this work. Hap was developed by [Tom Butterworth](https://twitter.com/bang_noise) and commissioned by [Vidvox](http://vidvox.net/). For general information about Hap, read the [the Hap announcement](http://vdmx.vidvox.net/blog/hap). For technical information about Hap, see [the Hap project](http://github.com/vidvox/hap). The Hap codec is developed for Mac OSX only, but a Windows version is in the works. How it works ============ Cinder-Hap has a new class called **qtime::MovieGlHap** that acts just like **qtime::MovieGl**. When a movie encoded with Hap is loaded, it will pass compressed frames to Hap. If the movie is not encoded with Hap, everything works like **qtime::MovieGl**. Movies encoded with Hap are much larger than common codecs used for playback, like **Photo-JPEG** and **H.264**. So, to benefit from Hap, you will need an **SSD drive** to read your movies from. To encode your movies with Hap, see [this tutorial](http://vdmx.vidvox.net/tutorials/using-the-hap-video-codec). How to add Cinder-Hap to your existing project ============================================== 1. Install the [Hap QuickTime codec](https://github.com/vidvox/hap-qt-codec). 2. Download or Fork this project to your **$CINDER_PATH/blocks** folder. 3. Add all but the samples sources files to your existing Cinder Xcode project. 4. Add the shaders to your target's **Build Bundle Resources**: ScaledCoCgYToRGBA.frag ScaledCoCgYToRGBA.vert 5. Replace all your **qtime::MovieGl** classes by **qtime::MovieGlHap**. 6. Load a Hap encoded movie and enjoy extra playback smoothness. There's a sample project called **sampleHap** you can use for reference. Extras ====== **qtime::MovieGlHap** has some extra functionalities... * **bool isHap()** Return true if the movie is using a Hap codec. * **void setAsRect(bool b=true)** Hap textures are natively stored as **GL_TEXTURE_2D**, so when you call **getTexture()**, that's what you receive to maximize performance. To keep compatibility with **qtime::MovieGl**, which returns **GL_TEXTURE_RECTANGLE_ARB** textures, call **setAsRect()** once after you create your movie. Internally, Cinder-Hap draws the original 2D texture to an Rect FBO and returns it's texture. So it will consume a little bit more of your CPU/GPU than working with 2D textures. **HapQ** also uses this FBO (2D or Rect, as you wish), because it has to be rendered with the provided shader. * **std::string & getCodecName()** Returns a string containing the Hap version being used by the movie (**Hap**, **HapA** or **HapQ**). If not Hap, returns the [FourCC](http://www.fourcc.org/codecs.php) code of the codec. * **float getPlaybackFramerate()** Returns the actual playback framerate of the movie. Open-Source =========== This code is released under the Modified BSD License, same as [Cinder](http://libcinder.org/). This project was originally written by [Roger Sodr](http://www.studioavante.com/), 2013.

近期下载者

相关文件


收藏者