Skip to content

Commit

Permalink
feat: add missing DASH roles from ISO/IEC 23009-1 section 5.8.5.5 (#1390
Browse files Browse the repository at this point in the history
)



Fixes #1149

---------

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
  • Loading branch information
cosmin and joeyparrish committed Apr 30, 2024
1 parent 4b5e80d commit fe885b3
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
7 changes: 5 additions & 2 deletions docs/source/options/dash_stream_descriptors.rst
Expand Up @@ -10,7 +10,10 @@ DASH specific stream descriptor fields

:dash_roles (roles):

Optional semicolon separated list of values for DASH Role element. The
optional semicolon separated list of values for DASH Role element. The
value should be one of: **caption**, **subtitle**, **main**, **alternate**,
**supplementary**, **commentary**, **description**, **dub** and **forced-subtitle** .
**supplementary**, **commentary**, **dub**, **description**, **sign**,
**metadata**, **enhanced-audio- intelligibility**, **emergency**,
**forced-subtitle**, **easyreader**, and **karaoke**.

See DASH (ISO/IEC 23009-1) specification for details.
7 changes: 4 additions & 3 deletions packager/app/packager_main.cc
Expand Up @@ -126,9 +126,10 @@ const char kUsage[] =
" list of values for DASH Accessibility elements. The value should be\n"
" in the format: scheme_id_uri=value.\n"
" - dash_roles (roles): Optional semicolon separated list of values for\n"
" DASH Role elements. The value should be one of: caption, subtitle,\n"
" forced-subtitle, main, alternate, supplementary, commentary, \n"
" description and dub. See DASH\n"
" DASH Role elements. The value should be one of: caption, subtitle, \n"
" main, alternate, supplementary, commentary, dub, description, sign, \n"
" metadata, enhanced-audio- intelligibility, emergency, \n"
" forced-subtitle, easyreader, and karaoke. See DASH\n"
" (ISO/IEC 23009-1) specification for details.\n"
" - forced_subtitle: Optional boolean value (0|1). If set to 1 \n"
" indicates that this stream is a Forced Narrative subtitle that \n"
Expand Down
16 changes: 14 additions & 2 deletions packager/mpd/base/adaptation_set.cc
Expand Up @@ -59,10 +59,22 @@ std::string RoleToText(AdaptationSet::Role role) {
return "commentary";
case AdaptationSet::kRoleDub:
return "dub";
case AdaptationSet::kRoleForcedSubtitle:
return "forced-subtitle";
case AdaptationSet::kRoleDescription:
return "description";
case AdaptationSet::kRoleSign:
return "sign";
case AdaptationSet::kRoleMetadata:
return "metadata";
case AdaptationSet::kRoleEnhancedAudioIntelligibility:
return "enhanced-audio-intelligibility";
case AdaptationSet::kRoleEmergency:
return "emergency";
case AdaptationSet::kRoleForcedSubtitle:
return "forced-subtitle";
case AdaptationSet::kRoleEasyreader:
return "easyreader";
case AdaptationSet::kRoleKaraoke:
return "karaoke";
default:
return "unknown";
}
Expand Down
8 changes: 7 additions & 1 deletion packager/mpd/base/adaptation_set.h
Expand Up @@ -43,8 +43,14 @@ class AdaptationSet {
kRoleSupplementary,
kRoleCommentary,
kRoleDub,
kRoleDescription,
kRoleSign,
kRoleMetadata,
kRoleEnhancedAudioIntelligibility,
kRoleEmergency,
kRoleForcedSubtitle,
kRoleDescription
kRoleEasyreader,
kRoleKaraoke,
};

virtual ~AdaptationSet();
Expand Down

0 comments on commit fe885b3

Please sign in to comment.