]> git.sesse.net Git - ffmpeg/blob - libavutil/utils.c
configure: MMAL-related decoders should depend on, not select, mmal
[ffmpeg] / libavutil / utils.c
1 /*
2  * This file is part of Libav.
3  *
4  * Libav is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * Libav is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with Libav; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18
19 #include "config.h"
20 #include "avutil.h"
21
22 #include "avversion.h"
23
24 /**
25  * @file
26  * various utility functions
27  */
28
29 const char *av_version_info(void)
30 {
31     return LIBAV_VERSION;
32 }
33
34 unsigned avutil_version(void)
35 {
36     return LIBAVUTIL_VERSION_INT;
37 }
38
39 const char *avutil_configuration(void)
40 {
41     return LIBAV_CONFIGURATION;
42 }
43
44 const char *avutil_license(void)
45 {
46 #define LICENSE_PREFIX "libavutil license: "
47     return LICENSE_PREFIX LIBAV_LICENSE + sizeof(LICENSE_PREFIX) - 1;
48 }
49
50 char av_get_picture_type_char(enum AVPictureType pict_type)
51 {
52     switch (pict_type) {
53     case AV_PICTURE_TYPE_I:  return 'I';
54     case AV_PICTURE_TYPE_P:  return 'P';
55     case AV_PICTURE_TYPE_B:  return 'B';
56     case AV_PICTURE_TYPE_S:  return 'S';
57     case AV_PICTURE_TYPE_SI: return 'i';
58     case AV_PICTURE_TYPE_SP: return 'p';
59     case AV_PICTURE_TYPE_BI: return 'b';
60     default:                 return '?';
61     }
62 }
63
64 AVRational av_get_time_base_q(void)
65 {
66     return (AVRational){1, AV_TIME_BASE};
67 }