[mythtv] NVidia Shield screen resolution
Peter Bennett
pb.mythtv at gmail.com
Sun Jul 29 20:55:02 UTC 2018
I cannot find a solution to this, Android is firmly in charge and thinks
it knows what is best for me.
On Linux, I can connect MythTV to a 3840x2160 screen and it uses the
full screen and plays 4K video perfectly (using vaapi). I have committed
a change that updates a few places in the code where 1920x1080 was
hardcoded as the maximum. None of those had actually prevented 4K video
from working.
I have a 3840x2160 screen connected to my NVidia Shield. In the Android
setup the resolution is set at "4K". The screen OSD itself confirms that
it is running at 3840x2160. However, QT informs us that the screen
resolution is 1920x1080. Playing a 4K video file results in it being
resized to 1920x1080 and then displayed as 3840x2160 via some android
scaling operation.
In the manifest (supports-screens) I tried adding
android:xlargeScreens="true". This did not help:
<supports-screens android:xlargeScreens="true"
android:largeScreens="true" android:normalScreens="true"
android:anyDensity="true" android:smallScreens="true" />
I also tried android:anyDensity="false" . This made things worse - QT
gave the screen size as 960x540 and everything was blurry. However this
does prove that android is ready and willing to scale the output as it
sees fit, and I don't know how to prevent that from happening.
I also tried removing the supports-screens setting altogether. Kodi does
not use that setting in its manifest. That did not help either. Still
1920x1080.
I tried QApplication::setAttribute(Qt::AA_DisableHighDpiScaling); in the
code in case it is QT that is messing with this. That did not help.
I set the program arguments to "-v general,playback,libav,gui". Then
when a video starts there is a log message with the resolution, which is
obtained for QT desktop widget:
MythUIHelper: Using screen 0, 1920x1080 at 0,0
I found a web site that tells how to modify Android's dpi setting but
that does not seem to be available on the Shield
(https://www.thecustomdroid.com/change-dpi-density-android/).
Playing a 4K video on the Shield and looking at some small writing in
the video, I can see it is jagged, unlike when playing through Linux.
Android may be getting a screen size in inches from somewhere and
deciding that I don't need the full resolution. Or else it is deciding
that MythTV developers are too stupid to create an application that runs
at 4K so they are helping us by resizing it down to 1080.
My next step would be to create a basic "Hello world" android
application and see what screen resolution I get. Since I have never
created an android application from scratch, I don't think I will be
trying this.
Peter
More information about the mythtv-dev
mailing list