summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2015-09-05 23:34:45 +1000
committerJan Schmidt <jan@centricular.com>2015-09-05 23:34:45 +1000
commit05aa763561603ff68d581a35d75fed4919f33100 (patch)
treec1d6604e4d38f5909680b7f8d934c3a0a2f23d2b
parentb41376aba27fb6f57b5461fd5d307322ad862de4 (diff)
x264: Add bitrate info to the tags output.
Makes it possible for muxers to know the target bitrate as soon as encoding starts, which flvmux now uses.
-rw-r--r--ext/x264/gstx264enc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/x264/gstx264enc.c b/ext/x264/gstx264enc.c
index 4581b032..dd1236c2 100644
--- a/ext/x264/gstx264enc.c
+++ b/ext/x264/gstx264enc.c
@@ -1854,7 +1854,9 @@ gst_x264_enc_set_src_caps (GstX264Enc * encoder, GstCaps * caps)
tags = gst_tag_list_new_empty ();
gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, GST_TAG_ENCODER, "x264",
- GST_TAG_ENCODER_VERSION, X264_BUILD, NULL);
+ GST_TAG_ENCODER_VERSION, X264_BUILD,
+ GST_TAG_MAXIMUM_BITRATE, encoder->bitrate * 1024,
+ GST_TAG_NOMINAL_BITRATE, encoder->bitrate * 1024, NULL);
gst_video_encoder_merge_tags (GST_VIDEO_ENCODER (encoder), tags,
GST_TAG_MERGE_REPLACE);
gst_tag_list_unref (tags);