[FFmpeg-devel] [PATCH V3 5/7] avformat: add rc_max_rate to AVStream

mypopy at gmail.com mypopy at gmail.com
Fri Nov 23 05:16:20 EET 2018


On Thu, Nov 22, 2018 at 11:12 PM Hendrik Leppkes <h.leppkes at gmail.com> wrote:
>
> On Thu, Nov 22, 2018 at 4:04 PM Jun Zhao <mypopydev at gmail.com> wrote:
> >
> > This field will be used in demuxer to expose the max bit rate, e,g
> > in MOV/MP4 esds box.
> >
> > Signed-off-by: Jun Zhao <mypopydev at gmail.com>
> > ---
> >  doc/APIchanges         |    3 +++
> >  libavformat/avformat.h |    6 ++++++
> >  libavformat/version.h  |    2 +-
> >  3 files changed, 10 insertions(+), 1 deletions(-)
> >
> > diff --git a/doc/APIchanges b/doc/APIchanges
> > index db1879e..0921da1 100644
> > --- a/doc/APIchanges
> > +++ b/doc/APIchanges
> > @@ -15,6 +15,9 @@ libavutil:     2017-10-21
> >
> >  API changes, most recent first:
> >
> > +2018-11-xx - xxxxxxxxxx - lavf 58.23.100 - avformat.h
> > +  Add rc_max_rate to AVStream
> > +
> >  -------- 8< --------- FFmpeg 4.1 was cut here -------- 8< ---------
> >
> >  2018-10-27 - 718044dc19 - lavu 56.21.100 - pixdesc.h
> > diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> > index fdaffa5..1732c24 100644
> > --- a/libavformat/avformat.h
> > +++ b/libavformat/avformat.h
> > @@ -938,6 +938,12 @@ typedef struct AVStream {
> >      AVRational avg_frame_rate;
> >
> >      /**
> > +     * The max bitrate of the encoded data (in bits per second).
> > +     * - decoding: set by libavformat
> > +     */
> > +    int64_t rc_max_rate;
> > +
>
>
> We have AV_PKT_DATA_CPB_PROPERTIES / AVCPBProperties side-data for that.
>
> - Hendrik

I suppose AV_PKT_DATA_CPB_PROPERTIES / AVCPBProperties side-data just
expose the data from  encoder like lib264, but now I need to expose
the max bit rate data from container like MOV/MP4, This is the reason
add a new field in AVStream.


More information about the ffmpeg-devel mailing list