VideoCapture

Engine/source/gfx/video/videoCapture.h

Video capture interface class.

More...

Classes:

Private Static Attributes

Vector< EncoderFactory >

List of encoder factory functions.

Private Attributes

Vector with bitmaps to delete.

The canvas we're recording from.

Our current video encoder.

Name of the encoder we'll be using.

Output filename.

Our video frame grabber.

The framerate we'll use to record.

bool

True if we're recording.

The per-frame time (in milliseconds)

Accumulated error when converting the per-frame-time to integer this is used to dither the value and keep overall time advancing correct.

Frame to be captured next.

The video output resolution.

Time when we captured the previous frame.

bool

Tur if we're waiting for a canvas to bre created before capturing.

Private Functions

Deletes processed bitmaps.

bool
initEncoder(const char * name)

Initializes our encoder.

Public Functions

begin(GuiCanvas * canvas)

Start a video capture session.

Captures a new frame.

end()

Ends a video capture.

Returns the number of milliseconds per frame.

bool

Returns true if we're capturing.

setEncoderName(const char * encoder)

Sets the encoder we'll use.

setFilename(const char * filename)

Sets the output filename.

Sets the video farme grabber (cannot record without one).

Sets the framerate.

Sets the video output resolution.

This will make the video capture begin capturing as soon as a GuiCanvas is created.

Public Static Functions

Registers an encoder.

Detailed Description

Video capture interface class.

Private Static Attributes

Vector< EncoderFactory > mEncoderFactoryFnList 

List of encoder factory functions.

Private Attributes

Vector< GBitmap * > mBitmapDeleteList 

Vector with bitmaps to delete.

GuiCanvas * mCanvas 

The canvas we're recording from.

F32 mCapturedFramePos 
VideoEncoder * mEncoder 

Our current video encoder.

String mEncoderName 

Name of the encoder we'll be using.

String mFileName 

Output filename.

VideoFrameGrabber * mFrameGrabber 

Our video frame grabber.

F32 mFrameRate 

The framerate we'll use to record.

bool mIsRecording 

True if we're recording.

F32 mMsPerFrame 

The per-frame time (in milliseconds)

F32 mMsPerFrameError 

Accumulated error when converting the per-frame-time to integer this is used to dither the value and keep overall time advancing correct.

F32 mNextFramePosition 

Frame to be captured next.

Point2I mResolution 

The video output resolution.

U32 mVideoCaptureStartTime 

Time when we captured the previous frame.

bool mWaitingForCanvas 

Tur if we're waiting for a canvas to bre created before capturing.

Private Functions

deleteProcessedBitmaps()

Deletes processed bitmaps.

initEncoder(const char * name)

Initializes our encoder.

Public Functions

VideoCapture()

begin(GuiCanvas * canvas)

Start a video capture session.

capture()

Captures a new frame.

end()

Ends a video capture.

getMsPerFrame()

Returns the number of milliseconds per frame.

isRecording()

Returns true if we're capturing.

isWaitingForCanvas()

setEncoderName(const char * encoder)

Sets the encoder we'll use.

setFilename(const char * filename)

Sets the output filename.

setFrameGrabber(VideoFrameGrabber * grabber)

Sets the video farme grabber (cannot record without one).

setFramerate(F32 fps)

Sets the framerate.

setResolution(const Point2I & res)

Sets the video output resolution.

waitForCanvas()

This will make the video capture begin capturing as soon as a GuiCanvas is created.

Public Static Functions

getSingletonName()

registerEncoder(const char * name, VideoEncoderFactoryFn factoryFn)

Registers an encoder.