Package 

Class CameraOrchestrator


  • 
    public class CameraOrchestrator
    
                        

    Schedules com.otaliastudios.cameraview.engine.CameraEngine actions, so that they always run on the same thread. We need to be extra careful (not as easy as posting on a Handler) because the engine has different states, and some actions will modify the engine state - turn it on or tear it down. Other actions might need a specific state to be executed. And most importantly, some actions will finish asynchronously, so subsequent actions should wait for the previous to finish, but without blocking the thread.