From e71f26086ab899be7df1efb30b33e0a11973fd8e Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Thu, 26 May 2011 19:19:18 +0200 Subject: lavu: add av_get_pix_fmt_name() convenience function Also deprecate avcodec_get_pix_fmt_name() in its favor. --- libavutil/pixdesc.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libavutil/pixdesc.h') diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h index 727e47f06a..fad6d59d87 100644 --- a/libavutil/pixdesc.h +++ b/libavutil/pixdesc.h @@ -22,6 +22,7 @@ #ifndef AVUTIL_PIXDESC_H #define AVUTIL_PIXDESC_H +#include "pixfmt.h" #include typedef struct AVComponentDescriptor{ @@ -141,6 +142,14 @@ void av_write_image_line(const uint16_t *src, uint8_t *data[4], const int linesi */ enum PixelFormat av_get_pix_fmt(const char *name); +/** + * Return the short name for a pixel format, NULL in case pix_fmt is + * unknown. + * + * @see av_get_pix_fmt(), av_get_pix_fmt_string() + */ +const char *av_get_pix_fmt_name(enum PixelFormat pix_fmt); + /** * Print in buf the string corresponding to the pixel format with * number pix_fmt, or an header if pix_fmt is negative. -- cgit v1.2.3