SetMediaQuality
The SetMediaQuality function sets a media's quality level value. The Movie Toolbox uses this quality value to determine which track it selects to play on a given Macintosh computer. You should set this value only when you are creating a new media.
pascal void SetMediaQuality (Media theMedia, short quality);
theMedia
- Specifies the media for this operation. Your application obtains this media identifier from such Movie Toolbox functions as
NewTrackMedia and GetTrackMedia (described on page 2-138 and page 2-190, respectively).
quality
- Specifies the media's quality value. The quality value indicates the pixel depths at which the media can be played. This even applies to sound media. The low-order 6 bits of the quality value correspond to specific pixel depths. If a bit is set to 1, the media can be played at the corresponding depth. More than one of these bits may be set to 1. The following bits are defined:
| | Bit 0 | 1 bit per pixel |
| | Bit 1 | 2 bits per pixel |
| | Bit 2 | 4 bits per pixel |
| | Bit 3 | 8 bits per pixel |
| | Bit 4 | 16 bits per pixel |
| | Bit 5 | 32 bits per pixel |
-
- In addition, bits 6 and 7 define the media's quality level. A value of 0 corresponds to the lowest quality level; a value of 3 corresponds to the highest quality level. The following constants define these values:
mediaQualityDraft
- Specifies the lowest quality level. This constant sets bits
6 and 7 to a value of 0.
mediaQualityNormal
- Specifies an acceptable quality level. This constant sets bits 6 and 7 to a value of 1.
mediaQualityBetter
- Specifies a higher quality level. This constant sets bits
6 and 7 to a value of 2.
mediaQualityBest
- Specifies the highest quality level. This constant sets bits 6 and 7 to a value of 3.
ERROR CODES
| invalidMedia | -2008 | This media is corrupted or invalid |
SEE ALSO
You can retrieve the quality value of a media by calling the GetMediaQuality function, which is described in the next section.