This function creates a multimedia instance from memory using only the specified format.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_mult_open_mem_format( LPAT_VOID lpMem, AT_UINT memLen, AT_MODE format, LPHIGMULT lphMult ); |
Name | Type | Description |
---|---|---|
lpMem | LPAT_VOID | Pointer to data in memory to open. |
memLen | AT_UINT | Length of data in memory in bytes. |
format | AT_MODE | Format of file (can be IG_FORMAT_UNKNOWN). |
lphMult | LPHIGMULT | Handle to multimedia instance. |
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.
None
Copy Code
|
|
---|---|
/* Get an animated GIF file's duration using a memory buffer */ AT_ERRCOUNT nErrcount; /* Number of errors on stack */ HIGMULT hMult; /* Multimedia instance handle */ LPAT_VOID lpMem; /* Memory buffer with multimedia data */ AT_UINT memLen; /* Length of data in memory buffer */ AT_UINT numFrames; /* Total number of frames in file */ AT_UINT duration; /* Duration of file in milliseconds */ nErrcount = IG_mult_open_mem_format(lpMem, memLen, IG_FORMAT_GIF, &hMult); nErrcount = IG_mult_duration_get(hMult, &numFrames, &duration); nErrcount = IG_mult_close(hMult); |
The memory must contain a complete multimedia file and remain accessible until the multimedia instance is closed. Specifying the format lets you bypass the automatic file type identification for situations in which you know the format of the file.
See the multimedia API overview for a list of currently supported formats.