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 00036 return LIBAVUTIL_VERSION_INT; 00037 } 00038 00039 const char *avutil_configuration(void) 00040 { 00041 return FFMPEG_CONFIGURATION; 00042 } 00043 00044 const char *avutil_license(void) 00045 { 00046 #define LICENSE_PREFIX "libavutil license: " 00047 return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; 00048 } 00049 00050 const char *av_get_media_type_string(enum AVMediaType media_type) 00051 { 00052 switch (media_type) { 00053 case AVMEDIA_TYPE_VIDEO: return "video"; 00054 case AVMEDIA_TYPE_AUDIO: return "audio"; 00055 case AVMEDIA_TYPE_DATA: return "data"; 00056 case AVMEDIA_TYPE_SUBTITLE: return "subtitle"; 00057 case AVMEDIA_TYPE_ATTACHMENT: return "attachment"; 00058 default: return NULL; 00059 } 00060 } 00061 00062 char av_get_picture_type_char(enum AVPictureType pict_type) 00063 { 00064 switch (pict_type) { 00065 case AV_PICTURE_TYPE_I: return 'I'; 00066 case AV_PICTURE_TYPE_P: return 'P'; 00067 case AV_PICTURE_TYPE_B: return 'B'; 00068 case AV_PICTURE_TYPE_S: return 'S'; 00069 case AV_PICTURE_TYPE_SI: return 'i'; 00070 case AV_PICTURE_TYPE_SP: return 'p'; 00071 case AV_PICTURE_TYPE_BI: return 'b'; 00072 default: return '?'; 00073 } 00074 }