Open Search
    MovieSaver Class Reference

    #include <c4d_basebitmap.h>

    Detailed Description

    The movie saver class is used to write 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 &name, BaseBitmap *bm, Int32 fps, Int32 format, BaseContainer *data, SAVEBIT savebits, BaseSound *sound=nullptr)
     
    IMAGERESULT Write (BaseBitmap *bm)
     
    void Close ()
     
    Bool Choose (Int32 format, BaseContainer *bc)
     

    Private Member Functions

     MovieSaver ()
     
     ~MovieSaver ()
     

    Alloc/Free

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

    Constructor & Destructor Documentation

    ◆ MovieSaver()

    MovieSaver ( )
    private

    ◆ ~MovieSaver()

    ~MovieSaver ( )
    private

    Member Function Documentation

    ◆ Alloc()

    static MovieSaver* Alloc ( )
    static

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

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

    ◆ Free()

    static void Free ( MovieSaver *&  ms)
    static

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

    Parameters
    [in]msThe 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.

    Parameters
    [in]nameA valid filename to save the movie to.
    [in]bmA typical frame of the movie, used for dimensions. The caller owns the pointed bitmap.
    [in]fpsThe frame rate in frames per second.
    [in]formatThe file format. Valid values are:
    [in]dataThe additional settings for the file format. The caller owns the pointed container. Valid IDs are:
    For FILTER_AVI: AVISAVER
    For FILTER_MOVIE: QTSAVER
    [in]savebitsCan be a combination of the following flags: SAVEBIT
    [in]soundThe sound data to be written to the movie.
    Returns
    The result. Possible values are: IMAGERESULT

    ◆ Write()

    IMAGERESULT Write ( BaseBitmap bm)

    Adds another frame to the end of the movie stream.

    Parameters
    [in]bmThe frame to add. The pointed bitmap is copied.
    Returns
    The result: IMAGERESULT

    ◆ Close()

    void Close ( )

    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.

    Parameters
    [in]formatThe file format. Valid values are:
    [out]bcUsed to pass the default settings, and to read the settings the user has chosen. The caller owns the pointed container.
    Returns
    true if the user clicks OK and everything is alright, otherwise false.