Skip to content

Commit 9cb00e9

Browse files
JohmpaJohn Laurin
andauthored
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 <[email protected]>
1 parent b5c2cb8 commit 9cb00e9

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ Richard Eklycke <[email protected]>
3939
Sanil Raut <[email protected]>
4040
Sergio Ammirata <[email protected]>
4141
The Chromium Authors <*@chromium.org>
42+
Sveriges Television AB <*@svt.se>
4243

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@ Tim Lansen <[email protected]>
5757
Torbjörn Einarsson <[email protected]>
5858
Vincent Nguyen <[email protected]>
5959
Weiguo Shao <[email protected]>
60+
John Laurin <[email protected]>
6061

packager/mpd/base/period.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ AdaptationSet::Role RoleFromString(const std::string& role_str) {
4444
return AdaptationSet::Role::kRoleDub;
4545
if (role_str == "forced-subtitle")
4646
return AdaptationSet::Role::kRoleForcedSubtitle;
47+
if (role_str == "karaoke")
48+
return AdaptationSet::Role::kRoleKaraoke;
49+
if (role_str == "sign")
50+
return AdaptationSet::Role::kRoleSign;
51+
if (role_str == "metadata")
52+
return AdaptationSet::Role::kRoleMetadata;
53+
if (role_str == "enhanced-audio-intelligibility")
54+
return AdaptationSet::Role::kRoleEnhancedAudioIntelligibility;
55+
if (role_str == "emergency")
56+
return AdaptationSet::Role::kRoleEmergency;
57+
if (role_str == "easyreader")
58+
return AdaptationSet::Role::kRoleEasyreader;
4759
if (role_str == "description")
4860
return AdaptationSet::Role::kRoleDescription;
4961
return AdaptationSet::Role::kRoleUnknown;

0 commit comments

Comments
 (0)