omxplayer stops running
The auto-kiosk mode continuously plays videos without exiting omxplayer. This works for awhile but eventually omxplayer stops playing and can die leaving videofe still running.There are multiple bugs here:
- omxplayer shouldn't stop running.
- videofe should catch if omxplayer dies
omxplayer stops¶There are several things to try here.
- Try alternative omxplayer release.
- Currently building against master
- Try something earlier
- Build libleak to look for memory leaks in omxplayer
- Have videofe run dbuscontrol.sh status and check if position is not changing every few seconds.
- If not, kill omxplayer and restart it.
videofe catching child exit¶
This should already be implemented - I'd be surprised if it isn't. But check for it. If in kiosk mode, then restart the child.
- % Done changed from 20 to 70
I found the problem. It seems that sometimes after switching to a new video the playback never starts. I added coded to kioskStartNextVideo() to catch if the video never starts or if it stalls while playing that will restart the player thread. This seems to work - video continues playback if I leave it alone for awhile now and I can see the restarts in the log file.
I've also added a 25ms delay between setting the URI via dbus to omxplayer and then resetting the playback position. The latter is used to reset metadata in omxplayer and it might be happening to fast so the video just doesn't play (it thinks the last one just ended but the new one keeps it from exiting). So a short delay between dbus requests might help there.
This is currently under test. If the 25ms delay between dbus requests doesn't help I may pull it out as I know the restarts are working fine.
- Status changed from In Progress to Closed
- % Done changed from 70 to 100
I still get the stuck issue with the 25ms delay but it seems to happen, maybe, a little less often. But the issue is properly worked around by restarting the player thread. There does not appear to be any side affects (zombie processes or memory leakage chewing up memory). So this problem appears fixed for now.
Code has been pushed.