add WebPISetIOHooks() to set some custom hooks on the incremental decoder object.

Change-Id: I01e973a1e45e3d60dc11fd284df3cbb938cf0485
This commit is contained in:
Pascal Massimino
2011-07-07 16:38:03 -07:00
parent 7643a6f2ef
commit a06bbe2e80
2 changed files with 33 additions and 3 deletions

View File

@ -621,6 +621,23 @@ uint8_t* WebPIDecGetYUV(const WebPIDecoder* const idec, int* last_y,
return src->u.YUVA.y;
}
int WebPISetIOHooks(WebPIDecoder* const idec,
VP8IoPutHook put,
VP8IoSetupHook setup,
VP8IoTeardownHook teardown,
void* user_data) {
if (!idec || !idec->dec_ || idec->state_ > STATE_HEADER) {
return 0;
}
idec->io_.put = put;
idec->io_.setup = setup;
idec->io_.teardown = teardown;
idec->io_.opaque = user_data;
return 1;
}
#if defined(__cplusplus) || defined(c_plusplus)
} // extern "C"
#endif