Skip to content

Commit

Permalink
Improving readability.
Browse files Browse the repository at this point in the history
  • Loading branch information
sr1990 committed Jul 22, 2023
1 parent 046afbc commit 3391a02
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packager/mpd/base/mpd_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ std::string GetAdaptationSetKey(const MediaInfo& media_info,

if (GetBaseCodec(media_info).find("dvh") == 0) {
key.append(":");
key.append(std::to_string(16));
key.append(std::to_string(kTransferFunctionPQ));
} else if (media_info.video_info().has_transfer_characteristics()) {
key.append(":");
key.append(
Expand Down
1 change: 1 addition & 0 deletions packager/mpd/base/mpd_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ struct SegmentInfo;
const char kEncryptedMp4Scheme[] = "urn:mpeg:dash:mp4protection:2011";
const char kPsshElementName[] = "cenc:pssh";
const char kMsproElementName[] = "mspr:pro";
const uint32_t kTransferFunctionPQ = 16;

bool HasVODOnlyFields(const MediaInfo& media_info);

Expand Down
2 changes: 1 addition & 1 deletion packager/mpd/base/period.cc
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ bool Period::SetNewAdaptationSetAttributes(
// 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(16);
new_adaptation_set->set_transfer_characteristics(kTransferFunctionPQ);
} else if (media_info.video_info().has_transfer_characteristics()) {
new_adaptation_set->set_transfer_characteristics(
media_info.video_info().transfer_characteristics());
Expand Down

0 comments on commit 3391a02

Please sign in to comment.