diff options
author | Dmitry Kovalev <dkovalev@google.com> | 2014-02-11 21:12:23 -0800 |
---|---|---|
committer | Dmitry Kovalev <dkovalev@google.com> | 2014-02-11 21:12:23 -0800 |
commit | 70d9664fb25946afb062e674b365ea7a5348869d (patch) | |
tree | 834a2c70aaa8697696f01a97b705cf74aa758275 /tools_common.h | |
parent | 9453c6472630cf1485161ef7499e658f5c378ceb (diff) | |
download | libvpx-70d9664fb25946afb062e674b365ea7a5348869d.tar libvpx-70d9664fb25946afb062e674b365ea7a5348869d.tar.gz libvpx-70d9664fb25946afb062e674b365ea7a5348869d.tar.bz2 libvpx-70d9664fb25946afb062e674b365ea7a5348869d.zip |
Adding API to get vpx encoder/decoder interface.
Change-Id: I137e5e6585356792913e1e84da6c0a439c5153a5
Diffstat (limited to 'tools_common.h')
-rw-r--r-- | tools_common.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tools_common.h b/tools_common.h index 0f60c4c3a..da87b6d3f 100644 --- a/tools_common.h +++ b/tools_common.h @@ -123,7 +123,20 @@ uint32_t mem_get_le32(const void *data); int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame); -vpx_codec_iface_t *get_codec_interface(unsigned int fourcc); +typedef struct VpxInterface { + const char *const name; + const uint32_t fourcc; + vpx_codec_iface_t *(*const interface)(); +} VpxInterface; + +int get_vpx_encoder_count(); +const VpxInterface *get_vpx_encoder_by_index(int i); +const VpxInterface *get_vpx_encoder_by_name(const char *name); + +int get_vpx_decoder_count(); +const VpxInterface *get_vpx_decoder_by_index(int i); +const VpxInterface *get_vpx_decoder_by_name(const char *name); +const VpxInterface *get_vpx_decoder_by_fourcc(uint32_t fourcc); // TODO(dkovalev): move this function to vpx_image.{c, h}, so it will be part // of vpx_image_t support |