13#ifndef FRAME_GRABBER_H
14#define FRAME_GRABBER_H
21#define FRAMEGRABBER_MAX_BYTES 1024*1024*50
25#define FRAMEGRABBER_CROP 0xfffc
82 void setStatusField(SoSFString* field, SoNode* owner) { _status = field; _statusNode = owner; };
91 MLuint8*
grabGLFrame(
void* renderarea ,
int& w,
int& h,
int mode = GL_BACK);
98 void writeToFile(
const char* name, MLuint8* data,
int width,
int height);
101 void createUniqueDirectory();
104 std::string intToString(
int value);
127 std::vector<MLuint8*> _frames;
#define SO_VIEWERS_CLASS_SPEC
FrameGrabber class grabs GL frames for movie generation.
int getMemFrames()
get current mem frame number
MLuint8 * grabGLFrame(void *renderarea, int &w, int &h, int mode=GL_BACK)
returns new buffer with content of gl framebuffer
int getDiskFrames()
get current disk frame number
void createAviWithBink(const char *filename, float framerate)
create AVI out of stored frames (requieres binkconv.exe to be in the PATH)
void cleanup(bool deleteFiles)
cleanup memory, if deleteFiles is set, it also deletes all temporary files
void setMaximumBytes(long bytes)
set the maximum number of bytes stored in memory for movie frames
void stopRecording()
stop recording
void grabFrame(void *renderarea, int mode=GL_BACK)
grab a single gl frame, (mode is GL_FRONT or GL_BACK, front contains windows and mouse also)
void writeCurrentFrameToDisk(const char *name, void *renderarea, int mode)
grabs the current frame and writes to disk
void startRecording()
start recording at 0
long getMaximumBytes()
get the maximum number of bytes stored in memory for movie frames
std::string getFileNameTemplate()
void setStatusField(SoSFString *field, SoNode *owner)
set status field
bool isRecording()
flag if currently a record session is running
void updateStatus(const char *string)
update status
void writeToFiles()
write stored images to temp disk