Revision 60c144f7

View differences:

libavcodec/avcodec.h
3809 3809
 */
3810 3810
int av_parse_video_frame_rate(AVRational *frame_rate, const char *str);
3811 3811

  
3812
/* error handling */
3813
#if EINVAL > 0
3814
#define AVERROR(e) (-(e)) /**< Returns a negative error code from a POSIX error code, to return from library functions. */
3815
#define AVUNERROR(e) (-(e)) /**< Returns a POSIX error code from a library function error return value. */
3816
#else
3817
/* Some platforms have E* and errno already negated. */
3818
#define AVERROR(e) (e)
3819
#define AVUNERROR(e) (e)
3820
#endif
3821
#define AVERROR_UNKNOWN     AVERROR(EINVAL)  /**< unknown error */
3822
#define AVERROR_IO          AVERROR(EIO)     /**< I/O error */
3823
#define AVERROR_NUMEXPECTED AVERROR(EDOM)    /**< Number syntax expected in filename. */
3824
#define AVERROR_INVALIDDATA AVERROR(EINVAL)  /**< invalid data found */
3825
#define AVERROR_NOMEM       AVERROR(ENOMEM)  /**< not enough memory */
3826
#define AVERROR_NOFMT       AVERROR(EILSEQ)  /**< unknown format */
3827
#define AVERROR_NOTSUPP     AVERROR(ENOSYS)  /**< Operation not supported. */
3828
#define AVERROR_NOENT       AVERROR(ENOENT)  /**< No such file or directory. */
3829
#define AVERROR_EOF         AVERROR(EPIPE)   /**< End of file. */
3830
#define AVERROR_PATCHWELCOME    -MKTAG('P','A','W','E') /**< Not yet implemented in FFmpeg. Patches welcome. */
3831

  
3832 3812
/**
3833 3813
 * Logs a generic warning message about a missing feature. This function is
3834 3814
 * intended to be used internally by FFmpeg (libavcodec, libavformat, etc.)
libavutil/Makefile
9 9
          base64.h                                                      \
10 10
          common.h                                                      \
11 11
          crc.h                                                         \
12
          error.h                                                       \
12 13
          fifo.h                                                        \
13 14
          intfloat_readwrite.h                                          \
14 15
          log.h                                                         \
libavutil/avutil.h
40 40
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
41 41

  
42 42
#define LIBAVUTIL_VERSION_MAJOR 50
43
#define LIBAVUTIL_VERSION_MINOR 11
43
#define LIBAVUTIL_VERSION_MINOR 12
44 44
#define LIBAVUTIL_VERSION_MICRO  0
45 45

  
46 46
#define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
......
69 69
const char *avutil_license(void);
70 70

  
71 71
#include "common.h"
72
#include "error.h"
72 73
#include "mathematics.h"
73 74
#include "rational.h"
74 75
#include "intfloat_readwrite.h"
libavutil/error.h
1
/*
2
 * This file is part of FFmpeg.
3
 *
4
 * FFmpeg 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
 * FFmpeg 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 FFmpeg; if not, write to the Free Software
16
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
 */
18

  
19
/**
20
 * @file libavutil/error.h
21
 * error code definitions
22
 */
23

  
24
#ifndef AVUTIL_ERROR_H
25
#define AVUTIL_ERROR_H
26

  
27
/* error handling */
28
#if EINVAL > 0
29
#define AVERROR(e) (-(e)) /**< Returns a negative error code from a POSIX error code, to return from library functions. */
30
#define AVUNERROR(e) (-(e)) /**< Returns a POSIX error code from a library function error return value. */
31
#else
32
/* Some platforms have E* and errno already negated. */
33
#define AVERROR(e) (e)
34
#define AVUNERROR(e) (e)
35
#endif
36
#define AVERROR_UNKNOWN     AVERROR(EINVAL)  /**< unknown error */
37
#define AVERROR_IO          AVERROR(EIO)     /**< I/O error */
38
#define AVERROR_NUMEXPECTED AVERROR(EDOM)    /**< Number syntax expected in filename. */
39
#define AVERROR_INVALIDDATA AVERROR(EINVAL)  /**< invalid data found */
40
#define AVERROR_NOMEM       AVERROR(ENOMEM)  /**< not enough memory */
41
#define AVERROR_NOFMT       AVERROR(EILSEQ)  /**< unknown format */
42
#define AVERROR_NOTSUPP     AVERROR(ENOSYS)  /**< Operation not supported. */
43
#define AVERROR_NOENT       AVERROR(ENOENT)  /**< No such file or directory. */
44
#define AVERROR_EOF         AVERROR(EPIPE)   /**< End of file. */
45
#define AVERROR_PATCHWELCOME    -MKTAG('P','A','W','E') /**< Not yet implemented in FFmpeg. Patches welcome. */
46

  
47
#endif /* AVUTIL_ERROR_H */

Also available in: Unified diff