mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
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:
parent
b3a616b356
commit
8955da2149
@ -13,15 +13,12 @@
|
|||||||
#ifndef WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|
#ifndef WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|
||||||
#define WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|
#define WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|
||||||
|
|
||||||
#include "webp/types.h"
|
#include "webp/decode.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct WebPDecoderConfig;
|
|
||||||
struct WebPBitstreamFeatures;
|
|
||||||
|
|
||||||
// Allocates storage for entire file 'file_name' and returns contents and size
|
// 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
|
// in 'data' and 'data_size'. Returns 1 on success, 0 otherwise. '*data' should
|
||||||
// be deleted using free().
|
// be deleted using free().
|
||||||
@ -51,7 +48,7 @@ void ExUtilPrintWebPError(const char* const in_file, int status);
|
|||||||
// Returns true on success.
|
// Returns true on success.
|
||||||
int ExUtilLoadWebP(const char* const in_file,
|
int ExUtilLoadWebP(const char* const in_file,
|
||||||
const uint8_t** data, size_t* data_size,
|
const uint8_t** data, size_t* data_size,
|
||||||
struct WebPBitstreamFeatures* bitstream);
|
WebPBitstreamFeatures* bitstream);
|
||||||
|
|
||||||
// Decodes the WebP contained in 'data'.
|
// Decodes the WebP contained in 'data'.
|
||||||
// 'config' is a structure previously initialized by WebPInitDecoderConfig().
|
// '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.
|
// cause decode timing to be reported.
|
||||||
// Returns the decoder status. On success 'config->output' will contain the
|
// Returns the decoder status. On success 'config->output' will contain the
|
||||||
// decoded picture.
|
// decoded picture.
|
||||||
enum VP8StatusCode ExUtilDecodeWebP(const uint8_t* const data, size_t data_size,
|
VP8StatusCode ExUtilDecodeWebP(const uint8_t* const data, size_t data_size,
|
||||||
int verbose,
|
int verbose, WebPDecoderConfig* const config);
|
||||||
struct WebPDecoderConfig* const config);
|
|
||||||
|
|
||||||
// Same as ExUtilDecodeWebP(), but using the incremental decoder.
|
// Same as ExUtilDecodeWebP(), but using the incremental decoder.
|
||||||
enum VP8StatusCode ExUtilDecodeWebPIncremental(
|
VP8StatusCode ExUtilDecodeWebPIncremental(
|
||||||
const uint8_t* const data, size_t data_size,
|
const uint8_t* const data, size_t data_size,
|
||||||
int verbose, struct WebPDecoderConfig* const config);
|
int verbose, WebPDecoderConfig* const config);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
Loading…
Reference in New Issue
Block a user