MovieLoader Class Reference

#include <c4d_basebitmap.h>

Detailed Description

The movie loader class is used to read movie streams.

Note
Has to be created with Alloc() and destroyed with Free(). Use AutoAlloc to automate the allocation and destruction based on scope.

Public Member Functions

IMAGERESULT Open (const Filename &fn)
 
void Close ()
 
BaseBitmapRead (Int32 new_frame_idx=-1, Int32 *_result=nullptr)
 
Int32 GetInfo (Float *_fps)
 

Private Member Functions

 MovieLoader ()
 
 ~MovieLoader ()
 
void InitData ()
 
void FreeData ()
 

Private Attributes

BitmapLoaderPluginplugin
 
BitmapLoaderAnimatedData plugin_data
 
BaseBitmapbm
 
Bool is_movie
 
Int32 frame_cnt
 
Float fps
 
Int32 frame_idx
 
IMAGERESULT result
 

Alloc/Free

static MovieLoaderAlloc ()
 
static void Free (MovieLoader *&ml)
 

Constructor & Destructor Documentation

◆ MovieLoader()

MovieLoader ( )
private

◆ ~MovieLoader()

~MovieLoader ( )
private

Member Function Documentation

◆ InitData()

void InitData ( )
private

◆ FreeData()

void FreeData ( )
private

◆ Alloc()

static MovieLoader* Alloc ( )
static

Allocates a movie loader. Destroy the allocated movie loader with Free(). Use AutoAlloc to automate the allocation and destruction based on scope.

Returns
The allocated movie loader, or nullptr if the allocation failed.

◆ Free()

static void Free ( MovieLoader *&  ml)
static

Destructs movie loaders allocated with Alloc(). Use AutoAlloc to automate the allocation and destruction based on scope.

Parameters
[in]mlThe ml to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

◆ Open()

IMAGERESULT Open ( const Filename fn)

Opens a movie file.

Parameters
[in]fnThe filename of the movie clip to open.
Returns
The result. The possible values are: IMAGERESULT

◆ Close()

void Close ( )

Close the loaded movie file.

◆ Read()

BaseBitmap* Read ( Int32  new_frame_idx = -1,
Int32 _result = nullptr 
)

Reads a frame of the loaded movie clip.

Parameters
[in]new_frame_idxThe frame number of the frame to be read.
[out]_resultThe result. Assigned one of these values: IMAGERESULT
Returns
The frame's bitmap.

◆ GetInfo()

Int32 GetInfo ( Float _fps)

Gets information about the movie's frame count and frames per second.

Parameters
[out]_fpsAssigned the frames per second.
Returns
The frame count.

Member Data Documentation

◆ plugin

BitmapLoaderPlugin* plugin
private

◆ plugin_data

BitmapLoaderAnimatedData plugin_data
private

◆ bm

BaseBitmap* bm
private

◆ is_movie

Bool is_movie
private

◆ frame_cnt

Int32 frame_cnt
private

◆ fps

Float fps
private

◆ frame_idx

Int32 frame_idx
private

◆ result

IMAGERESULT result
private