NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Public Member Functions | |
Compressor (int width, int height, int mfps, const std::string &filename) | |
~Compressor () | |
void | compresstexture (int gltexture) |
void | preparetexture (int gltexture) |
bool | get_output_info (unsigned int frameno, unsigned __int64 *fileoffset, FrameType::FT *frametype) |
When the destructor runs it will unregister textures passed in via preparetexture() from CUDA. This basically assumes that you are not using the textures in the current CUDA context outside of this library.
video::Compressor::Compressor | ( | int | width, |
int | height, | ||
int | mfps, | ||
const std::string & | filename | ||
) |
mfps | Refresh rate in milli-Hz, e.g. for NTSC 29.97 Hz this would be 29970. |
width | The input and output width of the video. Needs to be even! All formats in StreamFormat have even widths. |
height | The input and output height of the video. If it's not even then this class automatically pads it. This is because NTSC has an odd height (487) and this class should be able to take it directly. |
InteropFailedException | if there are problems with CUDA |
CompressorFailedException | if the compressor engine specifically returns unexpected errors |
std::logic_error | if there's no CUDA or OpenGL context, or both are not on the same device |
video::Compressor::~Compressor | ( | ) |
std::logic_error | if you did not call preparetexture() beforehand |
bool video::Compressor::get_output_info | ( | unsigned int | frameno, |
unsigned __int64 * | fileoffset, | ||
FrameType::FT * | frametype | ||
) |
Returns some info you'll if you want to decompress the output.