Class CamcorderModule
java.lang.Object
gaiasky.script.v2.impl.APIModule
gaiasky.script.v2.impl.CamcorderModule
- All Implemented Interfaces:
CamcorderAPI
The camcorder module contains methods and calls related to the camera path subsystem and
the camcorder, which enables capturing and playing back camera path files.
-
Field Summary
Fields inherited from class APIModule
api, em, logger, me, nameModifier and TypeFieldDescriptionprotected final APIv2Reference to API object.protected final EventManagerReference to event manager.protected final Logger.Logprotected final APIModuleReference to self.protected final StringModule name. -
Constructor Summary
ConstructorsConstructorDescriptionCamcorderModule(EventManager em, APIv2 api, String name) Create a new module with the given attributes. -
Method Summary
Modifier and TypeMethodDescriptiondoubleget_fps()Get the current frame rate setting of the camcorder.voidPlay a.gsccamera path file and returns immediately.voidRuns a .gsc camera path file and returns immediately.voidset_fps(double fps) Set the target frame rate of the camcorder.voidstart()Start recording the camera path to an auto-generated file in the default camera directory (BaseModule.get_camcorder_dir()).voidStart recording a camera path with the given filename.voidstop()Stop the current camera recording.
-
Constructor Details
-
CamcorderModule
Create a new module with the given attributes.- Parameters:
api- Reference to the API class.name- Name of the module.
-
-
Method Details
-
set_fps
public void set_fps(double fps) Description copied from interface:CamcorderAPISet the target frame rate of the camcorder. This artificially sets the frame rate (inverse of frame time) of Gaia Sky to this value while the camera is recording and playing. Make sure to use the right FPS setting during playback.- Specified by:
set_fpsin interfaceCamcorderAPI- Parameters:
fps- The target frame rate for the camcorder.
-
get_fps
public double get_fps()Description copied from interface:CamcorderAPIGet the current frame rate setting of the camcorder.- Specified by:
get_fpsin interfaceCamcorderAPI- Returns:
- The frame rate setting of the camcorder.
-
start
public void start()Description copied from interface:CamcorderAPIStart recording the camera path to an auto-generated file in the default camera directory (BaseModule.get_camcorder_dir()). This command has no effect if the camera is already being recorded.- Specified by:
startin interfaceCamcorderAPI
-
start
Description copied from interface:CamcorderAPIStart recording a camera path with the given filename. The filename is without extension or path. The final path with the camera file, after invokingCamcorderAPI.stop(), is:BaseModule.get_camcorder_dir()+ "/" + filename + ".gsc"This command has no effect if the camera is already being recorded.
- Specified by:
startin interfaceCamcorderAPI- Parameters:
path- Path to the camera file to play.
-
stop
public void stop()Description copied from interface:CamcorderAPIStop the current camera recording. This command has no effect if the camera was not being recorded.- Specified by:
stopin interfaceCamcorderAPI
-
play
Description copied from interface:CamcorderAPIRuns a .gsc camera path file and returns immediately. This function accepts a boolean indicating whether to wait for the camera path file to finish or not.- Specified by:
playin interfaceCamcorderAPI- Parameters:
path- The path to the camera file. Path is relative to the application's root directory or absolute.sync- If true, the call is synchronous and waits for the camera file to finish. Otherwise, it returns immediately.
-
play
Description copied from interface:CamcorderAPIPlay a.gsccamera path file and returns immediately. This method does not wait for the camera path file to finish playing.- Specified by:
playin interfaceCamcorderAPI- Parameters:
path- The path to the camera file. Path is relative to the application's root directory or absolute.
-