diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-04-23 13:38:50 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-04-26 08:38:57 +0200 |
commit | bebe72f4a05d338e04ae9ca1e9c6b72749b488aa (patch) | |
tree | 8036839520fcde4fba5526e647d53e833075d799 /libavutil/utils.c | |
parent | 30fe9719344f01a147628e07a8e79a9ccc7e0835 (diff) | |
download | ffmpeg-bebe72f4a05d338e04ae9ca1e9c6b72749b488aa.tar.gz |
lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums
Also deprecate av_get_pict_type_char() in favor of
av_get_picture_type_char().
The new enum and av_get_picture_type_char() are defined in libavutil.
This allows the use in libavfilter without the need to link against
libavcodec.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavutil/utils.c')
-rw-r--r-- | libavutil/utils.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavutil/utils.c b/libavutil/utils.c index 042e735631..9b18c97908 100644 --- a/libavutil/utils.c +++ b/libavutil/utils.c @@ -39,3 +39,17 @@ const char *avutil_license(void) #define LICENSE_PREFIX "libavutil license: " return LICENSE_PREFIX LIBAV_LICENSE + sizeof(LICENSE_PREFIX) - 1; } + +char av_get_picture_type_char(enum AVPictureType pict_type) +{ + switch (pict_type) { + case AV_PICTURE_TYPE_I: return 'I'; + case AV_PICTURE_TYPE_P: return 'P'; + case AV_PICTURE_TYPE_B: return 'B'; + case AV_PICTURE_TYPE_S: return 'S'; + case AV_PICTURE_TYPE_SI: return 'i'; + case AV_PICTURE_TYPE_SP: return 'p'; + case AV_PICTURE_TYPE_BI: return 'b'; + default: return '?'; + } +} |