ImageGear for C and C++ on Linux v18.8 - Updated
IG_mult_duration_get
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Multimedia Functions > IG_mult_duration_get

This function retrieves the duration of a multimedia instance as a number of frames and a duration in milliseconds.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_mult_duration_get(
        HIGMULT hMult,
        LPAT_UINT lpNumFrames,
        LPAT_UINT lpDuration
);

Arguments:

Name Type Description
hMult HIGMULT Multimedia instance handle.
lpNumFrames LPAT_UINT Number of frames.
lpDuration LPAT_UINT Duration of multimedia file in milliseconds.

Return Value:

Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

This function does not process image pixels.

Example:

 
Copy Code
AT_ERRCOUNT nErrcount;  /* Number of errors on stack */
HIGMULT hMult;          /* Multimedia instance handle */
AT_UINT numFrames;      /* Total number of frames in file */
AT_UINT msDuration;     /* Duration of file in milliseconds */
nErrcount = IG_mult_duration_get(hMult, &numFrames, &msDuration);

Remarks:

You can pass NULL for one of these arguments if you only need the other one. You can use this function to determine how many frames are in a multimedia instance and how long it would play for if played at normal speed.