Previous | Contents | Index |
#include <mme/mme_api.h> MMRESULT ICDecompressPrepareHeader(HIC hic, LPBITMAPINFOHEADER lpbiFormat, LPVOID lpData, LPBITMAPINFOHEADER lpbi, LPVOID lpBits); |
LPBITMAPINFOHEADER lpbiFormat
Specifies a pointer to a BITMAPINFOHEADER data
structure containing the format of the compressed data. The
BITMAPINFOHEADER data structure must be allocated with
the
mmeAllocMem
function before being passed to the
ICDecompressPrepareHeader
function. See Chapter 2 for more information about allocating
memory for data structures.
LPVOID lpData
Specifies a pointer to the input data. The data buffer must be
allocated with the
mmeAllocBuffer
function before being passed to the
ICDecompressPrepareHeader
function. See Chapter 2 for more information about allocating
memory for data buffers.
LPBITMAPINFOHEADER lpbi
Specifies a pointer to a BITMAPINFOHEADER data
structure containing the output format.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICDecompressPrepareHeader function. See Chapter 2 for more information about allocating memory for data structures.
LPVOID lpBits
Specifies a pointer to a data buffer for the decompressed data. The
data buffer must be allocated with the
mmeAllocBuffer
function before being passed to the
ICDecompressPrepareHeader
function. See Chapter 2 for more information about allocating
memory for data buffers.
The ICDecompressPrepareHeader function prepares buffers for video decompression streaming. If a hardware device requires locked-down memory regions to read and write data, then the standard interface would require a separate lock down and unlock each time a ICDecompress operation was called. This may be highly inefficient for some devices.Extensions The ICDecompressPrepareHeader function is a Compaq extension to the Microsoft multimedia API specification.This routine allows a large region to be registered and any low level operations may be accomplished once for the entire region, possibly making ICDecompress calls much more efficient.
When the client and server are local to the same machine, memory may be shared between the client, server, and hardware device. ICDecompressPrepareHeader facilitates this sharing. When the client and server are on different machines (not yet supported), then the server has to allocate space for the buffers. ICDecompressPrepareHeader allows the server to allocate all the required space up front reducing the need to allocate space on every ICDecompress call.
This routine must be called after ICDecompressBegin and before ICDecompressEnd . Ideally, this routine is called once to register input and output buffers between the ICDecompressBegin call and the first ICDecompress call.
A buffer can only be prepared once. If the application attempts to register an already registered buffer or a buffer that overlaps with an already registered buffer, the ICDecompressPrepareHeader call will fail. If an application has several compressors and/or decompressors open, the same buffers may not be sharable between compressors and/or decompressors.
Buffers cannot be used for two different purposes. For example, one memory region can be used to hold multiple input buffers and another memory region can be used to hold multiple output buffers, but the same region cannot be used to hold both input and output buffers since they are used for different purposes.
Compaq has extended the Microsoft video and ICM (Installable Compression Manager) interfaces to provide for memory optimization. See Section 1.5.8 for more information.
Returns ICERR_OK if the function is successful; otherwise, it returns one of the following error codes:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid, the decompressor is not open, or the decompressor is not open for decompression. |
ICERR_BADFORMAT | The lpbiFormat and lpbi arguments are not acceptable formats. |
ICERR_BADIMAGESIZE | The specified image size is invalid. |
ICERR_BADPARAM | The lpbiFormat or lpbi, or lpData or lpBits arguments are NULL; or the hardware cannot be properly set up for the operation. The parameters are not the same as those specified in the ICDecompressBegin call (with the exception of the biSizeImage fields). |
ICERR_MEMORY | The buffers specified are not valid. Most likely they were not allocated with mmeAllocBuffer or mmeAllocBufferAndGetShminfo . |
ICERR_CANTUPDATE | The decompressor is not already in operation, that is, ICDecompressBegin has not yet been called or ICDecompressEnd has been called. |
ICERR_INTERNAL | An internal driver error occurred. No more detailed information is available. |
#include <mme/mme_api.h> MMRESULT ICDecompressQuery(HIC hic, LPBITMAPINFOHEADER lpbiInput, LPBITMAPINFOHEADER lpbiOutput); |
LPBITMAPINFOHEADER lpbiInput
Specifies a pointer to a BITMAPINFOHEADER data
structure indicating the format of the input data.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICDecompressQuery function. See Chapter 2 for more information about the memory allocation functions.
LPBITMAPINFOHEADER lpbiOutput
Specifies a pointer to a BITMAPINFOHEADER data
structure indicating the format of the output data. If NULL, any output
format is acceptable.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICDecompressQuery function. See Chapter 2 for more information about the memory allocation functions.
The ICDecompressQuery function determines if a decompressor can decompress data with a specific format.Extensions None.
Returns ICERR_OK if the decompression is supported; otherwise, it returns one of the following error codes:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid, the decompressor is not open, or the decompressor is not open for decompression. |
ICERR_BADFORMAT | The lpbiInput and lpbiOutput arguments are not acceptable formats. |
#include <mme/mme_api.h> MMRESULT ICDecompressUnprepareHeader(HIC hic, LPBITMAPINFOHEADER lpbiFormat, LPVOID lpData, LPBITMAPINFOHEADER lpbi, LPVOID lpBits); |
LPBITMAPINFOHEADER lpbiFormat
Specifies a pointer to a BITMAPINFOHEADER data
structure holding the format of the compressed data. The
BITMAPINFOHEADER data structure must be allocated with
the
mmeAllocMem
function before being passed to the
ICDecompressUnprepareHeader
function. See Chapter 2 for more information about allocating
memory for data structures.
LPVOID lpData
Specifies a pointer to the input data buffer. The data buffer must be
allocated with the
mmeAllocBuffer
function before being passed to the
ICDecompressUnprepareHeader
function. See Chapter 2 for more information about allocating
memory for data buffers.
LPBITMAPINFOHEADER lpbi
Specifies a pointer to a BITMAPINFOHEADER data
structure containing the output format.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICDecompressUnprepareHeader function. See Chapter 2 for more information about allocating memory for data structures.
LPVOID lpBits
Specifies a pointer to the output data buffer. The data buffer must be
allocated with the
mmeAllocBuffer
function before being passed to the
ICDecompressUnprepareHeader
function. See Chapter 2 for more information about allocating
memory for data buffers.
The ICDecompressUnprepareHeader function unprepares buffers prepared with ICDecompressPrepareHeader .Extensions The ICDecompressUnprepareHeader function is a Compaq extension to the Microsoft multimedia API specification.This function must be called before ICDecompressEnd and after all decompression operations have been completed and all buffers have been returned to the application.
Returns ICERR_OK if the function is successful; otherwise, it returns one of the following error codes:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid, the decompressor is not open, or the decompressor is not open for decompression. |
ICERR_BADPARAM | The lpbiFormat or lpbi, or lpData or lpBits arguments are NULL; or the hardware cannot be properly set up for the operation. The parameters are not the same as those specified in the ICDecompressBegin call (with the exception of the biSizeImage fields). The buffers have not been previously prepared. |
ICERR_CANTUPDATE | The decompressor is not in operation, that is, ICDecompressBegin has not yet been called or ICDecompressEnd has been called. The buffer should be unprepared before calling ICDecompressEnd . Some compressors may choose to unprepare all prepared headers when ICDecompressEnd is called. |
ICERR_INTERNAL | An internal driver error occurred. No more detailed information is available. |
#include <mme/mme_api.h> MMRESULT ICGetBrightness(HIC hic) |
The ICGetBrightness function obtains the current brightness value.Extensions The ICGetBrightness function is a Compaq extension to the Microsoft multimedia API specification.
Returns the current brightness value if the function is successful; otherwise, it returns the following error code:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid or the compressor or decompressor is not open. |
#include <mme/mme_api.h> MMRESULT ICGetContrast(HIC hic) |
The ICGetContrast function obtains the current contrast value.Extensions The ICGetContrast function is a Compaq extension to the Microsoft multimedia API specification.
Returns the current contrast value if the function is successful; otherwise, it returns the following error code:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid or the compressor or decompressor is not open. |
#include <mme/mme_api.h> MMRESULT ICGetDefaultKeyFrameRate(HIC hic) |
The ICGetDefaultKeyFrameRate function obtains the default key frame rate value.Extensions None.
Returns the default key frame rate value if the function is successful; otherwise, it returns the following error code:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid or the compressor is not open. |
#include <mme/mme_api.h> MMRESULT ICGetDefaultQuality(HIC hic) |
The ICGetDefaultQuality function obtains the default quality setting used for compression.Extensions None.
Returns the default quality setting used for compression if the function is successful; otherwise, it returns the following error code:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid or the compressor is not open. |
#include <mme/mme_api.h> MMRESULT ICGetInfo(HIC hic, ICINFO *lpicinfo, DWORD cb); |
ICINFO *lpicinfo
Specifies a pointer to an ICINFO data structure used
to return information about the compressor or decompressor. The
ICINFO data structure must be allocated with the
mmeAllocMem
function before being passed to the
ICGetInfo
function.
DWORD cb
Specifies the size in bytes of the data structure pointed to by the
lpicinfo argument.
The ICGetInfo function obtains information about a compressor or decompressor.Extensions None.
Returns ICERR_OK if the function is succcessful; otherwise, it returns one of the following error codes:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid or the compressor or decompressor is not open. |
ICERR_BADPARAM | The lpicinfo argument is NULL. |
#include <mme/mme_api.h> MMRESULT ICGetMirror(HIC hic) |
The ICGetMirror function obtains the current mirroring value.Extensions The ICGetMirror function is a Compaq extension to the Microsoft multimedia API specification.
Returns the current mirroring value if the function is successful; otherwise, it returns the following error code:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid or the compressor or decompressor is not open. |
#include <mme/mme_api.h> MMRESULT ICGetSaturation(HIC hic) |
The ICGetSaturation function obtains the current contrast value.Extensions The ICGetSaturation function is a Compaq extension to the Microsoft multimedia API specification.
Returns the current saturation value if the function is successful; otherwise, it returns the following error code:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid or the compressor or decompressor is not open. |
Previous | Next | Contents | Index |