2016-09-24, 16:37
Gonna do a shameless quote from Koying which explains it to some extend regarding display stuff
/end offtopic
Quote:First, to be sure we are on the same page, we are speaking about the following API's:
- Current display mode: https://developer.android.com/reference/...#getMode()
- List of available modes: https://developer.android.com/reference/...tedModes()
- Set current mode: https://developer.android.com/reference/...playModeId
Next, we have to split the problem in 2:
1) The "Physical size" of Display.Mode, and what it represents
2) The refresh rate
1) "Physical size"
The API is actually unclear on what it means. Is it the "HDMI" size or the "Framebuffer" size?
For Amazon Fire TV 4K, it's simple, because they are able to switch their framebuffer size on-the-fly, so the FB size always equals the HDMI size.
Shield has the same issue as AML, and always return the FB size.
I'd suggest that AML returns the available HDMI resolutions. That will allow Kodi to switch resolution by itself, which has a number of benefits.
On the Kodi size, we'll have to make sure to get the proper FB size "somehow", to prevent rendering unecessarily in 4K.
2) Refresh rate
Shield "cheats" in that, as I said, it always returns the FB size (1080p) but attaches the available refresh rates of the current HDMI resolution.
There is probably some FW magic that translates a "fake" 1080p30 mode to 2160p30 if the Shield is running in 4K.
If AML goes with the previous suggestion of returning the actual HDMI modes, that is a non-issue.
We indeed expect fractional refresh rates to appear on the list, as we have some logic to properly switch to, e.g., 23.976 or 24 depending on the video.
We also use that value for A/V sync, so if Kodi thinks the display is running at 24p while it's really in 23.976, it'll lead to issues.
/end offtopic