WebM Codec SDK
Data Structures | Macros | Typedefs | Enumerations | Functions
vpx_codec.h File Reference

Describes the codec algorithm interface to applications. More...

#include "./vpx_image.h"
#include "./vpx_integer.h"

Go to the source code of this file.

Data Structures

struct  vpx_codec_ctx
 Codec context structure. More...
 

Macros

#define VPX_DEPRECATED
 Decorator indicating a function is deprecated.
 
#define VPX_DECLSPEC_DEPRECATED
 Decorator indicating a function is deprecated.
 
#define VPX_UNUSED
 Decorator indicating a function is potentially unused.
 
#define VPX_CODEC_ABI_VERSION
 Current ABI version number.
 
#define VPX_CODEC_CAP_DECODER   0x1
 
#define VPX_CODEC_CAP_ENCODER   0x2
 
#define VPX_CODEC_CAP_HIGHBITDEPTH   0x4
 
#define VPX_VERSION_MAJOR(v)    (((v) >> 16) & 0xff)
 
#define VPX_VERSION_MINOR(v)    (((v) >> 8) & 0xff)
 
#define VPX_VERSION_PATCH(v)    (((v) >> 0) & 0xff)
 
#define vpx_codec_version_major()   ((vpx_codec_version() >> 16) & 0xff)
 Return the version major number.
 
#define vpx_codec_version_minor()   ((vpx_codec_version() >> 8) & 0xff)
 Return the version minor number.
 
#define vpx_codec_version_patch()   ((vpx_codec_version() >> 0) & 0xff)
 Return the version patch number.
 
#define vpx_codec_control(ctx, id, data)
 vpx_codec_control wrapper macro
 
#define VPX_CTRL_USE_TYPE(id, typ)
 vpx_codec_control type definition macro
 
#define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ)
 vpx_codec_control deprecated type definition macro
 
#define VPX_CTRL_VOID(id)
 vpx_codec_control void type definition macro
 

Typedefs

typedef long vpx_codec_caps_t
 Codec capabilities bitfield.
 
typedef long vpx_codec_flags_t
 Initialization-time Feature Enabling.
 
typedef const struct vpx_codec_iface vpx_codec_iface_t
 Codec interface structure.
 
typedef struct vpx_codec_priv vpx_codec_priv_t
 Codec private data structure.
 
typedef const void * vpx_codec_iter_t
 Iterator.
 
typedef struct vpx_codec_ctx vpx_codec_ctx_t
 Codec context structure.
 
typedef enum vpx_bit_depth vpx_bit_depth_t
 Bit depth for codec

  • This enumeration determines the bit depth of the codec.

 

Enumerations

enum  vpx_codec_err_t {
  VPX_CODEC_OK , VPX_CODEC_ERROR , VPX_CODEC_MEM_ERROR , VPX_CODEC_ABI_MISMATCH ,
  VPX_CODEC_INCAPABLE , VPX_CODEC_UNSUP_BITSTREAM , VPX_CODEC_UNSUP_FEATURE , VPX_CODEC_CORRUPT_FRAME ,
  VPX_CODEC_INVALID_PARAM , VPX_CODEC_LIST_END
}
 Algorithm return codes. More...
 
enum  vpx_bit_depth { VPX_BITS_8 = 8 , VPX_BITS_10 = 10 , VPX_BITS_12 = 12 }
 Bit depth for codec

  • This enumeration determines the bit depth of the codec.
More...
 

Functions

int vpx_codec_version (void)
 Return the version information (as an integer)
 
const char * vpx_codec_version_str (void)
 Return the version information (as a string)
 
const char * vpx_codec_version_extra_str (void)
 Return the version information (as a string)
 
const char * vpx_codec_build_config (void)
 Return the build configuration.
 
const char * vpx_codec_iface_name (vpx_codec_iface_t *iface)
 Return the name for a given interface.
 
const char * vpx_codec_err_to_string (vpx_codec_err_t err)
 Convert error number to printable string.
 
const char * vpx_codec_error (const vpx_codec_ctx_t *ctx)
 Retrieve error synopsis for codec context.
 
const char * vpx_codec_error_detail (const vpx_codec_ctx_t *ctx)
 Retrieve detailed error information for codec context.
 
vpx_codec_err_t vpx_codec_destroy (vpx_codec_ctx_t *ctx)
 Destroy a codec instance.
 
vpx_codec_caps_t vpx_codec_get_caps (vpx_codec_iface_t *iface)
 Get the capabilities of an algorithm.
 
vpx_codec_err_t vpx_codec_control_ (vpx_codec_ctx_t *ctx, int ctrl_id,...)
 Control algorithm.
 

Detailed Description

Describes the codec algorithm interface to applications.

This file describes the interface between an application and a video codec algorithm.

An application instantiates a specific codec instance by using vpx_codec_dec_init() or vpx_codec_enc_init() and a pointer to the algorithm's interface structure:

    my_app.c:
      extern vpx_codec_iface_t my_codec;
      {
          vpx_codec_ctx_t algo;
          int threads = 4;
          vpx_codec_dec_cfg_t cfg = { threads, 0, 0 };
          res = vpx_codec_dec_init(&algo, &my_codec, &cfg, 0);
      }
    

Once initialized, the instance is manged using other functions from the vpx_codec_* family.