[FFmpeg-devel] [PATCH] avcodec: add av_codec_get_max_lowres()

Michael Niedermayer michaelni at gmx.at
Thu Oct 3 16:34:13 CEST 2013


On Thu, Oct 03, 2013 at 04:07:33PM +0200, Stefano Sabatini wrote:
> On date Thursday 2013-10-03 12:39:46 +0200, Michael Niedermayer encoded:
> > TODO: APIChanges & minor bump
> > 
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  libavcodec/avcodec.h |    4 +++-
> >  libavcodec/utils.c   |    5 +++++
> >  2 files changed, 8 insertions(+), 1 deletion(-)
> > 
> > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> > index 2cf30dd..3e45996 100644
> > --- a/libavcodec/avcodec.h
> > +++ b/libavcodec/avcodec.h
> > @@ -2933,7 +2933,7 @@ typedef struct AVCodec {
> >      const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
> >      const uint64_t *channel_layouts;         ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
> >  #if FF_API_LOWRES
> > -    uint8_t max_lowres;                     ///< maximum value for lowres supported by the decoder
> > +    uint8_t max_lowres;                     ///< maximum value for lowres supported by the decoder, no direct access, use av_codec_get_max_lowres
> 
> Nit: av_codec_get_max_lowres()

fixed


> 
> >  #endif
> 
> BTW if you plan to save the fields maybe you should move it at the end
> of the struct when the FF_API_LOWRES API will be dropped.

ill do when its removed, i wont forget as it wont compile when its
removed


> 
> >      const AVClass *priv_class;              ///< AVClass for the private context
> >      const AVProfile *profiles;              ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
> > @@ -3001,6 +3001,8 @@ typedef struct AVCodec {
> >      void (*flush)(AVCodecContext *);
> >  } AVCodec;
> >  
> > +int av_codec_get_max_lowres(const AVCodec *codec);
> > +
> >  /**
> >   * AVHWAccel.
> >   */
> > diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> > index f7b08ea..20de48e 100644
> > --- a/libavcodec/utils.c
> > +++ b/libavcodec/utils.c
> > @@ -1045,6 +1045,11 @@ MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase)
> >  MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor)
> >  MAKE_ACCESSORS(AVCodecContext, codec, int, lowres)
> >  
> > +int av_codec_get_max_lowres(const AVCodec *codec)
> > +{
> > +    return codec->max_lowres;
> > +}
> > +
> 
> LGTM.

applied

thx

> -- 
> FFmpeg = Frenzy and Foolish Minimal Powered Enhanced Geek
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131003/e1577bc1/attachment.asc>


More information about the ffmpeg-devel mailing list