Obtains the current time elapsed during a play operation.
DWORD mmGetCurrentTime ( MMFILE *pMMFile, unsigned int *currTime)
|
Argument |
Description |
|
pMMFile |
A pointer to the object that controls the multimedia file. |
|
currTime |
Returns the current time, based on the video track time, in milliseconds. |
|
Return value |
Description |
|
SUCCESS |
|
|
MMERR_NO_SYNC_TABLE |
File does not have a sync table. |
|
MMERR_INVALID_FILE |
pMMFile is NULL. |
mmGetCurrentTime obtains the current time elapsed during a play operation. The current time is useful information for seek operations.
For example, to seek ahead 30 seconds from the current time, the application:
Gets the current time using mmGetCurrentTime.
Adds the seek ahead time (30 seconds) to the current time.
Uses mmSeekToTime to seek to the computed time.
DWORD ret;
Unsigned int currTime;
ret = mmGetCurrentTime(&mmFile, &currTime);
If( ret != SUCCESS )
{
printf ("\nERROR in mmGetSyncPoints (%d)\n", ret);
return -1;
}