00001 /* 00002 * This file is part of FFmpeg. 00003 * 00004 * FFmpeg is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * FFmpeg is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with FFmpeg; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00017 */ 00018 00019 #include "config.h" 00020 #include "avutil.h" 00021 #include "avassert.h" 00022 #include "samplefmt.h" 00023 00029 unsigned avutil_version(void) 00030 { 00031 av_assert0(PIX_FMT_VDA_VLD == 81); //check if the pix fmt enum has not had anything inserted or removed by mistake 00032 av_assert0(AV_SAMPLE_FMT_DBLP == 9); 00033 av_assert0(AVMEDIA_TYPE_ATTACHMENT == 4); 00034 av_assert0(AV_PICTURE_TYPE_BI == 7); 00035 av_assert0(LIBAVUTIL_VERSION_MICRO >= 100); 00036 00037 return LIBAVUTIL_VERSION_INT; 00038 } 00039 00040 const char *avutil_configuration(void) 00041 { 00042 return FFMPEG_CONFIGURATION; 00043 } 00044 00045 const char *avutil_license(void) 00046 { 00047 #define LICENSE_PREFIX "libavutil license: " 00048 return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; 00049 } 00050 00051 const char *av_get_media_type_string(enum AVMediaType media_type) 00052 { 00053 switch (media_type) { 00054 case AVMEDIA_TYPE_VIDEO: return "video"; 00055 case AVMEDIA_TYPE_AUDIO: return "audio"; 00056 case AVMEDIA_TYPE_DATA: return "data"; 00057 case AVMEDIA_TYPE_SUBTITLE: return "subtitle"; 00058 case AVMEDIA_TYPE_ATTACHMENT: return "attachment"; 00059 default: return NULL; 00060 } 00061 } 00062 00063 char av_get_picture_type_char(enum AVPictureType pict_type) 00064 { 00065 switch (pict_type) { 00066 case AV_PICTURE_TYPE_I: return 'I'; 00067 case AV_PICTURE_TYPE_P: return 'P'; 00068 case AV_PICTURE_TYPE_B: return 'B'; 00069 case AV_PICTURE_TYPE_S: return 'S'; 00070 case AV_PICTURE_TYPE_SI: return 'i'; 00071 case AV_PICTURE_TYPE_SP: return 'p'; 00072 case AV_PICTURE_TYPE_BI: return 'b'; 00073 default: return '?'; 00074 } 00075 }