GetMediaDataSize
The GetMediaDataSize function allows your application to determine the size, in bytes, of the sample data in a media segment.
pascal long GetMediaDataSize (Media theMedia, TimeValue startTime,
TimeValue duration);
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).
startTime
- Contains a time value specifying the starting point of the segment.
duration
- Contains a time value that specifies the duration of the segment.
DESCRIPTION
The GetMediaDataSize function returns a long integer that contains the size, in bytes, of the media's sample data that lies in the specified segment. Note that this number does not necessarily correspond to the amount of sample data used in the track that contains the media. Some samples in the media may not be used in the track, and others may be used more than once.
ERROR CODES
| invalidMedia | -2008 | This media is corrupted or invalid |
| invalidDuration | -2014 | This duration value is invalid |
| invalidTime | -2015 | This time value is invalid |