1443 // CCamSettingsModel::VideoSceneHasChangedL |
1443 // CCamSettingsModel::VideoSceneHasChangedL |
1444 // Handles a change in the value for the video scene setting. |
1444 // Handles a change in the value for the video scene setting. |
1445 // That is, it updates the rest of the video dynamic setings. |
1445 // That is, it updates the rest of the video dynamic setings. |
1446 // --------------------------------------------------------------------------- |
1446 // --------------------------------------------------------------------------- |
1447 // |
1447 // |
1448 void CCamSettingsModel::VideoSceneHasChangedL( TInt /*aSettingValue*/ ) |
1448 void CCamSettingsModel::VideoSceneHasChangedL( TInt aSettingValue ) |
1449 { |
1449 { |
1450 // Set all the video capture setup values to their defaults, |
1450 // Set all the video capture setup values to their defaults, |
1451 // except for the scene setting. |
1451 // except for the scene setting. |
1452 TInt settingsCount = iDynamicVideoIntSettings.Count(); |
1452 TInt settingsCount = iDynamicVideoIntSettings.Count(); |
1453 TInt i; |
1453 TInt i; |
1454 for ( i = 0; i < settingsCount; ++i ) |
1454 for ( i = 0; i < settingsCount; ++i ) |
1455 { |
1455 { |
1456 // If the setting item is not the scene change it's value. |
1456 //video light is used for LED flash not for xenon flash |
1457 if ( iDynamicVideoIntSettings[i]->iItemId != ECamSettingItemDynamicVideoScene ) |
1457 if ( iDynamicVideoIntSettings[i]->iItemId == ECamSettingItemDynamicVideoFlash ) |
1458 { |
1458 { |
1459 SetIntegerSettingValueL( iDynamicVideoIntSettings[i]->iItemId, |
1459 if ( iUiConfigManager->IsVideoLightSupported() && !iUiConfigManager->IsXenonFlashSupported() ) |
1460 iDynamicVideoIntDefaults[i] ); |
1460 { |
1461 } |
1461 // Set the capture setup flash setting to that of the new scene. |
1462 } |
1462 TInt sceneFlash = DefaultSettingValueForVideoScene( aSettingValue, ECamSettingItemSceneFlashMode ); |
|
1463 SetIntegerSettingValueL( ECamSettingItemDynamicVideoFlash, sceneFlash ); |
|
1464 } |
|
1465 } |
|
1466 // If the setting item is not the scene change it's value. |
|
1467 else if ( iDynamicVideoIntSettings[i]->iItemId != ECamSettingItemDynamicVideoScene ) |
|
1468 { |
|
1469 SetIntegerSettingValueL( iDynamicVideoIntSettings[i]->iItemId, |
|
1470 iDynamicVideoIntDefaults[i] ); |
|
1471 } |
|
1472 } |
1463 |
1473 |
1464 // Update the engine with the scene settings. |
1474 // Update the engine with the scene settings. |
1465 //UpdateEngineWithSceneSettingsL( iVideoScenes, aSettingValue ); |
1475 //UpdateEngineWithSceneSettingsL( iVideoScenes, aSettingValue ); |
|
1476 } |
|
1477 |
|
1478 |
|
1479 // --------------------------------------------------------------------------- |
|
1480 // CCamSettingsModel::DefaultSettingValueForVideoScene |
|
1481 // Returns the default value of a setting for a video scene item. |
|
1482 // --------------------------------------------------------------------------- |
|
1483 // |
|
1484 TInt CCamSettingsModel::DefaultSettingValueForVideoScene( TInt aSceneId, TInt aSettingId ) const |
|
1485 { |
|
1486 TInt sceneIndex = FindSceneInSceneList( aSceneId, iVideoScenes ); |
|
1487 |
|
1488 TInt settingIndex = SearchInSettingsListFor( |
|
1489 iVideoScenes[sceneIndex]->iSettings, aSettingId ); |
|
1490 |
|
1491 return iVideoScenes[sceneIndex]->iSettings[settingIndex]->iValueId; |
1466 } |
1492 } |
1467 |
1493 |
1468 |
1494 |
1469 // --------------------------------------------------------------------------- |
1495 // --------------------------------------------------------------------------- |
1470 // CCamSettingsModel::PhotoSceneMaximumQuality |
1496 // CCamSettingsModel::PhotoSceneMaximumQuality |