From da582f15a9a6d0983c90bb49bec53fd36e90b631 Mon Sep 17 00:00:00 2001 From: CastagnaIT Date: Thu, 30 Jan 2025 09:05:09 +0100 Subject: [PATCH 1/2] [DashTree] Role tag, disabled "subtitle", "caption" uses "subtitle" looks like a kind of old workaround to set content type, but "should" be used only to signal burned-in subtitles to video stream (not CC 608 etc..) "caption" instead has been used to set impaired flag, imo its not correct thing its not a rule that "caption" stand for impaired, as you can read also on wikipedia this should not be a rule, but only some countries may use it as rule IOP/ISO EIC specs say that "subtitle" and "caption" have same meaning of burned-in subtitles so lets try to remove both and we will see if someone complains --- src/parser/DASHTree.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/parser/DASHTree.cpp b/src/parser/DASHTree.cpp index db8464893..ac7333ea6 100644 --- a/src/parser/DASHTree.cpp +++ b/src/parser/DASHTree.cpp @@ -466,13 +466,14 @@ void adaptive::CDashTree::ParseTagAdaptationSet(pugi::xml_node nodeAdp, PLAYLIST if (schemeIdUri == "urn:mpeg:dash:role:2011") { - if (value == "subtitle") - contentType = "text"; - else if (value == "forced") // ISA custom attribute + //! @todo: If no complains, remove commented lines on Kodi 23 + // if ((value == "subtitle" || value == "caption") && contentType.empty()) + // contentType = "text"; + if (value == "forced") // ISA custom attribute adpSet->SetIsForced(true); else if (value == "main") adpSet->SetIsDefault(true); - else if (value == "caption" || value == "alternate" || value == "commentary") + else if (value == "alternate" || value == "commentary") adpSet->SetIsImpaired(true); } } From 17dc43b2a2550d4d0fb299dad1169b04b1de2865 Mon Sep 17 00:00:00 2001 From: CastagnaIT Date: Thu, 30 Jan 2025 09:30:50 +0100 Subject: [PATCH 2/2] [DashTree] Role tag, deprecated custom "forced" support --- src/parser/DASHTree.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/parser/DASHTree.cpp b/src/parser/DASHTree.cpp index ac7333ea6..4d5064128 100644 --- a/src/parser/DASHTree.cpp +++ b/src/parser/DASHTree.cpp @@ -469,7 +469,16 @@ void adaptive::CDashTree::ParseTagAdaptationSet(pugi::xml_node nodeAdp, PLAYLIST //! @todo: If no complains, remove commented lines on Kodi 23 // if ((value == "subtitle" || value == "caption") && contentType.empty()) // contentType = "text"; + + //! @todo: Remove custom "forced" value support on Kodi 23 if (value == "forced") // ISA custom attribute + { + LOG::LogF(LOGWARNING, "The support for the custom \"forced\" value on \"Role\" tag is now " + "deprecated, it will be removed on Kodi v23.\n" + "Please use the \"forced-subtitle\" standard value."); + adpSet->SetIsForced(true); + } + else if (value == "forced-subtitle") adpSet->SetIsForced(true); else if (value == "main") adpSet->SetIsDefault(true);