×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    45

    Accessing CCameraAdvancedSettings

    This is my code:
    Code:
    			iSettings = CCamera::CCameraAdvancedSettings::NewL( *(iCameraWrapper->Camera()) );
    			RDebug::Print( ECCameraHandler_TakePhoto, _L8("iCameraWrapper->IsAutoFocusSupported()= %d"),iCameraWrapper->IsAutoFocusSupported());
    			RDebug::Print( ECCameraHandler_TakePhoto, _L8("iSettings->SupportedAutoFocusTypes()= %d"),iSettings->SupportedAutoFocusTypes());
    			RDebug::Print( ECCameraHandler_TakePhoto, _L8("iSettings->SupportedFocusModes()= %d"),iSettings->SupportedFocusModes());
    On my nokia 5800 I get:
    1.52.57.698 CCameraHandler_TakePhoto - iCameraWrapper->IsAutoFocusSupported()= 1
    1.52.57.723 CCameraHandler_TakePhoto - iSettings->SupportedAutoFocusTypes()= 1
    1.52.57.734 CCameraHandler_TakePhoto - iSettings->SupportedFocusModes()= 1
    On my nokia C5 I get:
    1:47:53.625 CCameraHandler_TakePhoto - iCameraWrapper->IsAutoFocusSupported()= 1
    1:47:53.646 CCameraHandler_TakePhoto - iSettings->SupportedAutoFocusTypes()= 0
    1:47:53.664 CCameraHandler_TakePhoto - iSettings->SupportedFocusModes()= 0
    The CameraWrapper code is:
    Code:
    TBool CCameraEnginePrivate::IsAutoFocusSupported() const
    490	  {
    491	  if( !iAdvSettings )
    492	    {   
    493	    return (iAutoFocus) ? ETrue : EFalse;
    494	    }
    495	#if !defined(__WINS__)
    496	  return ( iAdvSettings->SupportedFocusModes() &
    497	           CCamera::CCameraAdvancedSettings::EFocusModeAuto );
    498	#else // __WINS__
    499	  return EFalse;
    500	#endif // !__WINS__
    501	  }
    The CCameraEnginePrivate::IsAutoFocusSupported() seems to use the same AdvancedSettings and get a different answer...

    Can anyone help?

  2. #2
    Registered User
    Join Date
    Aug 2009
    Posts
    45

    Re: Accessing CCameraAdvancedSettings

    Tried:
    Code:
    			//iSettings = CCamera::CCameraAdvancedSettings::NewL( *(iCameraWrapper->Camera()) );
    			iSettings = iCameraWrapper->AdvancedSettings();
    Same results.

  3. #3
    Registered User
    Join Date
    May 2008
    Location
    Surat Thani
    Posts
    260

    Re: Accessing CCameraAdvancedSettings

    Quote Originally Posted by dereknoffke View Post
    On my nokia 5800 I get:
    ...

    On my nokia C5 I get:
    ...
    Hi,

    Seems like CameraWrapper's IsAutoFocusSupported function is not working correctly on C5. Based on the function's copy-pasted code in OP, it seems that C5 says it supports EFocusModeAuto, and that causes the wrapper to assume that autofocus is supported - probably the correct return value for C5 would be EFocusModeFixed, so the problem is in the device's CCamera implementation.

    However, as a workaround (as you are using CCameraAdvancedSettings directly already) you could double-check via SupportedAutoFocus* function return values that autofocus is really supported in case IsAutoFocusSupported returns true. You have already seen that SupportedAutoFocusTypes and SupportedFocusModes both return non-zero values on 5800 which really supports AF - if they are zero there's no way AF could work. Also, you can check supported focus ranges - at least EFocusRangeNormal and EFocusRangeHyperfocal should be supported on all AF-capable devices.

    Btw, I'm not excactly sure (nor do I want to know) how CameraWrapper uses a "stub" CCameraAdvancedSettings on older devices that don't support advanced settings, but calling advanced settings autofocus functions directly like this may not give correct results on 3rd edition FP1 and older phones.

  4. #4
    Registered User
    Join Date
    Aug 2009
    Posts
    45

    Re: Accessing CCameraAdvancedSettings

    Thanks TongMuan,

    For some reason I thought that the C5-00 5MP was a 5th Edition. Perhaps the shop data was incorrect.

    I will try compiling my app with the 3rd edition FP2 sdk and perhaps the results will be better.

Similar Threads

  1. CCameraAdvancedSettings
    By bart12 in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2010-05-31, 09:05
  2. FP2 CCameraAdvancedSettings loading
    By ludovic14 in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2008-10-01, 12:00
  3. Use CCameraAdvancedSettings for modify focus
    By metosrs in forum Symbian
    Replies: 1
    Last Post: 2008-02-05, 20:23
  4. CCameraAdvancedSettings available???
    By er_benji in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2007-07-17, 15:19
  5. CCameraAdvancedSettings for S60 or how to focus camera
    By SamoylovBoris in forum Symbian Media (Closed)
    Replies: 8
    Last Post: 2007-05-07, 06:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×