annotate libavutil/error.h @ 2:897f711a7157

rearrange to work with autoconf
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Tue, 25 Sep 2012 15:55:33 +0200
parents
children
rev   line source
nengel@2 1 /*
nengel@2 2 * This file is part of FFmpeg.
nengel@2 3 *
nengel@2 4 * FFmpeg is free software; you can redistribute it and/or
nengel@2 5 * modify it under the terms of the GNU Lesser General Public
nengel@2 6 * License as published by the Free Software Foundation; either
nengel@2 7 * version 2.1 of the License, or (at your option) any later version.
nengel@2 8 *
nengel@2 9 * FFmpeg is distributed in the hope that it will be useful,
nengel@2 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nengel@2 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
nengel@2 12 * Lesser General Public License for more details.
nengel@2 13 *
nengel@2 14 * You should have received a copy of the GNU Lesser General Public
nengel@2 15 * License along with FFmpeg; if not, write to the Free Software
nengel@2 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
nengel@2 17 */
nengel@2 18
nengel@2 19 /**
nengel@2 20 * @file
nengel@2 21 * error code definitions
nengel@2 22 */
nengel@2 23
nengel@2 24 #ifndef AVUTIL_ERROR_H
nengel@2 25 #define AVUTIL_ERROR_H
nengel@2 26
nengel@2 27 #include <errno.h>
nengel@2 28 #include "common.h"
nengel@2 29
nengel@2 30 /* error handling */
nengel@2 31 #if EDOM > 0
nengel@2 32 #define AVERROR(e) (-(e)) ///< Returns a negative error code from a POSIX error code, to return from library functions.
nengel@2 33 #define AVUNERROR(e) (-(e)) ///< Returns a POSIX error code from a library function error return value.
nengel@2 34 #else
nengel@2 35 /* Some platforms have E* and errno already negated. */
nengel@2 36 #define AVERROR(e) (e)
nengel@2 37 #define AVUNERROR(e) (e)
nengel@2 38 #endif
nengel@2 39
nengel@2 40 #define AVERROR_EOF AVERROR(EPIPE) ///< End of file
nengel@2 41
nengel@2 42
nengel@2 43 /**
nengel@2 44 * Puts a description of the AVERROR code errnum in errbuf.
nengel@2 45 * In case of failure the global variable errno is set to indicate the
nengel@2 46 * error.
nengel@2 47 *
nengel@2 48 * @param errbuf_size the size in bytes of errbuf
nengel@2 49 * @return 0 on success, a negative value otherwise
nengel@2 50 */
nengel@2 51 int av_strerror(int errnum, char *errbuf, size_t errbuf_size);
nengel@2 52
nengel@2 53 #endif /* AVUTIL_ERROR_H */