IImageDecoder::Decode (Windows CE 5.0)
This method tells the decoder object to continue decoding the current frame.
HRESULT Decode();
Parameters
None.
Return Values
If successful, this method returns S_OK.
If it fails, this method should return one of the following error values:
- IMGERR_OBJECTBUS
- E_FAIL
For more information, see Error Codes for the Imaging API.
Remarks
A nonblocking decoder should return E_PENDING when it runs out of input data.
To identify a blocking decoder, see if it has the ImageCodecFlagsBlockingDecode flag set. For more information, see ImageCodecFlags.
The following code shows how an application might decode an image frame.
IImageDecoder* decoder;
IImageSink* sink;
HRESULT hr;
hr = decoder->BeginDecode(sink, NULL);
if (FAILED(hr))
{
// handle error;
}
for (;;)
{
hr = decoder->Decode();
if (hr == E_PENDING)
// do something else;
else if (FAILED(hr))
// handle error, break;
else
// decoding successful, break;
}
decoder->EndDecode(hr);
Requirements
OS Versions: Windows CE 5.0 and later.
Header: Imaging.h.
Link Library: Imaging.lib.
See Also
IImageDecoder | ImageCodecFlags
Send Feedback on this topic to the authors