27#ifndef _SO_MPEGRENDERER_
28#define _SO_MPEGRENDERER_
36#include <Inventor/STL/list>
368 void computeRate(
double curVwrFPS );
378 int getNumFrameToEncode();
387 void encodeTask(
void);
389 static void* encodeCB(
void* data );
391 static std::list<unsigned char*>* m_frameStack;
398 int m_frameSize, m_recFrameRate, m_frameCount;
414 SbBool m_hasFileOpened, m_isRecording;
420 SbBool m_openedFileWarningDisplayed;
Class encapsulating information about an OpenGL context: a handle on an OpenGL context and its id.
Class for smart character strings.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Portable thread ...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Portable mutex c...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Portable signal ...
Renders a scene graph using Open Inventor's Render Engine.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Base class for g...
SoMPEGRenderer()
Constructor.
void addFrame(const unsigned char *frame)
Low level method to add a new frame to the MPEG output from a buffer of unsigned characters.
SbBool isRecording() const
Returns true if this renderer is recording.
float getCompressionRate() const
Returns the compression rate.
virtual ~SoMPEGRenderer()
Destructor.
void setFilePointer(FILE *fp)
Sets the file pointer for the MPEG output.
int getNumFramesPerSecond()
Gets the number of frames per second to be encoded in the MPEG output.
void setShareContext(const SbGLShareContext shareCxt)
Sets the OpenGL context to be shared by the SoMPEGRenderer.
void setGLRenderAction(SoGLRenderAction *ra)
Sets the GL Render action used to generate each frame.
void setCompressionRate(float value)
Compression rate of the MPEG output.
SoGLRenderAction * getGLRenderAction() const
Gets the GL Render action used to generate each frame.
@ LUMINANCE_TRANSPARENCY
Luminance transparency.
@ RGB_TRANSPARENCY
RGB and Alpha channel.
SbVec2s getSize() const
Gets the frame pixel size.
SoNode * getSceneGraph() const
Gets the scene graph used for generating frames in the MPEG output.
virtual void setSceneGraph(SoNode *node)
Sets the scene graph used for generating frames in the MPEG output.
FILE * getFilePointer() const
Gets the MPEG file pointer.
virtual void pause()
Pauses the recording.
virtual void record()
Starts the recording.
SbColor getBackgroundColor() const
Gets the background color for rendering each frame.
void setNumFramesPerSecond(float num)
Sets the number of frames per second encoded in the MPEG output.
virtual void stop()
Stops the recording and closes the opened file.
SoMPEGRenderer::Components getComponents() const
Returns the number of color components of the frames recorded.
bool isViewerIdle() const
const SbGLShareContext getShareContext() const
Gets the OpenGL context shared by this object.
void setSize(const SbVec2s &size)
Sets the frame pixel size.
void setBackgroundColor(const SbColor &c)
Sets the background color for rendering each frame.
void setComponents(const Components components)
Set the number of color components of the frames recorded.
SbBool openFile(const char *filename, unsigned int numFrames=10000)
Specifies the MPEG output file name.
void setViewerIsIdle(bool isIdle)
Tells the recorder that the viewer is idle.
void setBitPerSec(float mbps)
This method allows the user to specify a fixed bit rate.
void closeFile()
Closes the MPEG file previously opened with the openFile() method.
Abstract base class for all database nodes.