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(DASH): Add video transfer characteristics. #1210

Merged
merged 11 commits into from
Sep 8, 2023
Prev Previous commit
Next Next commit
Flip Dolby special case order
  • Loading branch information
joeyparrish authored and sr1990 committed Sep 2, 2023
commit 144f237a18d6310ef98c8c4ecc1af55e993be86b
7 changes: 4 additions & 3 deletions packager/mpd/base/period.cc
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,12 @@ bool Period::SetNewAdaptationSetAttributes(
// - Common CCIP values.
// Dolby vision:
// https://professionalsupport.dolby.com/s/article/How-to-signal-Dolby-Vision-in-MPEG-DASH
if (new_adaptation_set->codec().find("dvh") == 0) {
new_adaptation_set->set_transfer_characteristics(kTransferFunctionPQ);
} else if (media_info.video_info().has_transfer_characteristics()) {
if (media_info.video_info().has_transfer_characteristics()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sr1990, I made the same change here. Please take a look.

new_adaptation_set->set_transfer_characteristics(
media_info.video_info().transfer_characteristics());
} else if (new_adaptation_set->codec().find("dvh") == 0) {
// Dolby Vision (dvh1 or dvhe) is always HDR.
new_adaptation_set->set_transfer_characteristics(kTransferFunctionPQ);
}

} else if (media_info.has_text_info()) {
Expand Down