On Fri, Nov 23, 2018 at 4:16 AM myp...@gmail.com <myp...@gmail.com> wrote: > > On Thu, Nov 22, 2018 at 11:12 PM Hendrik Leppkes <h.lepp...@gmail.com> wrote: > > > > On Thu, Nov 22, 2018 at 4:04 PM Jun Zhao <mypopy...@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 <mypopy...@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.
The side-data can be used from either a demuxer or an encoder - one describes the original stream, one the newly encoded stream. In fact movenc already uses it to write this particular field to esds, so movdec should use the same structure to read it. See av_stream_new_side_data - Hendrik _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel