Skip to content

Commit a31060b

Browse files
committed
Update code docs
1 parent 2c5f3aa commit a31060b

2 files changed

Lines changed: 41 additions & 12 deletions

File tree

docs/source_api_Items.bs.html

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,47 @@
9494
end if
9595
end if
9696

97+
' Cap H264 codec profile to 1080p when the source video is H264.
98+
' Applied dynamically here rather than in the static device profile so it doesn't
99+
' interfere with non-H264 content (e.g. HEVC DoVi remux needs unrestricted resolution).
100+
if isValid(mediaStreams)
101+
for each stream in mediaStreams
102+
if isValid(stream.Type) and stream.Type = "Video" and isValid(stream.Codec) and LCase(stream.Codec) = "h264"
103+
if isValid(postData.DeviceProfile.CodecProfiles)
104+
for each codecProfile in postData.DeviceProfile.CodecProfiles
105+
if isValid(codecProfile.Codec) and LCase(codecProfile.Codec) = "h264" and isValid(codecProfile.Conditions)
106+
' Check if a Height condition already exists at or below 1080
107+
hasHeightCap = false
108+
for each condition in codecProfile.Conditions
109+
if isValid(condition.Property) and condition.Property = "Height"
110+
if condition.Value.toInt() <= 1080
111+
hasHeightCap = true
112+
end if
113+
end if
114+
end for
115+
116+
if not hasHeightCap
117+
codecProfile.Conditions.push({
118+
"Condition": "LessThanEqual",
119+
"Property": "Height",
120+
"Value": "1080",
121+
"IsRequired": false
122+
})
123+
codecProfile.Conditions.push({
124+
"Condition": "LessThanEqual",
125+
"Property": "Width",
126+
"Value": "1920",
127+
"IsRequired": false
128+
})
129+
end if
130+
end if
131+
end for
132+
end if
133+
exit for
134+
end if
135+
end for
136+
end if
137+
97138
if audioTrackIndex > -1
98139
if isValid(mediaStreams)
99140
' Find the audio stream with the matching Jellyfin index

docs/source_utils_deviceCapabilities.bs.html

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -722,18 +722,6 @@
722722
"Property": "VideoRangeType",
723723
"Value": h264VideoRangeTypes,
724724
"IsRequired": false
725-
},
726-
{
727-
"Condition": "LessThanEqual",
728-
"Property": "Height",
729-
"Value": "1080",
730-
"IsRequired": true
731-
},
732-
{
733-
"Condition": "LessThanEqual",
734-
"Property": "Width",
735-
"Value": "1920",
736-
"IsRequired": true
737725
}
738726

739727
]

0 commit comments

Comments
 (0)