Clean up movie restart featureCurrent state:
The "Movie Restart" feature is for automatic restarting H264 recording if it was stopped due to reaching 4GiB or 30 min limits.
At the moment this is done by checking some error message dialog id and recording state.
This is a bit hard to port for every model and on firmware change.Goal:
Rewrite the code so that it is more or less a simple state machine that receives the users keypresses as input (Rec, Set)
and checks if recording started (RECORDING_H264) within a second after the keypress was received. Same for stopping.
If the recording indicator indicates that recording suddenly stopped, it should re-emit a movie_start() and check if it records longer than 10 seconds.
If recording stops in less than 10 seconds again, reset the state and wait for the next user input (Rec, Set)
This check is to make sure that recording didnt stop automatically due to e.g. sensor overheating or disk space.
Hint: It would be a good start to draw a state diagram
(i *never* thought i would ever really say that i like drawing charts
)Rework NotifyBoxCurrent state:
The NotifyBox feature is an useful on-screen display to notify the user of some happenings.
Unfortunately its implementation is quite crude, just printing the text on screen, providing not much usability.Goal:
Pimp this functionality by
1) drawing some borders and making it look more like a information dialog, not like a bug.
2) adding e.g. NotifyBoxEx which allows to pass some icon type
3) add an option
to make the boxes disappear when the user presses a button
Make sure the icons being used are GPLed! (e.g. GNOME, KDE or any other linux window manager/toolkit provide plenty)
there is some reference implementation
that cleans up the stuff a bit