summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2013-08-27 14:13:06 +0100
committerTim-Philipp Müller <tim@centricular.net>2013-08-27 14:13:06 +0100
commit65723936292daccec1eae09046223e3a311f53a8 (patch)
treed2319abdb057a20f6abc032d43cdb68902b5f961
parentaab5534573e318402ab5795f3310a739c8e8dc06 (diff)
x264enc: log when we output a lower profile than requested
-rw-r--r--ext/x264/gstx264enc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/x264/gstx264enc.c b/ext/x264/gstx264enc.c
index cf245699..1eb6f1cc 100644
--- a/ext/x264/gstx264enc.c
+++ b/ext/x264/gstx264enc.c
@@ -1446,12 +1446,20 @@ gst_x264_enc_set_profile_and_level (GstX264Enc * encoder, GstCaps * caps)
allowed_profile = gst_structure_get_string (s2, "profile");
if (!strcmp (allowed_profile, "high")) {
if (!strcmp (profile, "constrained-baseline")
- || !strcmp (profile, "baseline") || !strcmp (profile, "main"))
+ || !strcmp (profile, "baseline") || !strcmp (profile, "main")) {
gst_structure_set (s, "profile", G_TYPE_STRING, "high", NULL);
+ GST_INFO_OBJECT (encoder, "downstream requested high profile, but "
+ "encoder will now output %s profile (which is a subset), due "
+ "to how it's been configured", profile);
+ }
} else if (!strcmp (allowed_profile, "main")) {
if (!strcmp (profile, "constrained-baseline")
- || !strcmp (profile, "baseline"))
+ || !strcmp (profile, "baseline")) {
gst_structure_set (s, "profile", G_TYPE_STRING, "main", NULL);
+ GST_INFO_OBJECT (encoder, "downstream requested main profile, but "
+ "encoder will now output %s profile (which is a subset), due "
+ "to how it's been configured", profile);
+ }
} else if (!strcmp (allowed_profile, "baseline")) {
if (!strcmp (profile, "constrained-baseline"))
gst_structure_set (s, "profile", G_TYPE_STRING, "baseline", NULL);