Skip to content
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

Add resolution codec check #3953

Merged
merged 4 commits into from
Sep 8, 2024

Conversation

MichaelRUSF
Copy link
Contributor

@MichaelRUSF MichaelRUSF commented Aug 31, 2024

This PR introduces a new check to verify resolution support, ensuring compatibility with 1080p devices. The update involves changes to MediaCodecCapabilitiesTest, ProfileHelper, ExoPlayerProfile, and PlaybackController, allowing playback options to be configured according to the codec's resolution capabilities of the device.

Changes

  1. MediaCodecCapabilitiesTest:
    • Added getMaxResolution method to return the maximum supported width and height.
  2. ProfileHelper:
    • Added maxResolutionCodecProfile
      • Dynamically use the device’s maximum supported resolution obtained from MediaTest.getMaxResolution
    • Removed max1080pProfileConditions
  3. ExoPlayerProfile:
    • Updates the ExoPlayerProfile to reflect changes in the handling of 1080p profiles and removes the disable4KVideo parameter.
  4. PlaybackController:
    • Remove !DeviceUtils.has4kVideoSupport condition.

Copy link
Member

@nielsvanvelzen nielsvanvelzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be even better to use the highest supported width/height values directly in the profile instead.

@MichaelRUSF MichaelRUSF force-pushed the 4k-resolution-check branch 2 times, most recently from 9d1ff79 to d7336d5 Compare September 3, 2024 02:36
var maxWidth = 0
var maxHeight = 0

for (info in mediaCodecList.codecInfos) {

Check warning

Code scanning / detekt

The loop contains more than one break or continue statement. The code should be refactored to increase readability. Warning

The loop contains more than one break or continue statement. The code should be refactored to increase readability.
@MichaelRUSF MichaelRUSF changed the title Add 4k resolution codec check Add resolution codec check Sep 7, 2024
@nielsvanvelzen nielsvanvelzen added this to the v0.18.0 milestone Sep 8, 2024
@nielsvanvelzen nielsvanvelzen added the enhancement New feature or request label Sep 8, 2024
@nielsvanvelzen nielsvanvelzen merged commit 706b645 into jellyfin:master Sep 8, 2024
6 checks passed
@MichaelRUSF MichaelRUSF deleted the 4k-resolution-check branch September 8, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants