Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add missing DASH roles from ISO/IEC 23009-1 section 5.8.5.5 #1390

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/source/options/dash_stream_descriptors.rst
Original file line number Diff line number Diff line change
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.
9 changes: 5 additions & 4 deletions packager/app/packager_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ const char kUsage[] =
" - dash_accessibilities (accessibilities): Optional semicolon separated\n"
" 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_role4s (roles): Optional semicolon separated list of values for\n"
joeyparrish marked this conversation as resolved.
Show resolved Hide resolved
" 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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,14 @@ class AdaptationSet {
kRoleSupplementary,
kRoleCommentary,
kRoleDub,
kRoleDescription,
kRoleSign,
kRoleMetadata,
kRoleEnhancedAudioIntelligibility,
kRoleEmergency,
kRoleForcedSubtitle,
kRoleDescription
kRoleEasyreader,
kRoleKaraoke,
};

virtual ~AdaptationSet();
Expand Down
Loading