Blame src/webp/demux.h

Packit 9c6abc
// Copyright 2012 Google Inc. All Rights Reserved.
Packit 9c6abc
//
Packit 9c6abc
// Use of this source code is governed by a BSD-style license
Packit 9c6abc
// that can be found in the COPYING file in the root of the source
Packit 9c6abc
// tree. An additional intellectual property rights grant can be found
Packit 9c6abc
// in the file PATENTS. All contributing project authors may
Packit 9c6abc
// be found in the AUTHORS file in the root of the source tree.
Packit 9c6abc
// -----------------------------------------------------------------------------
Packit 9c6abc
//
Packit 9c6abc
// Demux API.
Packit 9c6abc
// Enables extraction of image and extended format data from WebP files.
Packit 9c6abc
Packit 9c6abc
// Code Example: Demuxing WebP data to extract all the frames, ICC profile
Packit 9c6abc
// and EXIF/XMP metadata.
Packit 9c6abc
/*
Packit 9c6abc
  WebPDemuxer* demux = WebPDemux(&webp_data);
Packit 9c6abc
Packit 9c6abc
  uint32_t width = WebPDemuxGetI(demux, WEBP_FF_CANVAS_WIDTH);
Packit 9c6abc
  uint32_t height = WebPDemuxGetI(demux, WEBP_FF_CANVAS_HEIGHT);
Packit 9c6abc
  // ... (Get information about the features present in the WebP file).
Packit 9c6abc
  uint32_t flags = WebPDemuxGetI(demux, WEBP_FF_FORMAT_FLAGS);
Packit 9c6abc
Packit 9c6abc
  // ... (Iterate over all frames).
Packit 9c6abc
  WebPIterator iter;
Packit 9c6abc
  if (WebPDemuxGetFrame(demux, 1, &iter)) {
Packit 9c6abc
    do {
Packit 9c6abc
      // ... (Consume 'iter'; e.g. Decode 'iter.fragment' with WebPDecode(),
Packit 9c6abc
      // ... and get other frame properties like width, height, offsets etc.
Packit 9c6abc
      // ... see 'struct WebPIterator' below for more info).
Packit 9c6abc
    } while (WebPDemuxNextFrame(&iter));
Packit 9c6abc
    WebPDemuxReleaseIterator(&iter);
Packit 9c6abc
  }
Packit 9c6abc
Packit 9c6abc
  // ... (Extract metadata).
Packit 9c6abc
  WebPChunkIterator chunk_iter;
Packit 9c6abc
  if (flags & ICCP_FLAG) WebPDemuxGetChunk(demux, "ICCP", 1, &chunk_iter);
Packit 9c6abc
  // ... (Consume the ICC profile in 'chunk_iter.chunk').
Packit 9c6abc
  WebPDemuxReleaseChunkIterator(&chunk_iter);
Packit 9c6abc
  if (flags & EXIF_FLAG) WebPDemuxGetChunk(demux, "EXIF", 1, &chunk_iter);
Packit 9c6abc
  // ... (Consume the EXIF metadata in 'chunk_iter.chunk').
Packit 9c6abc
  WebPDemuxReleaseChunkIterator(&chunk_iter);
Packit 9c6abc
  if (flags & XMP_FLAG) WebPDemuxGetChunk(demux, "XMP ", 1, &chunk_iter);
Packit 9c6abc
  // ... (Consume the XMP metadata in 'chunk_iter.chunk').
Packit 9c6abc
  WebPDemuxReleaseChunkIterator(&chunk_iter);
Packit 9c6abc
  WebPDemuxDelete(demux);
Packit 9c6abc
*/
Packit 9c6abc
Packit 9c6abc
#ifndef WEBP_WEBP_DEMUX_H_
Packit 9c6abc
#define WEBP_WEBP_DEMUX_H_
Packit 9c6abc
Packit 9c6abc
#include "./decode.h"     // for WEBP_CSP_MODE
Packit 9c6abc
#include "./mux_types.h"
Packit 9c6abc
Packit 9c6abc
#ifdef __cplusplus
Packit 9c6abc
extern "C" {
Packit 9c6abc
#endif
Packit 9c6abc
Packit 9c6abc
#define WEBP_DEMUX_ABI_VERSION 0x0107    // MAJOR(8b) + MINOR(8b)
Packit 9c6abc
Packit 9c6abc
// Note: forward declaring enumerations is not allowed in (strict) C and C++,
Packit 9c6abc
// the types are left here for reference.
Packit 9c6abc
// typedef enum WebPDemuxState WebPDemuxState;
Packit 9c6abc
// typedef enum WebPFormatFeature WebPFormatFeature;
Packit 9c6abc
typedef struct WebPDemuxer WebPDemuxer;
Packit 9c6abc
typedef struct WebPIterator WebPIterator;
Packit 9c6abc
typedef struct WebPChunkIterator WebPChunkIterator;
Packit 9c6abc
typedef struct WebPAnimInfo WebPAnimInfo;
Packit 9c6abc
typedef struct WebPAnimDecoderOptions WebPAnimDecoderOptions;
Packit 9c6abc
Packit 9c6abc
//------------------------------------------------------------------------------
Packit 9c6abc
Packit 9c6abc
// Returns the version number of the demux library, packed in hexadecimal using
Packit 9c6abc
// 8bits for each of major/minor/revision. E.g: v2.5.7 is 0x020507.
Packit 9c6abc
WEBP_EXTERN int WebPGetDemuxVersion(void);
Packit 9c6abc
Packit 9c6abc
//------------------------------------------------------------------------------
Packit 9c6abc
// Life of a Demux object
Packit 9c6abc
Packit 9c6abc
typedef enum WebPDemuxState {
Packit 9c6abc
  WEBP_DEMUX_PARSE_ERROR    = -1,  // An error occurred while parsing.
Packit 9c6abc
  WEBP_DEMUX_PARSING_HEADER =  0,  // Not enough data to parse full header.
Packit 9c6abc
  WEBP_DEMUX_PARSED_HEADER  =  1,  // Header parsing complete,
Packit 9c6abc
                                   // data may be available.
Packit 9c6abc
  WEBP_DEMUX_DONE           =  2   // Entire file has been parsed.
Packit 9c6abc
} WebPDemuxState;
Packit 9c6abc
Packit 9c6abc
// Internal, version-checked, entry point
Packit 9c6abc
WEBP_EXTERN WebPDemuxer* WebPDemuxInternal(
Packit 9c6abc
    const WebPData*, int, WebPDemuxState*, int);
Packit 9c6abc
Packit 9c6abc
// Parses the full WebP file given by 'data'. For single images the WebP file
Packit 9c6abc
// header alone or the file header and the chunk header may be absent.
Packit 9c6abc
// Returns a WebPDemuxer object on successful parse, NULL otherwise.
Packit 9c6abc
static WEBP_INLINE WebPDemuxer* WebPDemux(const WebPData* data) {
Packit 9c6abc
  return WebPDemuxInternal(data, 0, NULL, WEBP_DEMUX_ABI_VERSION);
Packit 9c6abc
}
Packit 9c6abc
Packit 9c6abc
// Parses the possibly incomplete WebP file given by 'data'.
Packit 9c6abc
// If 'state' is non-NULL it will be set to indicate the status of the demuxer.
Packit 9c6abc
// Returns NULL in case of error or if there isn't enough data to start parsing;
Packit 9c6abc
// and a WebPDemuxer object on successful parse.
Packit 9c6abc
// Note that WebPDemuxer keeps internal pointers to 'data' memory segment.
Packit 9c6abc
// If this data is volatile, the demuxer object should be deleted (by calling
Packit 9c6abc
// WebPDemuxDelete()) and WebPDemuxPartial() called again on the new data.
Packit 9c6abc
// This is usually an inexpensive operation.
Packit 9c6abc
static WEBP_INLINE WebPDemuxer* WebPDemuxPartial(
Packit 9c6abc
    const WebPData* data, WebPDemuxState* state) {
Packit 9c6abc
  return WebPDemuxInternal(data, 1, state, WEBP_DEMUX_ABI_VERSION);
Packit 9c6abc
}
Packit 9c6abc
Packit 9c6abc
// Frees memory associated with 'dmux'.
Packit 9c6abc
WEBP_EXTERN void WebPDemuxDelete(WebPDemuxer* dmux);
Packit 9c6abc
Packit 9c6abc
//------------------------------------------------------------------------------
Packit 9c6abc
// Data/information extraction.
Packit 9c6abc
Packit 9c6abc
typedef enum WebPFormatFeature {
Packit 9c6abc
  WEBP_FF_FORMAT_FLAGS,      // bit-wise combination of WebPFeatureFlags
Packit 9c6abc
                             // corresponding to the 'VP8X' chunk (if present).
Packit 9c6abc
  WEBP_FF_CANVAS_WIDTH,
Packit 9c6abc
  WEBP_FF_CANVAS_HEIGHT,
Packit 9c6abc
  WEBP_FF_LOOP_COUNT,        // only relevant for animated file
Packit 9c6abc
  WEBP_FF_BACKGROUND_COLOR,  // idem.
Packit 9c6abc
  WEBP_FF_FRAME_COUNT        // Number of frames present in the demux object.
Packit 9c6abc
                             // In case of a partial demux, this is the number
Packit 9c6abc
                             // of frames seen so far, with the last frame
Packit 9c6abc
                             // possibly being partial.
Packit 9c6abc
} WebPFormatFeature;
Packit 9c6abc
Packit 9c6abc
// Get the 'feature' value from the 'dmux'.
Packit 9c6abc
// NOTE: values are only valid if WebPDemux() was used or WebPDemuxPartial()
Packit 9c6abc
// returned a state > WEBP_DEMUX_PARSING_HEADER.
Packit 9c6abc
// If 'feature' is WEBP_FF_FORMAT_FLAGS, the returned value is a bit-wise
Packit 9c6abc
// combination of WebPFeatureFlags values.
Packit 9c6abc
// If 'feature' is WEBP_FF_LOOP_COUNT, WEBP_FF_BACKGROUND_COLOR, the returned
Packit 9c6abc
// value is only meaningful if the bitstream is animated.
Packit 9c6abc
WEBP_EXTERN uint32_t WebPDemuxGetI(
Packit 9c6abc
    const WebPDemuxer* dmux, WebPFormatFeature feature);
Packit 9c6abc
Packit 9c6abc
//------------------------------------------------------------------------------
Packit 9c6abc
// Frame iteration.
Packit 9c6abc
Packit 9c6abc
struct WebPIterator {
Packit 9c6abc
  int frame_num;
Packit 9c6abc
  int num_frames;          // equivalent to WEBP_FF_FRAME_COUNT.
Packit 9c6abc
  int x_offset, y_offset;  // offset relative to the canvas.
Packit 9c6abc
  int width, height;       // dimensions of this frame.
Packit 9c6abc
  int duration;            // display duration in milliseconds.
Packit 9c6abc
  WebPMuxAnimDispose dispose_method;  // dispose method for the frame.
Packit 9c6abc
  int complete;   // true if 'fragment' contains a full frame. partial images
Packit 9c6abc
                  // may still be decoded with the WebP incremental decoder.
Packit 9c6abc
  WebPData fragment;  // The frame given by 'frame_num'. Note for historical
Packit 9c6abc
                      // reasons this is called a fragment.
Packit 9c6abc
  int has_alpha;      // True if the frame contains transparency.
Packit 9c6abc
  WebPMuxAnimBlend blend_method;  // Blend operation for the frame.
Packit 9c6abc
Packit 9c6abc
  uint32_t pad[2];         // padding for later use.
Packit 9c6abc
  void* private_;          // for internal use only.
Packit 9c6abc
};
Packit 9c6abc
Packit 9c6abc
// Retrieves frame 'frame_number' from 'dmux'.
Packit 9c6abc
// 'iter->fragment' points to the frame on return from this function.
Packit 9c6abc
// Setting 'frame_number' equal to 0 will return the last frame of the image.
Packit 9c6abc
// Returns false if 'dmux' is NULL or frame 'frame_number' is not present.
Packit 9c6abc
// Call WebPDemuxReleaseIterator() when use of the iterator is complete.
Packit 9c6abc
// NOTE: 'dmux' must persist for the lifetime of 'iter'.
Packit 9c6abc
WEBP_EXTERN int WebPDemuxGetFrame(
Packit 9c6abc
    const WebPDemuxer* dmux, int frame_number, WebPIterator* iter);
Packit 9c6abc
Packit 9c6abc
// Sets 'iter->fragment' to point to the next ('iter->frame_num' + 1) or
Packit 9c6abc
// previous ('iter->frame_num' - 1) frame. These functions do not loop.
Packit 9c6abc
// Returns true on success, false otherwise.
Packit 9c6abc
WEBP_EXTERN int WebPDemuxNextFrame(WebPIterator* iter);
Packit 9c6abc
WEBP_EXTERN int WebPDemuxPrevFrame(WebPIterator* iter);
Packit 9c6abc
Packit 9c6abc
// Releases any memory associated with 'iter'.
Packit 9c6abc
// Must be called before any subsequent calls to WebPDemuxGetChunk() on the same
Packit 9c6abc
// iter. Also, must be called before destroying the associated WebPDemuxer with
Packit 9c6abc
// WebPDemuxDelete().
Packit 9c6abc
WEBP_EXTERN void WebPDemuxReleaseIterator(WebPIterator* iter);
Packit 9c6abc
Packit 9c6abc
//------------------------------------------------------------------------------
Packit 9c6abc
// Chunk iteration.
Packit 9c6abc
Packit 9c6abc
struct WebPChunkIterator {
Packit 9c6abc
  // The current and total number of chunks with the fourcc given to
Packit 9c6abc
  // WebPDemuxGetChunk().
Packit 9c6abc
  int chunk_num;
Packit 9c6abc
  int num_chunks;
Packit 9c6abc
  WebPData chunk;    // The payload of the chunk.
Packit 9c6abc
Packit 9c6abc
  uint32_t pad[6];   // padding for later use
Packit 9c6abc
  void* private_;
Packit 9c6abc
};
Packit 9c6abc
Packit 9c6abc
// Retrieves the 'chunk_number' instance of the chunk with id 'fourcc' from
Packit 9c6abc
// 'dmux'.
Packit 9c6abc
// 'fourcc' is a character array containing the fourcc of the chunk to return,
Packit 9c6abc
// e.g., "ICCP", "XMP ", "EXIF", etc.
Packit 9c6abc
// Setting 'chunk_number' equal to 0 will return the last chunk in a set.
Packit 9c6abc
// Returns true if the chunk is found, false otherwise. Image related chunk
Packit 9c6abc
// payloads are accessed through WebPDemuxGetFrame() and related functions.
Packit 9c6abc
// Call WebPDemuxReleaseChunkIterator() when use of the iterator is complete.
Packit 9c6abc
// NOTE: 'dmux' must persist for the lifetime of the iterator.
Packit 9c6abc
WEBP_EXTERN int WebPDemuxGetChunk(const WebPDemuxer* dmux,
Packit 9c6abc
                                  const char fourcc[4], int chunk_number,
Packit 9c6abc
                                  WebPChunkIterator* iter);
Packit 9c6abc
Packit 9c6abc
// Sets 'iter->chunk' to point to the next ('iter->chunk_num' + 1) or previous
Packit 9c6abc
// ('iter->chunk_num' - 1) chunk. These functions do not loop.
Packit 9c6abc
// Returns true on success, false otherwise.
Packit 9c6abc
WEBP_EXTERN int WebPDemuxNextChunk(WebPChunkIterator* iter);
Packit 9c6abc
WEBP_EXTERN int WebPDemuxPrevChunk(WebPChunkIterator* iter);
Packit 9c6abc
Packit 9c6abc
// Releases any memory associated with 'iter'.
Packit 9c6abc
// Must be called before destroying the associated WebPDemuxer with
Packit 9c6abc
// WebPDemuxDelete().
Packit 9c6abc
WEBP_EXTERN void WebPDemuxReleaseChunkIterator(WebPChunkIterator* iter);
Packit 9c6abc
Packit 9c6abc
//------------------------------------------------------------------------------
Packit 9c6abc
// WebPAnimDecoder API
Packit 9c6abc
//
Packit 9c6abc
// This API allows decoding (possibly) animated WebP images.
Packit 9c6abc
//
Packit 9c6abc
// Code Example:
Packit 9c6abc
/*
Packit 9c6abc
  WebPAnimDecoderOptions dec_options;
Packit 9c6abc
  WebPAnimDecoderOptionsInit(&dec_options);
Packit 9c6abc
  // Tune 'dec_options' as needed.
Packit 9c6abc
  WebPAnimDecoder* dec = WebPAnimDecoderNew(webp_data, &dec_options);
Packit 9c6abc
  WebPAnimInfo anim_info;
Packit 9c6abc
  WebPAnimDecoderGetInfo(dec, &anim_info);
Packit 9c6abc
  for (uint32_t i = 0; i < anim_info.loop_count; ++i) {
Packit 9c6abc
    while (WebPAnimDecoderHasMoreFrames(dec)) {
Packit 9c6abc
      uint8_t* buf;
Packit 9c6abc
      int timestamp;
Packit 9c6abc
      WebPAnimDecoderGetNext(dec, &buf, &timestamp);
Packit 9c6abc
      // ... (Render 'buf' based on 'timestamp').
Packit 9c6abc
      // ... (Do NOT free 'buf', as it is owned by 'dec').
Packit 9c6abc
    }
Packit 9c6abc
    WebPAnimDecoderReset(dec);
Packit 9c6abc
  }
Packit 9c6abc
  const WebPDemuxer* demuxer = WebPAnimDecoderGetDemuxer(dec);
Packit 9c6abc
  // ... (Do something using 'demuxer'; e.g. get EXIF/XMP/ICC data).
Packit 9c6abc
  WebPAnimDecoderDelete(dec);
Packit 9c6abc
*/
Packit 9c6abc
Packit 9c6abc
typedef struct WebPAnimDecoder WebPAnimDecoder;  // Main opaque object.
Packit 9c6abc
Packit 9c6abc
// Global options.
Packit 9c6abc
struct WebPAnimDecoderOptions {
Packit 9c6abc
  // Output colorspace. Only the following modes are supported:
Packit 9c6abc
  // MODE_RGBA, MODE_BGRA, MODE_rgbA and MODE_bgrA.
Packit 9c6abc
  WEBP_CSP_MODE color_mode;
Packit 9c6abc
  int use_threads;           // If true, use multi-threaded decoding.
Packit 9c6abc
  uint32_t padding[7];       // Padding for later use.
Packit 9c6abc
};
Packit 9c6abc
Packit 9c6abc
// Internal, version-checked, entry point.
Packit 9c6abc
WEBP_EXTERN int WebPAnimDecoderOptionsInitInternal(
Packit 9c6abc
    WebPAnimDecoderOptions*, int);
Packit 9c6abc
Packit 9c6abc
// Should always be called, to initialize a fresh WebPAnimDecoderOptions
Packit 9c6abc
// structure before modification. Returns false in case of version mismatch.
Packit 9c6abc
// WebPAnimDecoderOptionsInit() must have succeeded before using the
Packit 9c6abc
// 'dec_options' object.
Packit 9c6abc
static WEBP_INLINE int WebPAnimDecoderOptionsInit(
Packit 9c6abc
    WebPAnimDecoderOptions* dec_options) {
Packit 9c6abc
  return WebPAnimDecoderOptionsInitInternal(dec_options,
Packit 9c6abc
                                            WEBP_DEMUX_ABI_VERSION);
Packit 9c6abc
}
Packit 9c6abc
Packit 9c6abc
// Internal, version-checked, entry point.
Packit 9c6abc
WEBP_EXTERN WebPAnimDecoder* WebPAnimDecoderNewInternal(
Packit 9c6abc
    const WebPData*, const WebPAnimDecoderOptions*, int);
Packit 9c6abc
Packit 9c6abc
// Creates and initializes a WebPAnimDecoder object.
Packit 9c6abc
// Parameters:
Packit 9c6abc
//   webp_data - (in) WebP bitstream. This should remain unchanged during the
Packit 9c6abc
//                    lifetime of the output WebPAnimDecoder object.
Packit 9c6abc
//   dec_options - (in) decoding options. Can be passed NULL to choose
Packit 9c6abc
//                      reasonable defaults (in particular, color mode MODE_RGBA
Packit 9c6abc
//                      will be picked).
Packit 9c6abc
// Returns:
Packit 9c6abc
//   A pointer to the newly created WebPAnimDecoder object, or NULL in case of
Packit 9c6abc
//   parsing error, invalid option or memory error.
Packit 9c6abc
static WEBP_INLINE WebPAnimDecoder* WebPAnimDecoderNew(
Packit 9c6abc
    const WebPData* webp_data, const WebPAnimDecoderOptions* dec_options) {
Packit 9c6abc
  return WebPAnimDecoderNewInternal(webp_data, dec_options,
Packit 9c6abc
                                    WEBP_DEMUX_ABI_VERSION);
Packit 9c6abc
}
Packit 9c6abc
Packit 9c6abc
// Global information about the animation..
Packit 9c6abc
struct WebPAnimInfo {
Packit 9c6abc
  uint32_t canvas_width;
Packit 9c6abc
  uint32_t canvas_height;
Packit 9c6abc
  uint32_t loop_count;
Packit 9c6abc
  uint32_t bgcolor;
Packit 9c6abc
  uint32_t frame_count;
Packit 9c6abc
  uint32_t pad[4];   // padding for later use
Packit 9c6abc
};
Packit 9c6abc
Packit 9c6abc
// Get global information about the animation.
Packit 9c6abc
// Parameters:
Packit 9c6abc
//   dec - (in) decoder instance to get information from.
Packit 9c6abc
//   info - (out) global information fetched from the animation.
Packit 9c6abc
// Returns:
Packit 9c6abc
//   True on success.
Packit 9c6abc
WEBP_EXTERN int WebPAnimDecoderGetInfo(const WebPAnimDecoder* dec,
Packit 9c6abc
                                       WebPAnimInfo* info);
Packit 9c6abc
Packit 9c6abc
// Fetch the next frame from 'dec' based on options supplied to
Packit 9c6abc
// WebPAnimDecoderNew(). This will be a fully reconstructed canvas of size
Packit 9c6abc
// 'canvas_width * 4 * canvas_height', and not just the frame sub-rectangle. The
Packit 9c6abc
// returned buffer 'buf' is valid only until the next call to
Packit 9c6abc
// WebPAnimDecoderGetNext(), WebPAnimDecoderReset() or WebPAnimDecoderDelete().
Packit 9c6abc
// Parameters:
Packit 9c6abc
//   dec - (in/out) decoder instance from which the next frame is to be fetched.
Packit 9c6abc
//   buf - (out) decoded frame.
Packit 9c6abc
//   timestamp - (out) timestamp of the frame in milliseconds.
Packit 9c6abc
// Returns:
Packit 9c6abc
//   False if any of the arguments are NULL, or if there is a parsing or
Packit 9c6abc
//   decoding error, or if there are no more frames. Otherwise, returns true.
Packit 9c6abc
WEBP_EXTERN int WebPAnimDecoderGetNext(WebPAnimDecoder* dec,
Packit 9c6abc
                                       uint8_t** buf, int* timestamp);
Packit 9c6abc
Packit 9c6abc
// Check if there are more frames left to decode.
Packit 9c6abc
// Parameters:
Packit 9c6abc
//   dec - (in) decoder instance to be checked.
Packit 9c6abc
// Returns:
Packit 9c6abc
//   True if 'dec' is not NULL and some frames are yet to be decoded.
Packit 9c6abc
//   Otherwise, returns false.
Packit 9c6abc
WEBP_EXTERN int WebPAnimDecoderHasMoreFrames(const WebPAnimDecoder* dec);
Packit 9c6abc
Packit 9c6abc
// Resets the WebPAnimDecoder object, so that next call to
Packit 9c6abc
// WebPAnimDecoderGetNext() will restart decoding from 1st frame. This would be
Packit 9c6abc
// helpful when all frames need to be decoded multiple times (e.g.
Packit 9c6abc
// info.loop_count times) without destroying and recreating the 'dec' object.
Packit 9c6abc
// Parameters:
Packit 9c6abc
//   dec - (in/out) decoder instance to be reset
Packit 9c6abc
WEBP_EXTERN void WebPAnimDecoderReset(WebPAnimDecoder* dec);
Packit 9c6abc
Packit 9c6abc
// Grab the internal demuxer object.
Packit 9c6abc
// Getting the demuxer object can be useful if one wants to use operations only
Packit 9c6abc
// available through demuxer; e.g. to get XMP/EXIF/ICC metadata. The returned
Packit 9c6abc
// demuxer object is owned by 'dec' and is valid only until the next call to
Packit 9c6abc
// WebPAnimDecoderDelete().
Packit 9c6abc
//
Packit 9c6abc
// Parameters:
Packit 9c6abc
//   dec - (in) decoder instance from which the demuxer object is to be fetched.
Packit 9c6abc
WEBP_EXTERN const WebPDemuxer* WebPAnimDecoderGetDemuxer(
Packit 9c6abc
    const WebPAnimDecoder* dec);
Packit 9c6abc
Packit 9c6abc
// Deletes the WebPAnimDecoder object.
Packit 9c6abc
// Parameters:
Packit 9c6abc
//   dec - (in/out) decoder instance to be deleted
Packit 9c6abc
WEBP_EXTERN void WebPAnimDecoderDelete(WebPAnimDecoder* dec);
Packit 9c6abc
Packit 9c6abc
#ifdef __cplusplus
Packit 9c6abc
}    // extern "C"
Packit 9c6abc
#endif
Packit 9c6abc
Packit 9c6abc
#endif  /* WEBP_WEBP_DEMUX_H_ */