[FFmpeg-devel] [PATCH] Move error codes definitions from lavc to lavu
Michael Niedermayer
michaelni
Mon Mar 8 22:15:43 CET 2010
On Mon, Mar 08, 2010 at 09:46:15PM +0100, Stefano Sabatini wrote:
> On date Monday 2010-03-08 11:13:28 +0100, Michael Niedermayer encoded:
> > On Mon, Mar 08, 2010 at 12:09:49AM +0100, Stefano Sabatini wrote:
> [...]
> > > Subject: [PATCH] Move error code definitions from libavcodec/avcodec.h to
> > > libavutil/error.h, and mark the old definitions to be dropped at the
> > > next major bump.
> > >
> > > Error code definitions and handling code belongs to libavutil, where
> > > it can be shared by all the libav* libraries.
> > > ---
> > > libavcodec/avcodec.h | 3 ++-
> > > libavutil/Makefile | 1 +
> > > libavutil/avutil.h | 3 ++-
> > > libavutil/error.h | 37 +++++++++++++++++++++++++++++++++++++
> > > 4 files changed, 42 insertions(+), 2 deletions(-)
> > > create mode 100644 libavutil/error.h
> > >
> > > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> > > index 8983f05..64cfb26 100644
> > > --- a/libavcodec/avcodec.h
> > > +++ b/libavcodec/avcodec.h
> > > @@ -3810,6 +3810,7 @@ int av_parse_video_frame_size(int *width_ptr, int *height_ptr, const char *str);
> > > */
> > > int av_parse_video_frame_rate(AVRational *frame_rate, const char *str);
> > >
> > > +#if LIBAVCODEC_VERSION_MAJOR < 53
> > > /* error handling */
> > > #if EINVAL > 0
> > > #define AVERROR(e) (-(e)) /**< Returns a negative error code from a POSIX error code, to return from library functions. */
> > > @@ -3828,7 +3829,7 @@ int av_parse_video_frame_rate(AVRational *frame_rate, const char *str);
> > > #define AVERROR_NOTSUPP AVERROR(ENOSYS) /**< Operation not supported. */
> > > #define AVERROR_NOENT AVERROR(ENOENT) /**< No such file or directory. */
> >
> > > #define AVERROR_EOF AVERROR(EPIPE) /**< End of file. */
> >
> > iam not sure about droping this one
>
> Updates:
> * do not keep AVERROR(e) definition in avcodec.h, as it is now defined
> in libavutil/error.h
>
> * define the FFmpeg specific AVERROR_EOF error code in
> libavutil/error.h, this will be enabled when libavcodec version will
> be bumped and the old AVERROR_EOF definition will be dropped.
>
> Regards.
> --
> FFmpeg = Faithless and Faithless Monstrous Puritan Educated Game
> libavcodec/avcodec.h | 5 ++---
> libavutil/Makefile | 1 +
> libavutil/avutil.h | 3 ++-
> libavutil/error.h | 42 ++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 47 insertions(+), 4 deletions(-)
> 1e22b7c63425d615de744772cc44b25495ac9ac0 0001-Move-error-code-definitions-from-libavcodec-avcodec..patch
> >From 987b6d489dad74009a555932dc80d7b3cdab60b9 Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> Date: Sun, 7 Mar 2010 15:15:00 +0100
> Subject: [PATCH] Move error code definitions from libavcodec/avcodec.h to
> libavutil/error.h, and mark the old definitions to be dropped at the
> next major bump.
[...]
> @@ -3828,7 +3827,7 @@ int av_parse_video_frame_rate(AVRational *frame_rate, const char *str);
> #define AVERROR_NOTSUPP AVERROR(ENOSYS) /**< Operation not supported. */
> #define AVERROR_NOENT AVERROR(ENOENT) /**< No such file or directory. */
> #define AVERROR_EOF AVERROR(EPIPE) /**< End of file. */
> -#define AVERROR_PATCHWELCOME -MKTAG('P','A','W','E') /**< Not yet implemented in FFmpeg. Patches welcome. */
> +#endif
[...]
> +/* FFmpeg specific error codes */
> +#define AVERROR_PATCHWELCOME (-MKTAG('P','A','W','E')) ///< Not yet implemented in FFmpeg. Patches welcome.
> +#define AVERROR_BIKESHED (-MKTAG('B','I','S','H')) ///< Invalid argument or color or flavor. Mine is better.
> +#if 0 // enable by hand when LIBAVCODEC_VERSION_MAJOR == 53
> +#define AVERROR_EOF (-MKTAG('E','O','F','_')) ///< End of file.
> +#endif
not just moving
unrelated changes
description doesnt match patch
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I hate to see young programmers poisoned by the kind of thinking
Ulrich Drepper puts forward since it is simply too narrow -- Roman Shaposhnik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100308/c2488180/attachment.pgp>
More information about the ffmpeg-devel
mailing list