mvOptimize(3dm) mvOptimize(3dm)
mvOptimize - optimize a movie file for playback after editing operations,
or create a flattened movie file
#include <dmedia/moviefile.h>
DMstatus mvOptimize( MVid fromMovie, MVid toMovie );
To play back optimally, the audio data and the image data should be
interleaved and stored in a movie file sequentially, so that the file can
be read without seeking back and forth. Making changes to a movie can
cause the data to be out of order. For example, inserting samples into a
track places the new samples at the end of the file, although the header
information at the beginning of the file may indicate that the inserted
samples are to be played in the middle of the movie. The reason for
doing this is so that the movie editing functions do not have to copy all
of the data in a movie every time it is changed.
mvOptimize sorts the data in a movie file for optimal playback
performance.
In-place optimization has not yet been implemented, so optimization
function simply copies all of the data in a movie from one file to
another, writing the data in the correct order for playback. The
destination movie must be empty before calling mvOptimize.
The Movie library now provides the ability to create movies that
reference data contained in other movie files (see the byReference
parameter of mvCopyFramesAtTime(3dm)). This means that rather than
copying data from movie B to movie A and creating references in movie A's
metadata to the new data, we can merely create references in movie A's
metadata to the data frames residing in movie B. These references are
called external references, or aliases. A movie that contains no
external references (i.e. one whose data is entirely self-contained) is
called a flattened movie.
This capability facilitates rapid editing, because no data frames are
copied between the movies; however, the resulting movie is dependent upon
the movie files it references to not change, move, or disappear. A byproduct
of mvOptimize is that the movie it creates is flattened: it not
only copies frames from fromMovie to toMovie, it copies the frames
referenced in fromMovie, also, resulting in a self-contained movie.
mvOptimize returns DM_SUCCESS or DM_FAILURE. In case of an error, the
error code indicating what kind of error occurred can be obtained from
mvGetErrno.
Page 1
mvOptimize(3dm) mvOptimize(3dm)
For the current release, mvOptimize only works for movies with single
image and audio tracks.
mvIntro(3dm), mvGetErrno(3dm), mvCopyFramesAtTime(3dm).
PPPPaaaaggggeeee 2222 [ Back ]
|