QMedia Video media commands |

### QM_SetVideoMediaCompression

QM_SetVideoMediaCompression(movieRef; trackID; codecType; codecQuality; codecDepth):error
| movieRef | Longint | Movie reference
| trackID | Longint | Track ID
| codecType | String4 | Codec type
| codecQuality | Longint | Compression quality
| codecDepth | Longint | Color depth
| error | Longint | Error result

Changes the compression options that are used when adding samples to a video track.

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

Parameter trackID is the ID of the track.

Parameter codecType is the four character identifier of the compressor (codec) component. For a list of available compressor components, use the QM_GetCodecList command.

Parameter codecQuality is the compression quality. QMedia defines the following constants for specifying the compression quality:

qm_MinQuality | 0 | Minimum compression quality.
qm_LowQuality | 256 | Low compression quality.
qm_NormalQuality | 512 | Normal compression quality.
qm_HighQuality | 768 | High compression quality.
qm_MaxQuality | 1023 | Maximum compression quality.
qm_LosslessQuality | 1024 | Lossless compression quality.

Parameter codecDepth specifies the color depth at which video samples are compressed. A value of 0 means that the compressor component must choose the best depth for the video samples.

QMedia sets the default compression options to the following values:

Codec: | "jpeg"
Quality: | qm_NormalQuality (512)
Depth: | 0 (use best depth)

Example

``Set the compression settings for video track $trackID` `` `C_STRING(4;$codec)` `C_LONGINT($quality;$depth)` `` `$codec:="jpeg" `JPEG codec` `$quality:=qm_HighQuality `High quality` `$depth:=0 `Best depth` `` `$err:=QM_SetVideoMediaCompression ($movie;$trackID;$codec;$quality;0)` `` ``

Related commands

QM_GetVideoMediaCompression | Returns the compression options of new video samples.
QM_DoCodecSettingsDialog | Displays the compression settings dialog.
QM_GetCodecs | Returns the list of all QuickTime codecs

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