diff --git a/subprojects/gst-integration-testsuites/medias b/subprojects/gst-integration-testsuites/medias index 267105aebc..3c93fda4fc 160000 --- a/subprojects/gst-integration-testsuites/medias +++ b/subprojects/gst-integration-testsuites/medias @@ -1 +1 @@ -Subproject commit 267105aebcfaee4ea8abbd8206b1cd705fb869b9 +Subproject commit 3c93fda4fc74e9138ae2f83fcb2b92ccf40fd57e diff --git a/subprojects/gst-integration-testsuites/testsuites/validate/h265parse/alternate/flow-expectations/log-fakesink-sink-expected b/subprojects/gst-integration-testsuites/testsuites/validate/h265parse/alternate/flow-expectations/log-fakesink-sink-expected index 1339641822..2401159c8f 100644 --- a/subprojects/gst-integration-testsuites/testsuites/validate/h265parse/alternate/flow-expectations/log-fakesink-sink-expected +++ b/subprojects/gst-integration-testsuites/testsuites/validate/h265parse/alternate/flow-expectations/log-fakesink-sink-expected @@ -1,5 +1,5 @@ event stream-start: GstEventStreamStart, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)1; -event caps: video/x-h265, alignment=(string)au, bit-depth-chroma=(uint)8, bit-depth-luma=(uint)8, chroma-format=(string)4:2:0, codec_data=(buffer)0101400000004000000000003cf000fcfdf8f800000f03200001001840010c01ffff01400000030040000003000003003c250240210001003642010101400000030040000003000003003ca009881a7779e96e44a1735010202ed00000030010000004b51affde103e805df7c2010422000100074401c07181cdb2, colorimetry=(string)2:0:0:1, framerate=(fraction)75/2, height=(int)200, level=(string)2, parsed=(boolean)true, profile=(string)main, stream-format=(string)hvc1, tier=(string)main, width=(int)300; +event caps: video/x-h265, alignment=(string)au, bit-depth-chroma=(uint)8, bit-depth-luma=(uint)8, chroma-format=(string)4:2:0, codec_data=(buffer)0101400000004000000000003cf000fcfdf8f800000f03200001001840010c01ffff01400000030040000003000003003c250240210001003642010101400000030040000003000003003ca009881a7779e96e44a1735010202ed00000030010000004b51affde103e805df7c2010422000100074401c07181cdb2, colorimetry=(string)2:0:0:1, framerate=(fraction)75/2, height=(int)200, lcevc=(boolean)false, level=(string)2, parsed=(boolean)true, profile=(string)main, stream-format=(string)hvc1, tier=(string)main, width=(int)300; event segment: format=TIME, start=0:00:00.000000000, offset=0:00:00.000000000, stop=none, time=0:00:00.000000000, base=0:00:00.000000000, position=0:00:00.000000000 event tag: GstTagList-stream, taglist=(taglist)"taglist\,\ video-codec\=\(string\)\"H.265\\\ \\\(Main\\\ Profile\\\)\"\;"; buffer: dts=0:00:00.000000000, dur=0:00:00.013333333, flags=discont marker header last diff --git a/subprojects/gst-integration-testsuites/testsuites/validate/h265parse/trickmode_predicted.seek_trickmode_predicted/flow-expectations/log-parse-src-expected b/subprojects/gst-integration-testsuites/testsuites/validate/h265parse/trickmode_predicted.seek_trickmode_predicted/flow-expectations/log-parse-src-expected index 3c872273d7..a5e6e1cd4a 100644 --- a/subprojects/gst-integration-testsuites/testsuites/validate/h265parse/trickmode_predicted.seek_trickmode_predicted/flow-expectations/log-parse-src-expected +++ b/subprojects/gst-integration-testsuites/testsuites/validate/h265parse/trickmode_predicted.seek_trickmode_predicted/flow-expectations/log-parse-src-expected @@ -1,5 +1,5 @@ event stream-start: GstEventStreamStart, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)1; -event caps: video/x-h265, alignment=(string)au, bit-depth-chroma=(uint)10, bit-depth-luma=(uint)10, chroma-format=(string)4:2:0, codec_data=(buffer)0102200000009000000000003ff000fcfdfafa00000f03200001001840010c01ffff02200000030090000003000003003f959009210001002e42010102200000030090000003000003003fa00a080f136595924932bffc0004000404000003000400000300782022000100074401c172b46240, colorimetry=(string)2:4:5:4, framerate=(fraction)30/1, height=(int)240, level=(string)2.1, parsed=(boolean)true, pixel-aspect-ratio=(fraction)1/1, profile=(string)main-10, stream-format=(string)hvc1, tier=(string)main, width=(int)320; +event caps: video/x-h265, alignment=(string)au, bit-depth-chroma=(uint)10, bit-depth-luma=(uint)10, chroma-format=(string)4:2:0, codec_data=(buffer)0102200000009000000000003ff000fcfdfafa00000f03200001001840010c01ffff02200000030090000003000003003f959009210001002e42010102200000030090000003000003003fa00a080f136595924932bffc0004000404000003000400000300782022000100074401c172b46240, colorimetry=(string)2:4:5:4, framerate=(fraction)30/1, height=(int)240, lcevc=(boolean)false, level=(string)2.1, parsed=(boolean)true, pixel-aspect-ratio=(fraction)1/1, profile=(string)main-10, stream-format=(string)hvc1, tier=(string)main, width=(int)320; event segment: format=TIME, start=0:00:00.066666666, offset=0:00:00.000000000, stop=0:00:10.066666666, time=0:00:00.000000000, base=0:00:00.000000000, position=0:00:00.066666666 event tag: GstTagList-stream, taglist=(taglist)"taglist\,\ video-codec\=\(string\)\"H.265\\\ /\\\ HEVC\"\,\ maximum-bitrate\=\(uint\)1937280\,\ bitrate\=\(uint\)1537413\,\ container-specific-track-id\=\(string\)2\,\ encoder\=\(string\)x265\;"; event tag: GstTagList-global, taglist=(taglist)"taglist\,\ datetime\=\(datetime\)2019-07-15T17:28:39Z\,\ container-format\=\(string\)\"ISO\\\ MP4/M4A\"\;"; diff --git a/subprojects/gst-plugins-bad/gst/videoparsers/gsth265parse.c b/subprojects/gst-plugins-bad/gst/videoparsers/gsth265parse.c index 1470256498..7f122aeaad 100644 --- a/subprojects/gst-plugins-bad/gst/videoparsers/gsth265parse.c +++ b/subprojects/gst-plugins-bad/gst/videoparsers/gsth265parse.c @@ -231,6 +231,7 @@ gst_h265_parse_reset_stream_info (GstH265Parse * h265parse) h265parse->parsed_colorimetry.matrix = GST_VIDEO_COLOR_MATRIX_UNKNOWN; h265parse->parsed_colorimetry.transfer = GST_VIDEO_TRANSFER_UNKNOWN; h265parse->parsed_colorimetry.primaries = GST_VIDEO_COLOR_PRIMARIES_UNKNOWN; + h265parse->lcevc = FALSE; h265parse->have_pps = FALSE; h265parse->have_sps = FALSE; h265parse->have_vps = FALSE; @@ -698,8 +699,9 @@ gst_h265_parse_process_sei_user_data (GstH265Parse * h265parse, GstByteReader br; GstVideoParseUtilsField field = GST_VIDEO_PARSE_UTILS_FIELD_1; - /* only US country code is currently supported */ + /* only US and UK country codes are currently supported */ switch (rud->country_code) { + case ITU_T_T35_COUNTRY_CODE_UK: case ITU_T_T35_COUNTRY_CODE_US: break; default: @@ -2562,6 +2564,11 @@ gst_h265_parse_update_src_caps (GstH265Parse * h265parse, GstCaps * caps) "Couldn't set content light level to caps"); } + if (h265parse->user_data.lcevc_enhancement_data || h265parse->lcevc) + gst_caps_set_simple (caps, "lcevc", G_TYPE_BOOLEAN, TRUE, NULL); + else + gst_caps_set_simple (caps, "lcevc", G_TYPE_BOOLEAN, FALSE, NULL); + src_caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (h265parse)); if (src_caps) { @@ -3289,6 +3296,7 @@ gst_h265_parse_set_caps (GstBaseParse * parse, GstCaps * caps) &h265parse->fps_den); gst_structure_get_fraction (str, "pixel-aspect-ratio", &h265parse->upstream_par_n, &h265parse->upstream_par_d); + gst_structure_get_boolean (str, "lcevc", &h265parse->lcevc); /* get upstream format and align from caps */ gst_h265_parse_format_from_caps (caps, &format, &align); diff --git a/subprojects/gst-plugins-bad/gst/videoparsers/gsth265parse.h b/subprojects/gst-plugins-bad/gst/videoparsers/gsth265parse.h index d71f03535f..feaad9f2f6 100644 --- a/subprojects/gst-plugins-bad/gst/videoparsers/gsth265parse.h +++ b/subprojects/gst-plugins-bad/gst/videoparsers/gsth265parse.h @@ -56,6 +56,7 @@ struct _GstH265Parse gint parsed_par_n, parsed_par_d; gint parsed_fps_n, parsed_fps_d; GstVideoColorimetry parsed_colorimetry; + gboolean lcevc; /* current codec_data in output caps, if any */ GstBuffer *codec_data; /* input codec_data, if any */