Skip to content

Commit

Permalink
Improve direct play support for Dolby Vision
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert committed Oct 15, 2024
1 parent c9b4022 commit dc8599f
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions source/utils/deviceCapabilities.bs
Original file line number Diff line number Diff line change
Expand Up @@ -562,27 +562,44 @@ function getCodecProfiles() as object
hevcVideoRangeTypes = "SDR"
vp9VideoRangeTypes = "SDR"
av1VideoRangeTypes = "SDR"
canPlayDovi = false

if canPlay4k()
dp = di.GetDisplayProperties()

if dp.DolbyVision
canPlayDovi = true

h264VideoRangeTypes = h264VideoRangeTypes + "|DOVI|DOVIWithSDR"
hevcVideoRangeTypes = hevcVideoRangeTypes + "|DOVI|DOVIWithSDR"
av1VideoRangeTypes = av1VideoRangeTypes + "|DOVI|DOVIWithSDR"
end if

if dp.Hdr10
hevcVideoRangeTypes = hevcVideoRangeTypes + "|HDR10"
vp9VideoRangeTypes = vp9VideoRangeTypes + "|HDR10"
av1VideoRangeTypes = av1VideoRangeTypes + "|HDR10"

if canPlayDovi
hevcVideoRangeTypes = hevcVideoRangeTypes + "|DOVIWithHDR10"
av1VideoRangeTypes = av1VideoRangeTypes + "|DOVIWithHDR10"
end if
end if

if dp.Hdr10Plus
av1VideoRangeTypes = av1VideoRangeTypes + "|HDR10+"
end if

if dp.HLG
hevcVideoRangeTypes = hevcVideoRangeTypes + "|HLG"
vp9VideoRangeTypes = vp9VideoRangeTypes + "|HLG"
av1VideoRangeTypes = av1VideoRangeTypes + "|HLG"
end if
if dp.DolbyVision
h264VideoRangeTypes = h264VideoRangeTypes + "|DOVI"
hevcVideoRangeTypes = hevcVideoRangeTypes + "|DOVI"
'vp9VideoRangeTypes = vp9VideoRangeTypes + ",DOVI" no evidence that vp9 can hold DOVI
av1VideoRangeTypes = av1VideoRangeTypes + "|DOVI"

if canPlayDovi
hevcVideoRangeTypes = hevcVideoRangeTypes + "|DOVIWithHLG"
vp9VideoRangeTypes = vp9VideoRangeTypes + "|DOVIWithHLG"
av1VideoRangeTypes = av1VideoRangeTypes + "|DOVIWithHLG"
end if
end if
end if

Expand Down

0 comments on commit dc8599f

Please sign in to comment.