Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030
00031 #ifndef VPX_DECODER_H
00032 #define VPX_DECODER_H
00033 #include "vpx_codec.h"
00034
00043 #define VPX_DECODER_ABI_VERSION (2 + VPX_CODEC_ABI_VERSION)
00053 #define VPX_CODEC_CAP_PUT_SLICE 0x10000
00054 #define VPX_CODEC_CAP_PUT_FRAME 0x20000
00055 #define VPX_CODEC_CAP_POSTPROC 0x40000
00056 #define VPX_CODEC_CAP_ERROR_CONCEALMENT 0x80000
00058 #define VPX_CODEC_CAP_INPUT_FRAGMENTS 0x100000
00068 #define VPX_CODEC_USE_POSTPROC 0x10000
00069 #define VPX_CODEC_USE_ERROR_CONCEALMENT 0x20000
00071 #define VPX_CODEC_USE_INPUT_FRAGMENTS 0x40000
00081 typedef struct vpx_codec_stream_info
00082 {
00083 unsigned int sz;
00084 unsigned int w;
00085 unsigned int h;
00086 unsigned int is_kf;
00087 } vpx_codec_stream_info_t;
00088
00089
00090
00091
00092
00093
00094
00095
00101 typedef struct vpx_codec_dec_cfg
00102 {
00103 unsigned int threads;
00104 unsigned int w;
00105 unsigned int h;
00106 } vpx_codec_dec_cfg_t;
00131 vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx,
00132 vpx_codec_iface_t *iface,
00133 vpx_codec_dec_cfg_t *cfg,
00134 vpx_codec_flags_t flags,
00135 int ver);
00136
00141 #define vpx_codec_dec_init(ctx, iface, cfg, flags) \
00142 vpx_codec_dec_init_ver(ctx, iface, cfg, flags, VPX_DECODER_ABI_VERSION)
00143
00144
00162 vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface,
00163 const uint8_t *data,
00164 unsigned int data_sz,
00165 vpx_codec_stream_info_t *si);
00166
00167
00181 vpx_codec_err_t vpx_codec_get_stream_info(vpx_codec_ctx_t *ctx,
00182 vpx_codec_stream_info_t *si);
00183
00184
00215 vpx_codec_err_t vpx_codec_decode(vpx_codec_ctx_t *ctx,
00216 const uint8_t *data,
00217 unsigned int data_sz,
00218 void *user_priv,
00219 long deadline);
00220
00221
00237 vpx_image_t *vpx_codec_get_frame(vpx_codec_ctx_t *ctx,
00238 vpx_codec_iter_t *iter);
00239
00240
00255 typedef void (*vpx_codec_put_frame_cb_fn_t)(void *user_priv,
00256 const vpx_image_t *img);
00257
00258
00274 vpx_codec_err_t vpx_codec_register_put_frame_cb(vpx_codec_ctx_t *ctx,
00275 vpx_codec_put_frame_cb_fn_t cb,
00276 void *user_priv);
00277
00278
00295 typedef void (*vpx_codec_put_slice_cb_fn_t)(void *user_priv,
00296 const vpx_image_t *img,
00297 const vpx_image_rect_t *valid,
00298 const vpx_image_rect_t *update);
00299
00300
00316 vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *ctx,
00317 vpx_codec_put_slice_cb_fn_t cb,
00318 void *user_priv);
00319
00320
00325 #endif
00326
00327 #ifdef __cplusplus
00328 }
00329 #endif