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

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

Merged
merged 2 commits into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions docs/source/options/dash_stream_descriptors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ DASH specific stream descriptor fields

Optional semicolon separated list of values for DASH Role element. The
value should be one of: **caption**, **subtitle**, **main**, **alternate**,
**supplementary**, **commentary** and **dub**. See DASH (ISO/IEC 23009-1)
specification for details.
**supplementary**, **commentary**, **description** and **dub**. See
DASH (ISO/IEC 23009-1) specification for details.
6 changes: 3 additions & 3 deletions packager/app/packager_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ const char kUsage[] =
" 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"
" main, alternate, supplementary, commentary and dub. See DASH\n"
" (ISO/IEC 23009-1) specification for details.\n";
" main, alternate, supplementary, commentary, description and dub. See\n"
" DASH (ISO/IEC 23009-1) specification for details.\n";

// Labels for parameters in RawKey key info.
const char kDrmLabelLabel[] = "label";
Expand Down Expand Up @@ -565,7 +565,7 @@ int PackagerMain(int argc, char** argv) {
#if defined(OS_WIN)
// Windows wmain, which converts wide character arguments to UTF-8.
int wmain(int argc, wchar_t* argv[], wchar_t* envp[]) {
std::unique_ptr<char* [], std::function<void(char**)>> utf8_argv(
std::unique_ptr<char*[], std::function<void(char**)>> utf8_argv(
new char*[argc], [argc](char** utf8_args) {
// TODO(tinskip): This leaks, but if this code is enabled, it crashes.
// Figure out why. I suspect gflags does something funny with the
Expand Down
2 changes: 1 addition & 1 deletion packager/app/test/packager_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ def testAudioVideoWithAccessibilitiesAndRoles(self):
self._GetStream(
'audio',
dash_accessibilities='urn:tva:metadata:cs:AudioPurposeCS:2007=1',
dash_roles='alternate'),
dash_roles='description'),
self._GetStream('video'),
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</AdaptationSet>
<AdaptationSet id="1" contentType="audio" subsegmentAlignment="true">
<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">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<BaseURL>bear-640x360-audio.mp4</BaseURL>
Expand Down
2 changes: 2 additions & 0 deletions packager/mpd/base/adaptation_set.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ std::string RoleToText(AdaptationSet::Role role) {
return "commentary";
case AdaptationSet::kRoleDub:
return "dub";
case AdaptationSet::kRoleDescription:
return "description";
default:
return "unknown";
}
Expand Down
3 changes: 2 additions & 1 deletion packager/mpd/base/adaptation_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class AdaptationSet {
kRoleAlternate,
kRoleSupplementary,
kRoleCommentary,
kRoleDub
kRoleDub,
kRoleDescription
};

virtual ~AdaptationSet();
Expand Down
2 changes: 2 additions & 0 deletions packager/mpd/base/period.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ AdaptationSet::Role RoleFromString(const std::string& role_str) {
return AdaptationSet::Role::kRoleCommentary;
if (role_str == "dub")
return AdaptationSet::Role::kRoleDub;
if (role_str == "description")
return AdaptationSet::Role::kRoleDescription;
return AdaptationSet::Role::kRoleUnknown;
}

Expand Down