diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-12 15:16:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-12 15:34:49 +0200 |
commit | a33ed6bc74b6b8ada925c76c4084afcf8870a048 (patch) | |
tree | 605fa1fc8e55698f892837e7d0191da5e5c34c1c /libavutil/pixdesc.h | |
parent | f391e405dfde35bfb3fea9ccc09bd67b5cc0a8f2 (diff) | |
parent | b7f1010c8fce09096057528f7cd29589ea1ae7df (diff) | |
download | ffmpeg-streaming-a33ed6bc74b6b8ada925c76c4084afcf8870a048.zip ffmpeg-streaming-a33ed6bc74b6b8ada925c76c4084afcf8870a048.tar.gz |
Merge commit 'b7f1010c8fce09096057528f7cd29589ea1ae7df'
* commit 'b7f1010c8fce09096057528f7cd29589ea1ae7df':
tools: do not use av_pix_fmt_descriptors directly.
pixdesc: add functions for accessing pixel format descriptors.
build: add support for Tru64 (OSF/1)
md5: Allocate a normal private context for the opaque md5 context pointer
Conflicts:
cmdutils.c
doc/APIchanges
ffprobe.c
libavformat/md5enc.c
libavutil/version.h
tools/graph2dot.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/pixdesc.h')
-rw-r--r-- | libavutil/pixdesc.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h index 465c215..ccbee9b 100644 --- a/libavutil/pixdesc.h +++ b/libavutil/pixdesc.h @@ -99,10 +99,12 @@ typedef struct AVPixFmtDescriptor{ */ #define PIX_FMT_PSEUDOPAL 64 +#if FF_API_PIX_FMT_DESC /** * The array of all the pixel format descriptors. */ extern const AVPixFmtDescriptor av_pix_fmt_descriptors[]; +#endif /** * Read a line from an image, and write the values of the @@ -183,4 +185,25 @@ char *av_get_pix_fmt_string (char *buf, int buf_size, enum AVPixelFormat pix_fmt */ int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc); +/** + * @return a pixel format descriptor for provided pixel format or NULL if + * this pixel format is unknown. + */ +const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt); + +/** + * Iterate over all pixel format descriptors known to libavutil. + * + * @param prev previous descriptor. NULL to get the first descriptor. + * + * @return next descriptor or NULL after the last descriptor + */ +const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev); + +/** + * @return an AVPixelFormat id described by desc, or AV_PIX_FMT_NONE if desc + * is not a valid pointer to a pixel format descriptor. + */ +enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc); + #endif /* AVUTIL_PIXDESC_H */ |