ICLocate(3mms) — Subroutines
Name
ICLocate --- Find a compressor or decompressor that can handle images with the formats specified, or find a decompressor that can decompress an image with the specified format directly to hardware
Syntax
#include <mme/mme_api.h>
HIC ICLocate(DWORD fccType,
DWORD fccHandler,
LPBITMAPINFOHEADER lpbiIn,
LPBITMAPINFOHEADER lpbiOut,
WORD wFlags);
Arguments
DWORD fccType
Specifies the type of compressor or decompressor the application wants to find. For video, the value should be ICTYPE_VIDEO or the FOURCC "vidc". For audio, the value should be ICTYPE_AUDIO or the FOURCC "audc".
DWORD fccHandler
Specifies a single preferred handler of the given type that should be tried first. Typically, this handler comes from the stream header in an AVI file or from the ICInfo structure.
If this value is zero, the first compressor or decompressor found is opened. If this value is between 1 and the number of installed compressors of this type, the compressor or decompressor with that number is opened. If this compressor or decompressor cannot handle the data formats, no device is opened. If this value is a FOURCC, that compressor or decompressor is opened. (If there are multiple devices with the same FOURCC, the first device will be used.) If this compressor or decompressor cannot handle the data formats, the first device that can handle the formats is opened.
LPBITMAPINFOHEADER lpbiIn
Specifies a pointer to a BITMAPINFOHEADER data structure defining the input format. A compressor handle will not be returned unless it can handle this format.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICLocate function.
See the mmeAllocMem(3mms) reference page for more information about allocating memory for data structures.
LPBITMAPINFOHEADER lpbiOut
Specifies NULL or a pointer to a BITMAPINFOHEADER data structure defining an optional output format. If lpbiOut is not NULL, a compressor handle will not be returned unless it can create this output option.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICLocate function.
See the mmeAllocMem(3mms) reference page for more information about allocating memory for data structures.
WORD wFlags
Specifies flags defining the use of the compressor or decompressor.
The following flags are defined:
ICMODE_COMPRESS
Indicates the compressor should be able to compress an image with a format defined by lpbiIn to the format defined by lpbiOut.
ICMODE_DECOMPRESS
Indicates the decompressor should be able to decompress an image with a format defined by lpbiIn to the format defined by lpbiOut.
ICMODE_DRAW
Indicates the decompressor should be able to decompress an image with a format defined by lpbiIn and draw it directly to hardware. The Sound and Motion J300 option module does not support IC_DRAW functionality.
Description
The ICLocate function finds a compressor or decompressor that can handle images with the formats specified, or it finds a decompressor that can decompress an image with the specified format directly to hardware. If an appropriate compressor or decompressor is found, it is opened and a handle is returned to the application.
Extensions
None.
Return Values
Returns a handle to an open compressor or decompressor if the function is successful; otherwise, it returns zero.