example_util.h: avoid forward declaring enums

doing so is not part of ISO C; removes some pedantic warnings.
use webp/decode.h to pickup VP8StatusCode instead.

Change-Id: I19b35e0f8a36fb7c45944ae9ca86838e08b90548
This commit is contained in:
James Zern 2014-04-28 14:56:19 -07:00
parent b3a616b356
commit 8955da2149

View File

@ -13,15 +13,12 @@
#ifndef WEBP_EXAMPLES_EXAMPLE_UTIL_H_
#define WEBP_EXAMPLES_EXAMPLE_UTIL_H_
#include "webp/types.h"
#include "webp/decode.h"
#ifdef __cplusplus
extern "C" {
#endif
struct WebPDecoderConfig;
struct WebPBitstreamFeatures;
// Allocates storage for entire file 'file_name' and returns contents and size
// in 'data' and 'data_size'. Returns 1 on success, 0 otherwise. '*data' should
// be deleted using free().
@ -51,7 +48,7 @@ void ExUtilPrintWebPError(const char* const in_file, int status);
// Returns true on success.
int ExUtilLoadWebP(const char* const in_file,
const uint8_t** data, size_t* data_size,
struct WebPBitstreamFeatures* bitstream);
WebPBitstreamFeatures* bitstream);
// Decodes the WebP contained in 'data'.
// 'config' is a structure previously initialized by WebPInitDecoderConfig().
@ -59,14 +56,13 @@ int ExUtilLoadWebP(const char* const in_file,
// cause decode timing to be reported.
// Returns the decoder status. On success 'config->output' will contain the
// decoded picture.
enum VP8StatusCode ExUtilDecodeWebP(const uint8_t* const data, size_t data_size,
int verbose,
struct WebPDecoderConfig* const config);
VP8StatusCode ExUtilDecodeWebP(const uint8_t* const data, size_t data_size,
int verbose, WebPDecoderConfig* const config);
// Same as ExUtilDecodeWebP(), but using the incremental decoder.
enum VP8StatusCode ExUtilDecodeWebPIncremental(
VP8StatusCode ExUtilDecodeWebPIncremental(
const uint8_t* const data, size_t data_size,
int verbose, struct WebPDecoderConfig* const config);
int verbose, WebPDecoderConfig* const config);
#ifdef __cplusplus
} // extern "C"