Skip to content

charlesveasey/ofxHapPlayer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ofxHapPlayer

A Hap player for OpenFrameworks on MacOS X and Windows.

Hap is a codec for fast video playback and is available for free here - it is required for accelerated playback using this addon.

Usage

#import "ofxHapPlayer.h"

ofxHapPlayer inherits from ofBaseVideoPlayer

player.loadMovie("movies/MyMovieName.mov");

When you want to draw:

player.draw(20, 20);

Note that there is no direct access to pixels and calls to getPixels() will return NULL.

Advanced Usage

You can access the texture directly:

ofTexture *texture = player.getTexture();

Note that if you access the texture directly for a Hap Q movie, you will need to use a shader when you draw:

ofShader *shader = player.getShader();
// the result of getShader() will be NULL if the movie is not Hap Q
if (shader)
{
    shader->begin();
}
texture.draw(x,y,w,h);
if (shader)
{
    shader->end();
}

Credits and License

ofxHapPlayer was written by Tom Butterworth, April 2013, supported by Igloo Vision and James Sheridan. It is released under a FreeBSD License.

About

A Hap player for OpenFrameworks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 80.4%
  • C 19.6%