fix: dash_roles add role=description for DVS audio per DASH-IF-IOP-v4.3 (#1054)

Fixes support for description role for audio DVS tracks as per spec.
This commit is contained in:
Vishal Shah 2022-06-02 10:40:34 -06:00 committed by GitHub
parent b9d477b969
commit dc0395291a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 8 deletions

View File

@ -12,5 +12,5 @@ DASH specific stream descriptor fields
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**, value should be one of: **caption**, **subtitle**, **main**, **alternate**,
**supplementary**, **commentary** and **dub**. See DASH (ISO/IEC 23009-1) **supplementary**, **commentary**, **description** and **dub**. See
specification for details. DASH (ISO/IEC 23009-1) specification for details.

View File

@ -114,8 +114,8 @@ const char kUsage[] =
" in the format: scheme_id_uri=value.\n" " in the format: scheme_id_uri=value.\n"
" - dash_roles (roles): Optional semicolon separated list of values for\n" " - dash_roles (roles): Optional semicolon separated list of values for\n"
" DASH Role elements. The value should be one of: caption, subtitle,\n" " DASH Role elements. The value should be one of: caption, subtitle,\n"
" main, alternate, supplementary, commentary and dub. See DASH\n" " main, alternate, supplementary, commentary, description and dub. See\n"
" (ISO/IEC 23009-1) specification for details.\n"; " DASH (ISO/IEC 23009-1) specification for details.\n";
// Labels for parameters in RawKey key info. // Labels for parameters in RawKey key info.
const char kDrmLabelLabel[] = "label"; const char kDrmLabelLabel[] = "label";

View File

@ -709,7 +709,7 @@ class PackagerFunctionalTest(PackagerAppTest):
self._GetStream( self._GetStream(
'audio', 'audio',
dash_accessibilities='urn:tva:metadata:cs:AudioPurposeCS:2007=1', dash_accessibilities='urn:tva:metadata:cs:AudioPurposeCS:2007=1',
dash_roles='alternate'), dash_roles='description'),
self._GetStream('video'), self._GetStream('video'),
] ]

View File

@ -12,7 +12,7 @@
</AdaptationSet> </AdaptationSet>
<AdaptationSet id="1" contentType="audio" subsegmentAlignment="true"> <AdaptationSet id="1" contentType="audio" subsegmentAlignment="true">
<Accessibility schemeIdUri="urn:tva:metadata:cs:AudioPurposeCS:2007" value="1"/> <Accessibility schemeIdUri="urn:tva:metadata:cs:AudioPurposeCS:2007" value="1"/>
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="alternate"/> <Role schemeIdUri="urn:mpeg:dash:role:2011" value="description"/>
<Representation id="1" bandwidth="133334" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100"> <Representation id="1" bandwidth="133334" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/> <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<BaseURL>bear-640x360-audio.mp4</BaseURL> <BaseURL>bear-640x360-audio.mp4</BaseURL>

View File

@ -54,6 +54,8 @@ std::string RoleToText(AdaptationSet::Role role) {
return "commentary"; return "commentary";
case AdaptationSet::kRoleDub: case AdaptationSet::kRoleDub:
return "dub"; return "dub";
case AdaptationSet::kRoleDescription:
return "description";
default: default:
return "unknown"; return "unknown";
} }

View File

@ -43,7 +43,8 @@ class AdaptationSet {
kRoleAlternate, kRoleAlternate,
kRoleSupplementary, kRoleSupplementary,
kRoleCommentary, kRoleCommentary,
kRoleDub kRoleDub,
kRoleDescription
}; };
virtual ~AdaptationSet(); virtual ~AdaptationSet();

View File

@ -57,6 +57,8 @@ AdaptationSet::Role RoleFromString(const std::string& role_str) {
return AdaptationSet::Role::kRoleCommentary; return AdaptationSet::Role::kRoleCommentary;
if (role_str == "dub") if (role_str == "dub")
return AdaptationSet::Role::kRoleDub; return AdaptationSet::Role::kRoleDub;
if (role_str == "description")
return AdaptationSet::Role::kRoleDescription;
return AdaptationSet::Role::kRoleUnknown; return AdaptationSet::Role::kRoleUnknown;
} }