Skip to content

Commit

Permalink
[Proposal] DEBUG_ELEMENT: Add hdr information to video Representation
Browse files Browse the repository at this point in the history
This has been a request: to clearly indicate when the current
Representation has linked HDR information in our debug element.

I don't think it causes issue and it makes sense, so I wrote the
proposal commit here.
  • Loading branch information
peaBerberian committed Oct 17, 2024
1 parent 419d66a commit a0e962a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main_thread/api/debug/modules/segment_buffer_content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function constructRepresentationInfo(content: {
isSignInterpreted,
type: bufferType,
} = content.adaptation;
const { id, height, width, bitrate, codecs } = content.representation;
const { id, height, width, bitrate, codecs, hdrInfo } = content.representation;
let representationInfo = `"${id}" `;
if (height !== undefined && width !== undefined) {
representationInfo += `${width}x${height} `;
Expand All @@ -169,6 +169,9 @@ function constructRepresentationInfo(content: {
if (language !== undefined) {
representationInfo += `l:"${language}" `;
}
if (bufferType === "video" && hdrInfo !== undefined) {
representationInfo += "hdr:1 ";
}
if (bufferType === "video" && typeof isSignInterpreted === "boolean") {
representationInfo += `si:${isSignInterpreted ? 1 : 0} `;
}
Expand Down

0 comments on commit a0e962a

Please sign in to comment.