mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
avidemux: provide average bitrate tag
This commit is contained in:
parent
3cfec119b1
commit
dad2b41e4d
1 changed files with 10 additions and 0 deletions
|
@ -1479,6 +1479,16 @@ gst_avi_demux_do_index_stats (GstAviDemux * avi)
|
|||
stream->n_keyframes, (guint) sizeof (GstAviIndexEntry),
|
||||
(guint) (stream->idx_n * sizeof (GstAviIndexEntry)),
|
||||
(guint) (stream->idx_max * sizeof (GstAviIndexEntry)));
|
||||
|
||||
/* knowing all that we do, that also includes avg bitrate */
|
||||
if (!stream->taglist) {
|
||||
stream->taglist = gst_tag_list_new_empty ();
|
||||
}
|
||||
if (stream->total_bytes && stream->idx_duration)
|
||||
gst_tag_list_add (stream->taglist, GST_TAG_MERGE_REPLACE,
|
||||
GST_TAG_BITRATE,
|
||||
(guint) gst_util_uint64_scale (stream->total_bytes * 8,
|
||||
GST_SECOND, stream->idx_duration), NULL);
|
||||
}
|
||||
total_idx *= sizeof (GstAviIndexEntry);
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
|
|
Loading…
Reference in a new issue