New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix StreamBuilder #7537
Fix StreamBuilder #7537
Conversation
516cb1c
to
2b97fdf
Compare
@eyezak Could you also take a look? |
2b97fdf
to
ff747fc
Compare
`ApplyConditions` is used to determine the applicability of the current codec (`Conditions`). `Conditions` is the actual conditions for the stream. `CodecType.VideoAudio` (not `CodecType.Video`) must be used for the audio tracks in the video.
Don't add codec failure reasons if the codec isn't supported.
71b685f
to
0ff3741
Compare
@@ -750,10 +750,13 @@ private TranscodingProfile GetVideoTranscodeProfile(MediaSourceInfo item, VideoO | |||
var container = transcodingProfile.Container; | |||
var appliedVideoConditions = options.Profile.CodecProfiles | |||
.Where(i => i.Type == CodecType.Video && | |||
i.ContainsAnyCodec(videoCodec, container)) | |||
i.ContainsAnyCodec(videoCodec, container) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style-wise, we put the &&
before the lines, not after
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then this is what it would look like (since I don't want to touch more lines than enough):
.Where(i => i.Type == CodecType.Video &&
i.ContainsAnyCodec(videoCodec, container)
&& i.ApplyConditions.All(...))
And below:
.Where(codecProfile => codecProfile.Type == CodecType.Video && codecProfile.ContainsAnyCodec(videoStream?.Codec, container)
&& !checkVideoConditions(codecProfile.ApplyConditions).Any())
(cherry picked from commit 5833c70) Signed-off-by: Joshua Boniface <joshua@boniface.me>
IMO,
ApplyConditions
andConditions
were mixed up in #7325Changes
ApplyConditions
to determine the applicability of the current codec (Conditions
).VideoAudio
for the audio tracks in the video.Issues
Fixes jellyfin/jellyfin-androidtv#1576
VideoLevelNotSupported
(for HEVC). Ideally, we shouldn't test codec conditions if the codec isn't supported.Don't add codec failure reasons if the codec isn't supported.