Hi, On Sat, Aug 22, 2015 at 1:57 PM, Andreas Cadhalpun < andreas.cadhal...@googlemail.com> wrote:
> This fixes building with FF_API_QSCALE_TYPE disabled. > > Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> > --- > libavcodec/version.h | 3 --- > libavutil/internal.h | 7 +++++++ > libavutil/version.h | 3 +++ > 3 files changed, 10 insertions(+), 3 deletions(-) > > diff --git a/libavcodec/version.h b/libavcodec/version.h > index f0fa7f0..3df2bd7 100644 > --- a/libavcodec/version.h > +++ b/libavcodec/version.h > @@ -130,9 +130,6 @@ > #ifndef FF_API_ERROR_RATE > #define FF_API_ERROR_RATE (LIBAVCODEC_VERSION_MAJOR < 57) > #endif > -#ifndef FF_API_QSCALE_TYPE > -#define FF_API_QSCALE_TYPE (LIBAVCODEC_VERSION_MAJOR < 57) > -#endif > #ifndef FF_API_MB_TYPE > #define FF_API_MB_TYPE (LIBAVCODEC_VERSION_MAJOR < 57) > #endif > diff --git a/libavutil/internal.h b/libavutil/internal.h > index 047f742..2f57210 100644 > --- a/libavutil/internal.h > +++ b/libavutil/internal.h > @@ -256,6 +256,13 @@ void avpriv_request_sample(void *avc, > # define ff_dlog(ctx, ...) do { if (0) av_log(ctx, AV_LOG_DEBUG, > __VA_ARGS__); } while (0) > #endif > > +#if !FF_API_QSCALE_TYPE > +#define FF_QSCALE_TYPE_MPEG1 0 > +#define FF_QSCALE_TYPE_MPEG2 1 > +#define FF_QSCALE_TYPE_H264 2 > +#define FF_QSCALE_TYPE_VP56 3 > +#endif > + > /** > * A wrapper for open() setting O_CLOEXEC. > */ > diff --git a/libavutil/version.h b/libavutil/version.h > index 64713d3..a666de7 100644 > --- a/libavutil/version.h > +++ b/libavutil/version.h > @@ -129,6 +129,9 @@ > #ifndef FF_API_HMAC > #define FF_API_HMAC (LIBAVUTIL_VERSION_MAJOR < 55) > #endif > +#ifndef FF_API_QSCALE_TYPE > +#define FF_API_QSCALE_TYPE (LIBAVUTIL_VERSION_MAJOR < 55) > +#endif > #ifndef FF_API_CRYPTO_CONTEXT > #define FF_API_CRYPTO_CONTEXT (LIBAVUTIL_VERSION_MAJOR < 56) > #endif > -- > 2.5.0 I don't have any better ideas, don't get me wrong, but I cringe at putting codec-specific things in libavutil (even if it's in internal.h). This is crazy and we shouldn't want this to ever become a default. I would almost just propose delaying qscale bump by one version, although that is just kicking the can... Does anyone have good ideas on how to deal with this in a way that doesn't take many hours for a stupid fringe feature? Ronald _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel