comparison avcodec.h @ 11476:8ef285dc7f80 libavcodec

Move error code definitions from libavcodec/avcodec.h to libavutil/error.h. Error code definitions and handling code belong to libavutil, where they can be shared by all the libav* libraries. See the thread: Subject: [FFmpeg-devel] [PATCH] Move error codes definitions from lavc to lavu Date: Sun, 19 Jul 2009 12:09:16 +0200
author stefano
date Sat, 13 Mar 2010 09:43:24 +0000
parents db5623d197a3
children 05153393ecb5
comparison
equal deleted inserted replaced
11475:b7744b7bee4b 11476:8ef285dc7f80
3807 * @param[in,out] frame_rate pointer to the AVRational which will contain the detected 3807 * @param[in,out] frame_rate pointer to the AVRational which will contain the detected
3808 * frame rate 3808 * frame rate
3809 */ 3809 */
3810 int av_parse_video_frame_rate(AVRational *frame_rate, const char *str); 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 * Logs a generic warning message about a missing feature. This function is 3813 * Logs a generic warning message about a missing feature. This function is
3834 * intended to be used internally by FFmpeg (libavcodec, libavformat, etc.) 3814 * intended to be used internally by FFmpeg (libavcodec, libavformat, etc.)
3835 * only, and would normally not be used by applications. 3815 * only, and would normally not be used by applications.
3836 * @param[in] avc a pointer to an arbitrary struct of which the first field is 3816 * @param[in] avc a pointer to an arbitrary struct of which the first field is