My Project
Static Public Member Functions | List of all members
ParaScripting::ParaMovie Class Reference

movie making and screen capture functions More...

#include <ParaScriptingMovie.h>

Static Public Member Functions

static ParaAttributeObject GetAttributeObject ()
 get the attribute object associated with an object. More...
 
static void SetMovieScreenSize (int nWidth, int nHeight)
 set the movie screen size in pixel. More...
 
static void SetCaptureGUI (bool bGUI)
 set whether GUI is captured. More...
 
static bool CaptureGUI ()
 return true if GUI is also captured. More...
 
static void SetRecordingFPS (int nFPS)
 set the recording FPS, the default is 20 FPS. More...
 
static int GetRecordingFPS ()
 Get the recording FPS, the default is 20 FPS. More...
 
static void SetStereoCaptureMode (int nMode)
 set the stereo capture mode. More...
 
static int GetStereoCaptureMode ()
 Get the stereo capture mode. More...
 
static void SetStereoEyeSeparation (float fDist)
 the distance in meters between the left and right eye when generating the stereo image. More...
 
static float GetStereoEyeSeparation ()
 the distance in meters between the left and right eye when generating the stereo image. More...
 
static bool BeginCapture (string sFileName)
 starting capturing a screen movie More...
 
static bool EndCapture ()
 end capturing a screen movie and save movie to file. More...
 
static void PauseCapture ()
 pause the capturing. More...
 
static void ResumeCapture ()
 resume capturing
 
static bool IsInCaptureSession ()
 whether we are doing screen capture. More...
 
static bool IsRecording ()
 whether it is recording. More...
 
static bool FrameCapture ()
 capture a given frame
 
static void GetMovieScreenSize (int *nWidth, int *nHeight)
 get movie screen size. More...
 
static string GetMovieFileName ()
 get the movie file name
 
static void SelectCodecOptions ()
 display a dialog which allows the user to set the codec to be used. More...
 
static void SetEncodeMethod (int eType)
 set the code More...
 
static int GetEncodeMethod ()
 
static bool TakeScreenShot (const char *filename)
 we will automatically take screen shot according to the file extensions, supported file extensions are "jpg","dds","bmp","tga", More...
 
static bool TakeScreenShot3 (const char *filename, int width, int height)
 render the current scene to texture, UI are disabled by default. More...
 
static void TakeScreenShot_Async (const char *filename, const char *sCallBackScript)
 
static void TakeScreenShot2_Async (const char *filename, bool bEncode, const char *sCallBackScript)
 
static void TakeScreenShot3_Async (const char *filename, bool bEncode, int width, int height, const char *sCallBackScript)
 
static void TakeScreenShot_Async_Internal (const char *filename, bool bEncode, int width, int height, const char *sCallBackScript)
 
static bool RenderToTexture (const char *filename, int width, int height)
 
static bool ResizeImage (const string &filename, int width, int height, const char *destFilename)
 resize the given image. More...
 
static void GetImageInfo (const string &filename, int *width, int *height, int *nFileSize)
 get the given image info: i.e. More...
 

Detailed Description

movie making and screen capture functions

Member Function Documentation

§ BeginCapture()

bool ParaScripting::ParaMovie::BeginCapture ( string  sFileName)
static

starting capturing a screen movie

Parameters
sFileNamethe movie file name, which can be "". If it is "", a default name is used.

§ CaptureGUI()

bool ParaScripting::ParaMovie::CaptureGUI ( )
static

return true if GUI is also captured.

§ EndCapture()

bool ParaScripting::ParaMovie::EndCapture ( )
static

end capturing a screen movie and save movie to file.

§ GetAttributeObject()

ParaScripting::ParaAttributeObject ParaScripting::ParaMovie::GetAttributeObject ( )
static

get the attribute object associated with an object.

§ GetEncodeMethod()

int ParaScripting::ParaMovie::GetEncodeMethod ( )
static

§ GetImageInfo()

void ParaScripting::ParaMovie::GetImageInfo ( const string &  filename,
int *  width,
int *  height,
int *  nFileSize 
)
static

get the given image info: i.e.

size e.g. local width, height, filesize = ParaMovie.GetImageInfo("abc.jpg")

Parameters
width;out in pixel
height;out in pixel
nFileSizeout in size in bytes

§ GetMovieScreenSize()

void ParaScripting::ParaMovie::GetMovieScreenSize ( int *  nWidth,
int *  nHeight 
)
static

get movie screen size.

In script. Use like this : local x,y = ParaMovie.GetMovieScreenSize();

§ GetRecordingFPS()

int ParaScripting::ParaMovie::GetRecordingFPS ( )
static

