x264enc: log when we output a lower profile than requested
authorTim-Philipp Müller <tim@centricular.net>
Tue, 27 Aug 2013 13:13:06 +0000 (14:13 +0100)
committerTim-Philipp Müller <tim@centricular.net>
Tue, 27 Aug 2013 13:13:06 +0000 (14:13 +0100)
ext/x264/gstx264enc.c

index cf245699af4c5f432ac794ac94ff8676b85f8b3f..1eb6f1cc2adc6e03ed34f1b18cf960e33012393a 100644 (file)
@@ -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);