From 9cb00e91ab0d081b1f2132abaad7c23ef15047b7 Mon Sep 17 00:00:00 2001 From: John Laurin Date: Thu, 29 Aug 2024 03:59:57 +0200 Subject: [PATCH] fix: Add Missing Dash Roles to RoleFromString function (#1418) (#1419) As per issue #1418, several Dash roles are missing from the RoleFromString function, making them unusable in practice. This update should enable them for use. --------- Co-authored-by: John Laurin --- AUTHORS | 1 + CONTRIBUTORS | 1 + packager/mpd/base/period.cc | 12 ++++++++++++ 3 files changed, 14 insertions(+) diff --git a/AUTHORS b/AUTHORS index 975b98ef8b..e9be92985f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -39,4 +39,5 @@ Richard Eklycke Sanil Raut Sergio Ammirata The Chromium Authors <*@chromium.org> +Sveriges Television AB <*@svt.se> diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 9ba03ca1b7..3011cf6ee4 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -57,4 +57,5 @@ Tim Lansen Torbjörn Einarsson Vincent Nguyen Weiguo Shao +John Laurin diff --git a/packager/mpd/base/period.cc b/packager/mpd/base/period.cc index 0809bcb3f8..f0e906a48a 100644 --- a/packager/mpd/base/period.cc +++ b/packager/mpd/base/period.cc @@ -44,6 +44,18 @@ AdaptationSet::Role RoleFromString(const std::string& role_str) { return AdaptationSet::Role::kRoleDub; if (role_str == "forced-subtitle") return AdaptationSet::Role::kRoleForcedSubtitle; + if (role_str == "karaoke") + return AdaptationSet::Role::kRoleKaraoke; + if (role_str == "sign") + return AdaptationSet::Role::kRoleSign; + if (role_str == "metadata") + return AdaptationSet::Role::kRoleMetadata; + if (role_str == "enhanced-audio-intelligibility") + return AdaptationSet::Role::kRoleEnhancedAudioIntelligibility; + if (role_str == "emergency") + return AdaptationSet::Role::kRoleEmergency; + if (role_str == "easyreader") + return AdaptationSet::Role::kRoleEasyreader; if (role_str == "description") return AdaptationSet::Role::kRoleDescription; return AdaptationSet::Role::kRoleUnknown;