Opened 6 years ago
Closed 5 years ago
Last modified 5 years ago
#13228 closed Developer Task (Fixed)
Miscellaneous Android fixes and improvements
Reported by: | Peter Bennett | Owned by: | Peter Bennett |
---|---|---|---|
Priority: | minor | Milestone: | 30.0 |
Component: | Ports - Android | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Mark Spieth, gigem, jpoet | Ticket locked: | no |
Description (last modified by )
Android support is taking shape. Here is a list of issues to look into, with emphasis on Nvidia Shield / Android TV:
Exit from frontend causes a SEGFAULT.See #13228The first startup hangs on white screen. Needs a splash screen?See #13237Second startup hangs trying to locate the Myth Backend. Perhaps UPNP is not working? I solved it by manually creating the config.xml file. Check what is going on and if necessary set up the best way of doing this.The shield remote does not have enough buttons. Add appropriate OSDs or menus to support all functions with the limited buttons available. Fix the bahaviour of the back button.See #13234- Support for Game controller buttons does not work correctly.
Green line at the bottom of the screen when watching video.See #13230Digital audio is not working. There is only one audio device in the list, OpenSLES and setting up digital audio causes strange behavior.see comment:17- When MythTV goes into the background, it should enter standby mode.
Remove Xvideo playback profiles that will not work.See #13250Ensure default theme painter uses OpenGL.See #13243Support hardware accelerated decode.See #13233- I noticed a white flash sometimes when navigating screens. Maybe the default background should be black not white.
- If Android needs to terminate the app while it is in the background, make sure that is handled cleanly.
Make the real MythTV version known to Android. Currently, Android thinks the app is version 1.0.See #13246
Issues for Android Tablet and phone support:
- better tablet/touchscreen support.
- My screen map probably should have a transient overlay guide
- better gesture support.
- proper list flick scrolling
Attachments (3)
Change History (28)
Changed 6 years ago by
Attachment: | 20180227_1059_android_segfault_workaround.patch added |
---|
Workaround for segfault
comment:2 Changed 6 years ago by
Green line at the bottom of the screen when watching video
Actually there is a green line at the bottom and side on some videos. I notice it on 720p or 480p videos when watching on a 1808p display.
The green line only occurs if it is using texture format YV12. There are two texture formats used for most systems - YV12 and UYVY. The logic for choosing which to use is rather obscure. It is choosing UYVU on regular Linux and choosing YV12 on Android. Testing shows that both formats work for Linux as well as for Android, but YV12 is causing the green line on Android. It seems to be a problem with the resizing algorithm. Changing to use UYVU on Android seems to solve the problem. See attached patch for the workaround (20180227_1100_android_greenline_workaround.patch)
Changed 6 years ago by
Attachment: | 20180227_1100_android_greenline_workaround.patch added |
---|
Workaround for green line
comment:3 Changed 6 years ago by
Status: | new → accepted |
---|
comment:5 Changed 6 years ago by
Replying to pbennett:
Exit from frontend causes a SEGFAULT
The destructor for the main window hits a segfault due to a null pointer, many levels deep in the destructor of QWidget. The destructor is not called twice. I cannot find a solution, so the workaround for now is bypass that on Android. This leaves a memory leak which is preferable to a Seg Fault. Note that even with bypassing the destructor, the Android log still contains messages about the window having died. See attached patch for the workaround (20180227_1059_android_segfault_workaround.patch). Next step in fixing this is to implement the correct Android method of closing an application, which may avoid the problem.
I see at least 1 problem with the shutdown code in main() after exec exits. There is at least 1 deleteLater which requires the dispatcher to be running to process AFAIK. cleanup is called after the return when all the destructors are called. My bet is qApp is deleted before the call to DestroyMythMainWindow?. At the top of cleanup() flush/process the dispatcher queue one last time just in case. Also break on data (gdb) changed for the pointer thats causing the problem. Not that this issue is high priority.
comment:6 Changed 6 years ago by
I validated, by setting a breakpoint at QApplication::~QApplication that it is not being deleted before DestroyMythMainWindow.
However, I have added a line to process the dispatcher queue and moved the DestroyMythMainWindow to the top of cleanup, now there is no more SEGFAULT :) :) !!!
Just adding the processEvents call without moving the DestroyMythMainWindow to the top still caused a SEGFAULT.
I also tested this on Linux and these changes do not cause a problem so they will not need a #ifdef around them.
See patch 20180227_1946_android_segfault.patch attached
Changed 6 years ago by
Attachment: | 20180227_1946_android_segfault.patch added |
---|
Updated fix for seg fault
comment:8 Changed 6 years ago by
I suspect the green line(s) is due to YV12 having the Y part not divisible by 2 and the edge chroma is missing and the default is put in by ffmpeg? as green. I don't think this is gl's fault.
I have also noticed in interlaced images the right edge green has every 2nd pixel black and the others green.
Something sus going on here and may even be overrunning buffers.
comment:11 Changed 6 years ago by
Description: | modified (diff) |
---|
comment:12 Changed 6 years ago by
Description: | modified (diff) |
---|
comment:13 Changed 6 years ago by
Description: | modified (diff) |
---|
comment:14 Changed 6 years ago by
Description: | modified (diff) |
---|
comment:15 Changed 6 years ago by
Description: | modified (diff) |
---|
comment:16 Changed 6 years ago by
Description: | modified (diff) |
---|
comment:17 Changed 6 years ago by
Digital audio does work on the NVidia Shield.
If you have a surround sound receiver that does Dolby Digital-
Go into the Shield setup, Display & Sound, Advanced Settings, Surround Sound - set to Always. It seems that setting it to Auto is the same as Setting it to Never.
Go into MythTV, Setup, Audio. Select Digital Audio Capabilities, check Dolby Digital. Now you can select Speakers as 5.1. You can also select Upconvert Stereo to 5.1 surround, although I do not normally use that.
Now recordings play back Dolby surround through the sound system. Also stereo channels show as Dolby surround if you selected the upconvert. There is not that clicking sound we had before.
comment:18 Changed 6 years ago by
Description: | modified (diff) |
---|
comment:19 Changed 6 years ago by
Owner: | changed from Peter Bennett to Peter Bennett |
---|---|
Status: | accepted → assigned |
comment:20 Changed 6 years ago by
Description: | modified (diff) |
---|
comment:24 Changed 5 years ago by
Resolution: | → Fixed |
---|---|
Status: | assigned → closed |
Exit from frontend causes a SEGFAULT
The destructor for the main window hits a segfault due to a null pointer, many levels deep in the destructor of QWidget. The destructor is not called twice. I cannot find a solution, so the workaround for now is bypass that on Android. This leaves a memory leak which is preferable to a Seg Fault. Note that even with bypassing the destructor, the Android log still contains messages about the window having died. See attached patch for the workaround (20180227_1059_android_segfault_workaround.patch). Next step in fixing this is to implement the correct Android method of closing an application, which may avoid the problem.