Merge pull request #260 from neilsb/static-analyser-fixes
Fixed Static analyser issues
This commit is contained in:
commit
e51dc44358
Binary file not shown.
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
Binary file not shown.
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 17 KiB |
Binary file not shown.
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 16 KiB |
|
@ -229,26 +229,8 @@ function decodeAudioSupported(meta as object) as boolean
|
||||||
codec = meta.json.MediaStreams[1].codec
|
codec = meta.json.MediaStreams[1].codec
|
||||||
streamInfo = { Codec: codec, ChCnt: meta.json.MediaStreams[1].channels }
|
streamInfo = { Codec: codec, ChCnt: meta.json.MediaStreams[1].channels }
|
||||||
|
|
||||||
'Check for Passthrough
|
|
||||||
audioDecoders = devinfo.GetAudioDecodeInfo()
|
|
||||||
|
|
||||||
'DTS
|
|
||||||
if (codec = "dts" or codec = "dca") and audioDecoders.doesexist("dts") then
|
|
||||||
return true
|
|
||||||
end if
|
|
||||||
|
|
||||||
'DD
|
|
||||||
if codec = "ac3" and audioDecoders.doesexist("ac3") then
|
|
||||||
return true
|
|
||||||
end if
|
|
||||||
|
|
||||||
'DD+
|
|
||||||
if codec = "eac3" and audioDecoders.doesexist("DD+") then
|
|
||||||
return true
|
|
||||||
end if
|
|
||||||
|
|
||||||
'Otherwise check Roku can decode stream and channels
|
'Otherwise check Roku can decode stream and channels
|
||||||
canDecode = devinfo.CanDecodeVideo(streamInfo)
|
canDecode = devinfo.CanDecodeAudio(streamInfo)
|
||||||
return canDecode.result
|
return canDecode.result
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|
|
@ -155,53 +155,51 @@ function GetDirectPlayProfiles() as object
|
||||||
end if
|
end if
|
||||||
|
|
||||||
' Check for supported Audio
|
' Check for supported Audio
|
||||||
audioDecoders = di.GetAudioDecodeInfo()
|
if di.CanDecodeAudio({ Codec: "ac3"}).result then
|
||||||
|
|
||||||
if audioDecoders.doesexist("AC3") then
|
|
||||||
mkvAudio = mkvAudio + ",ac3"
|
mkvAudio = mkvAudio + ",ac3"
|
||||||
mp4Audio = mp4Audio + ",ac3"
|
mp4Audio = mp4Audio + ",ac3"
|
||||||
audio = audio + ",ac3"
|
audio = audio + ",ac3"
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if audioDecoders.doesexist("WMA") then
|
if di.CanDecodeAudio({ Codec: "wma"}).result then
|
||||||
audio = audio + ",wma"
|
audio = audio + ",wma"
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if audioDecoders.doesexist("FLAC") then
|
if di.CanDecodeAudio({ Codec: "flac"}).result then
|
||||||
mkvAudio = mkvAudio + ",flac"
|
mkvAudio = mkvAudio + ",flac"
|
||||||
audio = audio + ",flac"
|
audio = audio + ",flac"
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if audioDecoders.doesexist("ALAC") then
|
if di.CanDecodeAudio({ Codec: "alac"}).result then
|
||||||
mkvAudio = mkvAudio + ",alac"
|
mkvAudio = mkvAudio + ",alac"
|
||||||
mp4Audio = mp4Audio + ",alac"
|
mp4Audio = mp4Audio + ",alac"
|
||||||
audio = audio + ",alac"
|
audio = audio + ",alac"
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if audioDecoders.doesexist("AAC") then
|
if di.CanDecodeAudio({ Codec: "aac"}).result then
|
||||||
mkvAudio = mkvAudio + ",aac"
|
mkvAudio = mkvAudio + ",aac"
|
||||||
mp4Audio = mp4Audio + ",aac"
|
mp4Audio = mp4Audio + ",aac"
|
||||||
audio = audio + ",aac"
|
audio = audio + ",aac"
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if audioDecoders.doesexist("OPUS") then
|
if di.CanDecodeAudio({ Codec: "opus"}).result then
|
||||||
mkvAudio = mkvAudio + ",opus"
|
mkvAudio = mkvAudio + ",opus"
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if audioDecoders.doesexist("DTS") then
|
if di.CanDecodeAudio({ Codec: "dts"}).result then
|
||||||
mkvAudio = mkvAudio + ",dts,dca"
|
mkvAudio = mkvAudio + ",dts"
|
||||||
audio = audio + ",dts,dca"
|
audio = audio + ",dts"
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if audioDecoders.doesexist("WMAPRO") then
|
if di.CanDecodeAudio({ Codec: "wmapro"}).result then
|
||||||
audio = audio + ",wmapro"
|
audio = audio + ",wmapro"
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if audioDecoders.doesexist("VORBIS") then
|
if di.CanDecodeAudio({ Codec: "vorbis"}).result then
|
||||||
mkvAudio = mkvAudio + ",vorbis"
|
mkvAudio = mkvAudio + ",vorbis"
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if audioDecoders.doesexist("DD+") then
|
if di.CanDecodeAudio({ Codec: "eac3"}).result then
|
||||||
mkvAudio = mkvAudio + ",eac3"
|
mkvAudio = mkvAudio + ",eac3"
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user