API Reference Guide > Core Component API Reference > Core Component Functions Reference > Multimedia Functions > IG_mult_current_frame_duration_get |
This function returns the duration of the current frame in 100 nanosecond units.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_mult_current_frame_duration_get( HIGMULT hMult, LPAT_UINT lpDuration ); |
Name | Type | Description |
---|---|---|
hMult | HIGMULT | Multimedia instance handle. |
lpDuration | LPAT_UINT | Frame duration (in 100ns units). |
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
This function does not process image pixels.
Media Player
Copy Code
|
|
---|---|
AT_ERRCOUNT nErrcount; /* Number of errors on stack */ HIGMULT hMult; /* Multimedia instance handle */ AT_UINT msDuration; /* Duration of frame in milliseconds */ nErrcount = IG_mult_current_frame_duration_get(hMult, &duration); |
This provides a reasonable level of accuracy for the short frame durations that are typical in video. To convert to milliseconds, divide by 10000.
Note that retrieving the durations of individual frames is essential for proper timing when the frame rate is variable, as is often the case with animated GIF files.