6426 iCamera && |
6426 iCamera && |
6427 iInfo.iVfState == ECamTriActive && |
6427 iInfo.iVfState == ECamTriActive && |
6428 iInfo.iVfMode == ECamViewfinderDirect ) |
6428 iInfo.iVfMode == ECamViewfinderDirect ) |
6429 { |
6429 { |
6430 PRINT( _L("Camera <> viewfinder active and window handle changed, restarting viewfinder...") ); |
6430 PRINT( _L("Camera <> viewfinder active and window handle changed, restarting viewfinder...") ); |
6431 iCamera->StopViewFinder(); |
6431 iCamera->StopViewFinder(); |
6432 iInfo.iVfState = ECamTriInactive; |
6432 |
6433 |
6433 if ( iViewfinderWindow != NULL ) |
6434 // restart viewfinder |
6434 { |
6435 //TRAP_IGNORE( ProcessVfStartRequestL() ); |
6435 iViewfinderWindow = aWindow; |
6436 iAppController.EnterViewfinderMode(iAppController.CurrentMode()); |
6436 // Use the same viewfinder position and size as for bitmap viewfinder |
|
6437 TPckgBuf<TCamParamsVfBitmap> params; |
|
6438 iSettingProvider.ProvideCameraParamL( ECameraParamVfBitmap, ¶ms ); |
|
6439 |
|
6440 CEikonEnv* env = CEikonEnv::Static(); |
|
6441 |
|
6442 TInt orgPos = SetVfWindowOrdinal(); // Set visible |
|
6443 iCamera->StartViewFinderDirectL( |
|
6444 env->WsSession(), |
|
6445 *env->ScreenDevice(), |
|
6446 *iViewfinderWindow, |
|
6447 params().iRect ); |
|
6448 (void) SetVfWindowOrdinal( orgPos ); // back to original |
|
6449 } |
|
6450 else |
|
6451 { |
|
6452 iCamera->StopViewFinder(); |
|
6453 iInfo.iVfState = ECamTriInactive; |
|
6454 |
|
6455 // restart viewfinder |
|
6456 |
|
6457 iAppController.EnterViewfinderMode(iAppController.CurrentMode()); |
|
6458 } |
6437 } |
6459 } |
6438 iViewfinderWindow = aWindow; |
6460 iViewfinderWindow = aWindow; |
6439 |
6461 |
6440 PRINT( _L("Camera <= CCamCameraController::SetViewfinderWindowHandle") ); |
6462 PRINT( _L("Camera <= CCamCameraController::SetViewfinderWindowHandle") ); |
6441 } |
6463 } |