ImageGear for C and C++ on Linux v19.10 - Updated
IG_mult_open_mem
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Multimedia Functions > IG_mult_open_mem

This function creates a multimedia instance from memory.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_mult_open_mem(
        LPAT_VOID lpMem, 
        AT_UINT memLen,
        LPHIGMULT lphMult
);

Arguments:

Name Type Description
lpMem LPAT_VOID Pointer to data in memory to open.
memLen AT_UINT Length of data in memory in bytes.
lphMult LPHIGMULT Handle to multimedia instance.

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
/* Get a multimedia 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(lpMem, memLen, &hMult);
nErrcount = IG_mult_duration_get(hMult, &numFrames, &duration);
nErrcount = IG_mult_close(hMult);

Remarks:

The memory must contain a complete multimedia file and remain accessible until the multimedia instance is closed.