MovieSaver Class Reference

#include <c4d_basebitmap.h>

详细描述

The movie saver class is used to write movie streams.

注意
Has to be created with Alloc() and destroyed with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

公共成员函数

IMAGERESULT   Open (const Filename &name, BaseBitmap *bm, Int32 fps, Int32 format, BaseContainer *data, SAVEBIT savebits, BaseSound *sound=nullptr)
IMAGERESULT   Write ( BaseBitmap *bm)
void  关闭 (void)
Bool   Choose ( Int32 format, BaseContainer *bc)

私有成员函数

  MovieSaver ()
  ~MovieSaver ()

Alloc/Free

static MovieSaver Alloc (void)
static void  Free ( MovieSaver *&ms)

构造函数 & 析构函数文档编制

◆  MovieSaver()

MovieSaver () private

◆  ~MovieSaver()

~ MovieSaver () private

成员函数文档编制

◆  Alloc()

static MovieSaver * Alloc ( void  )
static

Allocates a movie saver. Destroy the allocated movie saver with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

返回
The allocated movie saver, or nullptr if the allocation failed.

◆  Free()

static void Free ( MovieSaver *&  ms )
static

Destructs movie savers allocated with Alloc() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

参数
[in] ms The movie saver to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

◆  Open()

IMAGERESULT Open ( const Filename name ,
BaseBitmap bm ,
Int32   fps ,
Int32   format ,
BaseContainer data ,
SAVEBIT   savebits ,
BaseSound sound = nullptr  
)

Opens a movie stream to the file name. The resolution and bit depth are defined by the first frame in bm . The framerate is specified by fps .

参数
[in] name A valid filename to save the movie to.
[in] bm A typical frame of the movie, used for dimensions. The caller owns the pointed bitmap.
[in] fps The frame rate in frames per second.
[in] format The file format. Valid values are:
[in] data The additional settings for the file format. The caller owns the pointed container. Valid IDs are:
For FILTER_AVI : AVISAVER
For FILTER_MOVIE : QTSAVER
[in] savebits Can be a combination of the following flags: SAVEBIT
[in] sound The sound data to be written to the movie.
返回
The result. Possible values are: IMAGERESULT

◆  Write()

IMAGERESULT Write ( BaseBitmap bm )

Adds another frame to the end of the movie stream.

参数
[in] bm The frame to add. The pointed bitmap is copied.
返回
The result: IMAGERESULT

◆  Close()

void Close ( void  )

Closes the movie stream.

◆  Choose()

Bool Choose ( Int32   format ,
BaseContainer bc  
)

Opens the standard compression chooser for movie formats. The new settings are stored in bc if the user clicks OK .

参数
[in] format The file format. Valid values are:
[out] bc Used to pass the default settings, and to read the settings the user has chosen. The caller owns the pointed container.
返回
true if the user clicks OK and everything is alright, otherwise false .