mvCreate(3dm) mvCreate(3dm)
mvCreateFile, mvCreateFD, mvCreateMem - create new movie instances
#include <dmedia/moviefile.h>
DMstatus mvCreateFile( const char* fileName, const DMparams* params,
DMparams* paramsUsedOrNULL, MVid* returnMovie )
DMstatus mvCreateFD( int fd, const DMparams* params, DMparams*
paramsUsedOrNULL, MVid* returnMovie )
DMstatus mvCreateMem( void* pointer, size_t size, const DMparams* params,
DMparams* paramsUsedOrNULL, MVid* returnMovie )
These are the functions that are used to create new movie instances. A
movie instance is a handle that allows you to read, write, edit, and play
a movie file. It contains information about the different tracks (audio
and image) in a movie.
mvCreateFile, mvCreateFD, and mvCreateMem all create a new empty movie,
initialized with the parameters params (see mvSetMovieDefaults(3dm)).
The actual parameters set for the movie are returned in paramsUsedOrNULL
(see mvParams(3dm)). Any movie that was already present in the file or
memory location will be destroyed. The identifier for the new movie is
returned in returnMovie. If everything goes well, DM_SUCCESS is
returned; if not, DM_FAILURE is returned.
#include <dmedia/moviefile.h>
void CreateMovie()
{
DMparams* params;
MVid movie;
if ( dmParamsCreate( ¶ms ) != DM_SUCCESS ) {
/* handle error */
}
if ( mvSetMovieDefaults( params, MV_FORMAT_SGI_3 )
!= DM_SUCCESS ) {
/* handle error */
}
if ( mvCreateFile( "new-movie", params, NULL, &movie )
!= DM_SUCCESS ) {
/* handle error */
}
Page 1
mvCreate(3dm) mvCreate(3dm)
/* Add tracks, insert frames, etc. */
mvClose( movie );
}
mvIntro(3dm), mvOpen(3dm), mvClose(3dm), mvSetMovieDefaults(3dm),
mvGetErrno(3dm).
PPPPaaaaggggeeee 2222 [ Back ]
|