camerauis/cameraxui/cxengine/src/cxevideocapturecontrolsymbian.cpp
changeset 52 7e18d488ac5f
parent 46 c826656d6714
child 55 0da2a5b56583
equal deleted inserted replaced
46:c826656d6714 52:7e18d488ac5f
   468 
   468 
   469         try {
   469         try {
   470             // Try asynchronous stopping first.
   470             // Try asynchronous stopping first.
   471             mVideoRecorder->stop(true);
   471             mVideoRecorder->stop(true);
   472             // No error from asynchronous stop -> wait for stop event
   472             // No error from asynchronous stop -> wait for stop event
   473             setState(Stopping);
   473             if (state() != Ready) {
       
   474                 setState(Stopping);
       
   475             }
   474         } catch (const std::exception &e) {
   476         } catch (const std::exception &e) {
   475             CX_DEBUG(("CxeVideoCaptureControlSymbian - async stop failed, try sync.."));
   477             CX_DEBUG(("CxeVideoCaptureControlSymbian - async stop failed, try sync.."));
   476             try {
   478             try {
   477                 mVideoRecorder->stop(false);
   479                 mVideoRecorder->stop(false);
   478                 // stopping went ok
   480                 // stopping went ok
   704     // addState( id, name, allowed next states )
   706     // addState( id, name, allowed next states )
   705     addState(new CxeState(Idle, "Idle", Initialized));
   707     addState(new CxeState(Idle, "Idle", Initialized));
   706     addState(new CxeState(Initialized, "Initialized", Preparing | Idle));
   708     addState(new CxeState(Initialized, "Initialized", Preparing | Idle));
   707     addState(new CxeState(Preparing, "Preparing", Ready | Idle));
   709     addState(new CxeState(Preparing, "Preparing", Ready | Idle));
   708     addState(new CxeState(Ready, "Ready", Recording | PlayingStartSound | Preparing | Idle));
   710     addState(new CxeState(Ready, "Ready", Recording | PlayingStartSound | Preparing | Idle));
   709     addState(new CxeState(Recording, "Recording", Recording | Paused | Stopping | Idle));
   711     addState(new CxeState(Recording, "Recording", Recording | Paused | Stopping | Idle | Ready));
   710     addState(new CxeState(Paused, "Paused", Recording | Stopping | PlayingStartSound | Idle));
   712     addState(new CxeState(Paused, "Paused", Recording | Stopping | PlayingStartSound | Idle));
   711     addState(new CxeState(Stopping, "Stopping", Initialized | Idle));
   713     addState(new CxeState(Stopping, "Stopping", Initialized | Idle | Ready));
   712     addState(new CxeState(PlayingStartSound, "PlayingStartSound", Recording | Idle));
   714     addState(new CxeState(PlayingStartSound, "PlayingStartSound", Recording | Idle));
   713 
   715 
   714     setInitialState(Idle);
   716     setInitialState(Idle);
   715 }
   717 }
   716 
   718