QMedia Movie file commands |

### QM_FlattenMovie

QM_FlattenMovie(movieRef; destFile; flattenFlags):error
| movieRef | Longint | Source movie reference
| destFile | Text | Destination movie file path
| flattenFlags | Longint | Flags
| error | Longint | Error result

Creates a copy of an existing movie and stores it in a new movie file. The new movie file is constructed in a certain way that it can be moved accross platform or published on the web. This command creates single-fork, self-contained, fast-start movies.

Single fork movies | Single fork movies do not store their movie atom (resource) in the resource fork, but rather in the data fork of the movie file. This is also a requirement for cross-platform movies.
Self contained movies | It is possible for a movie to refer to media in other files. A movie that does not depend on other files is self contained.
Fast start movies | Fast start movies have their movie atom stored at the begining of the data fork. This allows the browser plug-in to start playing the movie as soon as it receives the movie atom (the structure of the movie), and continue playing it while downloading media data at the same time.

Parameter movieRef is the reference to the source movie instance. The movie reference must have been previously obtained with a call to QM_NewMovieFromFile.

Parameter destFile is the full pathname to the movie file to be created. The specified file may not already exist, but its containing folder path must be valid. If destFile points to an existing file, the later is replaced by the new movie file.

If movieFile is empty, QMedia presents the standard file saving dialog where the user can select the location and type the name of the new movie file. If the user cancels the dialog, error qm_userCancelErr is returned, otherwise parameter destFile receives the full pathname of the new movie file.

Parameter flattenFlags is an optional set of flags that specify options for the flattening operation. It is the sum (or bitwise "or" combination) of any of the following constants.

qm_FlattenCompressMovieHeader | 0x0001 | Compress the movie file header for faster download.
qm_FlattenEnabledTracksOnly | 0x0002 | Flatten only enabled tracks.

QMedia © Escape OE
Generated by QDoc 2.8 on Thu, Nov 24, 2011 18:41:46