diff options
author | wm4 <wm4@nowhere> | 2012-08-21 19:20:36 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-23 13:12:43 +0200 |
commit | 2e6450c7cc88f1e39034ac111e9b54a421bca661 (patch) | |
tree | 402dd1aa238eae1b360fa912fbdca0a776b345b8 /libmpcodecs/img_format.h | |
parent | b65424f5c2bf1a3a5e4781f640023132920991d7 (diff) | |
download | mpv-2e6450c7cc88f1e39034ac111e9b54a421bca661.tar.bz2 mpv-2e6450c7cc88f1e39034ac111e9b54a421bca661.tar.xz |
img_format, m_option: make image format name list globally available
And add functions for converting them from/to the name string.
Diffstat (limited to 'libmpcodecs/img_format.h')
-rw-r--r-- | libmpcodecs/img_format.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h index ba3bd760b1..61873ad72a 100644 --- a/libmpcodecs/img_format.h +++ b/libmpcodecs/img_format.h @@ -236,4 +236,14 @@ const char *vo_format_name(int format); */ int mp_get_chroma_shift(int format, int *x_shift, int *y_shift, int *component_bits); +struct mp_imgfmt_entry { + const char *name; + unsigned int fmt; +}; + +extern struct mp_imgfmt_entry mp_imgfmt_list[]; + +unsigned int mp_imgfmt_from_name(const char *name); +const char *mp_imgfmt_to_name(unsigned int fmt); + #endif /* MPLAYER_IMG_FORMAT_H */ |