Libav
utils.c
Go to the documentation of this file.
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 
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 
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 
65 {
66  return (AVRational){1, AV_TIME_BASE};
67 }
BI type.
Definition: avutil.h:266
S(GMC)-VOP MPEG-4.
Definition: avutil.h:263
const char * avutil_configuration(void)
Return the libavutil build-time configuration.
Definition: utils.c:39
#define LIBAV_CONFIGURATION
Definition: config.h:4
external API header
#define LICENSE_PREFIX
Switching Intra.
Definition: avutil.h:264
char av_get_picture_type_char(enum AVPictureType pict_type)
Return a single letter to describe the given picture type pict_type.
Definition: utils.c:50
unsigned avutil_version(void)
Return the LIBAVUTIL_VERSION_INT constant.
Definition: utils.c:34
#define LIBAV_VERSION
Definition: avversion.h:1
#define AV_TIME_BASE
Internal time base represented as integer.
Definition: avutil.h:241
const char * av_version_info(void)
Return an informative version string.
Definition: utils.c:29
LIBAVUTIL_VERSION_INT
Definition: eval.c:55
const char * avutil_license(void)
Return the libavutil license.
Definition: utils.c:44
#define LIBAV_LICENSE
Definition: config.h:5
Switching Predicted.
Definition: avutil.h:265
rational number numerator/denominator
Definition: rational.h:43
AVPictureType
Definition: avutil.h:259
AVRational av_get_time_base_q(void)
Return the fractional representation of the internal time base.
Definition: utils.c:64
Bi-dir predicted.
Definition: avutil.h:262
Predicted.
Definition: avutil.h:261