Bug #861
closedExiting from playing video does not return to app
100%
Description
Hitting ESC exits the video but does not return to the app.
Updated by Hammel about 3 years ago
- Project changed from VideoFE to launcher
- Category deleted (
Runtime) - Status changed from New to In Progress
- % Done changed from 0 to 10
This is likely a problem in launcher, not videofe. It doesn't seem to be refreshing the display when the app exits. Same thing happens with picam.
I've added some code to the timer_exec() function that should force a redraw but it doesn't happen. If you just hit ESC at the blank screen you get the refresh.
Some research:- How to force it in xlib: https://forum.flightgear.org/viewtopic.php?t=19871
Updated by Hammel about 3 years ago
- Project changed from launcher to picam
- % Done changed from 10 to 30
This bug was relevant to picam first, which is where it is being solved.
The problem was that the child process (omxplayer, via an xterm) exited when ESC was used but that key was not caught by the app (picam) but somehow got caught by either the xterm or omxplayer. In any case, the xterm and omxplayer exited while leaving the app (picam) running.
The fix here is to scheduled the exit with g_idle_add(), which is what is done when a touch event is being monitored instead of key presses.
I now need to see if videofe has the same problem, which seems likely.
Updated by Hammel about 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 30 to 100
Both picam and videofe are now updated with calls to system(openvt...). Openvt will switch vt's, run a command (in this case sh -c sleep 1) and then return to the original vt without having to specify either the source or destination vt. Also, the vt switch is only needed after the player exits. It is not needed before the player starts anymore.
These changes have reduced the screen flicker of old and allow the apps to properly operate after the recent update to 2021.02.4.
The only other app using omxplayer is musicfe but that doesn't need vt switches because the framebuffer is not trashed by omxplayer when just playing music.
All changes tested, committed and pushed.
Closing issue.