Skip to content

Commit

Permalink
fix: Add Missing Dash Roles to RoleFromString function (#1418) (#1419)
Browse files Browse the repository at this point in the history
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 <john.laurin@svt.se>
  • Loading branch information
Johmpa and John Laurin authored Aug 29, 2024
1 parent b5c2cb8 commit 9cb00e9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ Richard Eklycke <richard@eklycke.se>
Sanil Raut <sr1990003@gmail.com>
Sergio Ammirata <sergio@ammirata.net>
The Chromium Authors <*@chromium.org>
Sveriges Television AB <*@svt.se>

1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ Tim Lansen <tim.lansen@gmail.com>
Torbjörn Einarsson <torbjorn.einarsson@eyevinn.se>
Vincent Nguyen <nvincen@amazon.com>
Weiguo Shao <weiguo.shao@dolby.com>
John Laurin <john.laurin@svt.se>

12 changes: 12 additions & 0 deletions packager/mpd/base/period.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9cb00e9

Please sign in to comment.