[FFmpeg-devel] [PATCH] ffprobe: report audio bit rate in stream description

Stefano Sabatini stefasab at gmail.com
Thu Feb 9 19:06:42 CET 2012


On date Thursday 2012-02-09 00:38:03 +0100, Stefano Sabatini encoded:
> On date Tuesday 2012-02-07 21:55:03 +0100, Michael Niedermayer encoded:
> > On Tue, Feb 07, 2012 at 05:52:24PM +0100, Stefano Sabatini wrote:
> > > On date Tuesday 2012-02-07 10:44:22 +0100, Matthieu Bouron encoded:
> > > > 2012/2/6 Clément Bœsch <ubitux at gmail.com>:
> > > [...]
> > > > From ab616ceea409f623b3d0c16bef714bba8036b96c Mon Sep 17 00:00:00 2001
> > > > From: Matthieu Bouron <matthieu.bouron at smartjog.com>
> > > > Date: Mon, 6 Feb 2012 17:07:18 +0100
> > > > Subject: [PATCH 1/2] libavcodec: add avcodec_get_bit_rate function
> > > > 
> > > > ---
> > > >  libavcodec/avcodec.h |    8 ++++++++
> > > >  libavcodec/utils.c   |    4 ++--
> > > >  libavcodec/version.h |    4 ++--
> > > >  3 files changed, 12 insertions(+), 4 deletions(-)
> > > > 
> > > > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> > > > index 43c2128..bdd36b2 100644
> > > > --- a/libavcodec/avcodec.h
> > > > +++ b/libavcodec/avcodec.h
> > > > @@ -3512,6 +3512,14 @@ AVCodec *avcodec_find_decoder_by_name(const char *name);
> > > >  void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
> > > >  
> > > >  /**
> > > > + * Return the codec average bit rate
> > > 
> > > nit: missing dot
> > > 
> > > > + *
> > > > + * @param codec the codec context
> > > 
> > > > + * @return the codec average bit rate
> > > 
> > > What happens if the information is not available in the codec? (I
> > > suppose it will return 0 in this case, so you may need to extend the
> > > docs for that or the user will get surprised).
> > > 
> > > Looks fine otherwise, but I'd like to hear the opinion from Michael
> > > about this new interface.
> > 
> > iam fine with teh interface, though i think the bit_rate field itself
> > should be set correctly when its not currently
> 
> It may be set in avcodec_open() after init is called on the codec, in
> case it was not already set, this should avoid this interface, I'll
> try to have a look at it soon if nobody beats me at it, in the
> meanwhile please suspend this patch.

Check patches in attachment.
-- 
FFmpeg = Funny & Faithful Marvellous Puritan Embarassing God
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavc-set-bit_rate-in-the-codec-context-just-after-th.patch
Type: text/x-diff
Size: 2613 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120209/67649e36/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ffprobe-report-bit-rate-in-stream-description.patch
Type: text/x-diff
Size: 1530 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120209/67649e36/attachment-0001.bin>


More information about the ffmpeg-devel mailing list