Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoMPEGFrameRenderer Class Reference

VSG extension Generates MPEG output, frame by frame. More...

#include <Inventor/MPEG/SoMPEGFrameRenderer.h>

+ Inheritance diagram for SoMPEGFrameRenderer:

Public Member Functions

 SoMPEGFrameRenderer ()
 Constructor.
 
virtual ~SoMPEGFrameRenderer ()
 Destructor.
 
void recordFrame (float duration=0)
 Adds a new frame to the current MPEG output.
 
- Public Member Functions inherited from SoMPEGRenderer
 SoMPEGRenderer ()
 Constructor.
 
virtual ~SoMPEGRenderer ()
 Destructor.
 
SbBool openFile (const char *filename, unsigned int numFrames=10000)
 Specifies the MPEG output file name.
 
void closeFile ()
 Closes the MPEG file previously opened with the openFile() method.
 
void setFilePointer (FILE *fp)
 Sets the file pointer for the MPEG output.
 
FILE * getFilePointer () const
 Gets the MPEG file pointer.
 
void setSize (const SbVec2s &size)
 Sets the frame pixel size.
 
SbVec2s getSize () const
 Gets the frame pixel size.
 
void setComponents (const Components components)
 Set the number of color components of the frames recorded.
 
SoMPEGRenderer::Components getComponents () const
 Returns the number of color components of the frames recorded.
 
virtual void setSceneGraph (SoNode *node)
 Sets the scene graph used for generating frames in the MPEG output.
 
SoNodegetSceneGraph () const
 Gets the scene graph used for generating frames in the MPEG output.
 
void setBackgroundColor (const SbColor &c)
 Sets the background color for rendering each frame.
 
SbColor getBackgroundColor () const
 Gets the background color for rendering each frame.
 
void setGLRenderAction (SoGLRenderAction *ra)
 Sets the GL Render action used to generate each frame.
 
SoGLRenderActiongetGLRenderAction () const
 Gets the GL Render action used to generate each frame.
 
void setCompressionRate (float value)
 Compression rate of the MPEG output.
 
float getCompressionRate () const
 Returns the compression rate.
 
void setBitPerSec (float mbps)
 This method allows the user to specify a fixed bit rate.
 
void setNumFramesPerSecond (float num)
 Sets the number of frames per second encoded in the MPEG output.
 
int getNumFramesPerSecond ()
 Gets the number of frames per second to be encoded in the MPEG output.
 
void addFrame (const unsigned char *frame)
 Low level method to add a new frame to the MPEG output from a buffer of unsigned characters.
 
void setShareContext (const SbGLShareContext shareCxt)
 Sets the OpenGL context to be shared by the SoMPEGRenderer.
 
const SbGLShareContext getShareContext () const
 Gets the OpenGL context shared by this object.
 
virtual void record ()
 Starts the recording.
 
virtual void pause ()
 Pauses the recording.
 
virtual void stop ()
 Stops the recording and closes the opened file.
 
SbBool isRecording () const
 Returns true if this renderer is recording.
 
void setViewerIsIdle (bool isIdle)
 Tells the recorder that the viewer is idle.
 
bool isViewerIdle () const
 

Additional Inherited Members

- Public Types inherited from SoMPEGRenderer
enum  Components {
  LUMINANCE = 1 ,
  LUMINANCE_TRANSPARENCY = 2 ,
  RGB = 3 ,
  RGB_TRANSPARENCY = 4
}
 Components. More...
 

Detailed Description

VSG extension Generates MPEG output, frame by frame.

This class generates MPEG output, frame by frame.

See the parent class SoMPEGRenderer for methods to specify the file and recording parameters.

SEE ALSO

SoMPEGRenderer, SoMPEGNavRenderer

Definition at line 50 of file SoMPEGFrameRenderer.h.

Constructor & Destructor Documentation

◆ SoMPEGFrameRenderer()

SoMPEGFrameRenderer::SoMPEGFrameRenderer ( )

Constructor.

◆ ~SoMPEGFrameRenderer()

virtual SoMPEGFrameRenderer::~SoMPEGFrameRenderer ( )
virtual

Destructor.

Member Function Documentation

◆ recordFrame()

void SoMPEGFrameRenderer::recordFrame ( float  duration = 0)

Adds a new frame to the current MPEG output.

The duration (specified in seconds) is used to determine how many times this frame must be played in the MPEG output depending on the current number of frames per second (as specified by the method SoMPEGRenderer::setNumFramesPerSecond()).


The documentation for this class was generated from the following file: