encoding-profile: ignore more output caps fields
authorMathieu Duponchelle <mathieu@centricular.com>
Thu, 20 Jan 2022 23:49:33 +0000 (00:49 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 2 Aug 2022 15:48:12 +0000 (15:48 +0000)
chroma-format, bit-depth-chroma, bit-depth-luma are all informative
fields set by the H265 and H265 parser upon receiving an SPS.

They shouldn't be constrained downstream of the parser, instead
if a user wants those to ultimately match certain values they
should do so by constraining a profile.

In this case however, we also always remove the profile constraint
in order to let encoders pick a suitable one as a function of the
raw input video format and their own capabilities.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1549>

subprojects/gst-plugins-base/gst-libs/gst/pbutils/encoding-profile.c

index 98123bb..65fd107 100644 (file)
@@ -2193,7 +2193,7 @@ create_stream_profile_recurse (GstEncodingProfile * toplevel,
 
   gst_structure_remove_fields (s, "codec_data", "streamheader", "parsed",
       "colorimetry", "framed", "stream-format", "alignment", "tier", "level",
-      "profile", NULL);
+      "profile", "chroma-format", "bit-depth-luma", "bit-depth-chroma", NULL);
 
   GST_LOG ("Stream: %" GST_PTR_FORMAT, caps);
   if (GST_IS_DISCOVERER_AUDIO_INFO (sinfo)) {