[FFmpeg-cvslog] lavf: Dump the cpb side data information
Luca Barbato
git at videolan.org
Tue Feb 16 20:51:59 CET 2016
ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Sat Jan 2 15:34:04 2016 +0100| [e579d8b29cdb9b42c50a0fde277dfb047c1466ad] | committer: Luca Barbato
lavf: Dump the cpb side data information
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e579d8b29cdb9b42c50a0fde277dfb047c1466ad
---
libavformat/dump.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/libavformat/dump.c b/libavformat/dump.c
index 878eae8..345d2a9 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -318,6 +318,22 @@ static void dump_audioservicetype(void *ctx, AVPacketSideData *sd)
}
}
+static void dump_cpb(void *ctx, AVPacketSideData *sd)
+{
+ AVCPBProperties *cpb = (AVCPBProperties *)sd->data;
+
+ if (sd->size < sizeof(*cpb)) {
+ av_log(ctx, AV_LOG_INFO, "invalid data");
+ return;
+ }
+
+ av_log(ctx, AV_LOG_INFO,
+ "bitrate max/min/avg: %d/%d/%d buffer size: %d vbv_delay: %"PRId64,
+ cpb->max_bitrate, cpb->min_bitrate, cpb->avg_bitrate,
+ cpb->buffer_size,
+ cpb->vbv_delay);
+}
+
static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
{
int i;
@@ -362,6 +378,10 @@ static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
case AV_PKT_DATA_QUALITY_FACTOR:
av_log(ctx, AV_LOG_INFO, "quality factor: %d", *(int *)sd.data);
break;
+ case AV_PKT_DATA_CPB_PROPERTIES:
+ av_log(ctx, AV_LOG_INFO, "cpb: ");
+ dump_cpb(ctx, &sd);
+ break;
default:
av_log(ctx, AV_LOG_WARNING,
"unknown side data type %d (%d bytes)", sd.type, sd.size);
More information about the ffmpeg-cvslog
mailing list