Skip to content

Small refactor: get_out_of_play_mode renamed to exit_play_qr_mode; also added enter_play_mode

Alex requested to merge branch/play_mode into branch/unified

I wanted a simple API to enter/exit PLAY mode that handles all the quirks (e.g. when going out from PLAY mode into LiveView, it waits until LV is up and running).

So far, the code that required this either faked the PLAY button, followed by a delay, or called SetGUIRequestMode followed by delay, or used more or less complex heuristics to determine when the new mode is up and running (see for example mlv_play).

The new APIs are meant to "just work".

Features that may be affected by this refactoring:

  • mlv_play (seems fine on 5D3)
  • focus ramping and focus stacking (these both should get out of QR before being able to focus)
  • ghost image (it gets out of play once you select the overlay image and press LV)
  • intervalometer (todo: check if it's still needed)
  • benchmarks and selftest modules (for example, if the camera is set to turn off the display when you get out of menu, it should switch to play mode before running the tests)

TODO:

  • in this PR I've started to refactor playback routines in two new files: play.c/play.h. The code from those files is currently a bit bleeding edge (I need to test it on more cameras); once that one works fine, I'd like to move these two APIs to play.c/h as well.

  • if console_show is called, and the main display is off, we should probably go to PLAY mode so the user can see that something's going on (example scenario). I'm not very sure about that, because the display might be off because of powersaving, or for other reasons. On the other hand, forcing display on when Canon turned it off is not very reliable either: the image buffers may be uninitialized, and their GUI backend is usually shut down.

Merge request reports