The player calls this function to determine the duration of the given media.
|
Parameters |
Description |
|
medianame |
[in] string of filename or stream URL (encoding determined by version setting) |
|
ext |
[in] plug-in provided track extents info (members to be set by plug-in) |
|
flags |
[in] the following flags are defined: GETTRACKEXTENTS_DEFAULT: default flag, TrackExtents need to be determined GETTRACKEXTENTS_VERIFY: indicates TrackExtents parameter has pre-populated values that the plug-in can either ignore, verify, and/or modify to its needs. |
|
Return Values |
Description |
|
0 |
failed to get track extents (medianame will be blocked in player) |
|
1 |
track extents determined successfully |
The TrackExtents structure requires start, stop, and track number values. For most media, start is 0, stop is the end of the file, and track is 1. But for media with multiple tracks (e.g., CDs) start, stop, and track will represent the track number and location on the media.
The unitpersec value gives temporary meaning to the values used by start and end. The start and end values must use the same units of time as reflected by unitspersecond. (For example, for milliseconds, unitspersecond = 1000.)
If the plug-in cannot determine the track extents, or cannot determine them in a reasonable amount of time, it is OK to return start = 0, end = 1 (or any non-zero length). It is possible to update the TrackExtents at a later point, such as on playback.
|
Copyright (c) Quinnware 2007. All rights reserved.
|