Get the recording FPS, the default is 20 FPS.

Some may prefer 30FPS.

§ GetStereoCaptureMode()

int ParaScripting::ParaMovie::GetStereoCaptureMode ( )
static

Get the stereo capture mode.

This is used to generate video files that can be viewed by 3d eye glasses and stereo video player.

  • 0 for disable stereo capture(default);
  • 1 for iPod mode, where the odd frame is the left eye and even frame is the right image;
  • 2 for left right stereo;
  • 3 for above below stereo;
  • 4 for interlaced stereo.

§ GetStereoEyeSeparation()

float ParaScripting::ParaMovie::GetStereoEyeSeparation ( )
static

the distance in meters between the left and right eye when generating the stereo image.

some common values are in range [0.03, 0.1]. This is also related to the rendering unit that we used in games. since ParaEngine games usually use meter as its rendering unit, the value is such near the real eye separation distance.

§ IsInCaptureSession()

bool ParaScripting::ParaMovie::IsInCaptureSession ( )
static

whether we are doing screen capture.

I.e. true between BeginCapture() and EndCapture() However, it may be in the recording or paused state.

§ IsRecording()

bool ParaScripting::ParaMovie::IsRecording ( )
static

whether it is recording.

§ PauseCapture()

void ParaScripting::ParaMovie::PauseCapture ( )
static

pause the capturing.

§ ResizeImage()

bool ParaScripting::ParaMovie::ResizeImage ( const string &  filename,
int  width,
int  height,
const char *  destFilename 
)
static

resize the given image.

It can also be used to change the file format

Parameters
filenamesource file name
width;in pixel
height;in pixel
destFilenamedestination file name. If nil or "", it will be the same as input. It can also be used to change the file format

§ SelectCodecOptions()

void ParaScripting::ParaMovie::SelectCodecOptions ( )
static

display a dialog which allows the user to set the codec to be used.

§ SetCaptureGUI()

void ParaScripting::ParaMovie::SetCaptureGUI ( bool  bGUI)
static

set whether GUI is captured.

§ SetEncodeMethod()

void ParaScripting::ParaMovie::SetEncodeMethod ( int  eType)
static

set the code

Parameters
eType0 for XVID; 1 for WMV; -1 for user select codec.

§ SetMovieScreenSize()

void ParaScripting::ParaMovie::SetMovieScreenSize ( int  nWidth,
int  nHeight 
)
static

set the movie screen size in pixel.

Parameters
nWidthin pixels, must be multiple of 4.
nHeightin pixels, must be multiple of 4.

§ SetRecordingFPS()

void ParaScripting::ParaMovie::SetRecordingFPS ( int  nFPS)
static

set the recording FPS, the default is 20 FPS.

Some may prefer 30FPS.

§ SetStereoCaptureMode()

void ParaScripting::ParaMovie::SetStereoCaptureMode ( int  nMode)
static

set the stereo capture mode.

This is used to generate video files that can be viewed by 3d eye glasses and stereo video player.

  • 0 for disable stereo capture(default);
  • 1 for line interlaced stereo.
  • 2 for left right stereo;
  • 3 for above below stereo;
  • 4 for frame interlaved mode, where the odd frame is the left eye and even frame is the right image;

§ SetStereoEyeSeparation()

void ParaScripting::ParaMovie::SetStereoEyeSeparation ( float  fDist)
static

the distance in meters between the left and right eye when generating the stereo image.

some common values are in range [0.03, 0.1]. This is also related to the rendering unit that we used in games. since ParaEngine games usually use meter as its rendering unit, the value is such near the real eye separation distance.

§ TakeScreenShot()

bool ParaScripting::ParaMovie::TakeScreenShot ( const char *  filename)
static

we will automatically take screen shot according to the file extensions, supported file extensions are "jpg","dds","bmp","tga",

Note
: "jpg" has small file size; where "bmp" and "tga" is lossless.
Parameters
filenamethis is the file name.If this is NULL or "", it will be automatically named as jpg file under the "screen shots" directory.

§ TakeScreenShot3()

bool ParaScripting::ParaMovie::TakeScreenShot3 ( const char *  filename,
int  width,
int  height 
)
static

render the current scene to texture, UI are disabled by default.

Aspect ratio are changed according to width/height. supported file extensions are "jpg","dds","bmp","tga",

Note
: "jpg" has small file size; where "bmp" and "tga" is lossless.
Parameters
filenamethis is the file name.If this is NULL or "", it will be automatically named as jpg file under the "screen shots" directory.
width;in pixel, if 0 it will be the screen size
height;in pixel, if 0 it will be the screen size

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