×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    19

    CamApp Compatibility with different phone platforms?

    I have a camera application which works fine on a 5MP phone, but not at 3MP phone.
    Can you give me any ideas about how to take unique information of different phone platforms especially their sensor info. I know that I cannot get the exact sensor height and width. This will be done probably with one switch deciding which height and width to use according to that unique sensor info.
    I tried with MACRO somedefine in my MMP but then i have to build using different MMP's for different phone platform which is not
    reasonable for me. Compatibility!!!
    Any suggestions?

    Thank you in advance.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,683

    Re: CamApp Compatibility with different phone platforms?

    Do you use CCamera::CameraInfo and CCamera::EnumerateCaptureSizes?

  3. #3
    Registered User
    Join Date
    Oct 2008
    Posts
    19

    Re: CamApp Compatibility with different phone platforms?

    I've just tried it but everytime resSizes have resSizes.iHeight = resSizes.iWidth = 0 and can't figure out why is it happening.
    index counts from 0 to 5.
    Code:
    Code:
        TSize resSizes(0, 0);
        Observer observer;
        TCameraInfo info = observer.GetCameraInfo();
        
        for (TUint index = 0; index < info.iNumImageSizesSupported; index++)
    	{
    	    observer.GetCameraC()->EnumerateCaptureSizes(resSizes, index, CCamera::EFormatYUV422);
    	    TBuf<50> buffer;
    	    buffer.Append(_L("Res"));
    	    buffer.AppendNum(index);
    	    buffer.Append(_L(": "));
    	    buffer.AppendNum(resSizes.iHeight);
    	    buffer.Append(_L("x"));
    	    buffer.AppendNum(resSizes.iWidth);
    	    CEikonEnv::Static()->InfoWinL(buffer,buffer);
    	}

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,683

    Re: CamApp Compatibility with different phone platforms?

    Also check TCamerInfo::iImageFormatsSupported. YUV formats are supported for video recording. For capturing images, you should rather experiment with EFormatFbsBitmapColorXy-s and Jpeg/Exif.

  5. #5
    Registered User
    Join Date
    Oct 2008
    Posts
    19

    Re: CamApp Compatibility with different phone platforms?

    Okay, I've tried something like this:
    Code:
    CCamera::TFormat ImageFormatMax(TCameraInfo &aInfo)
        {
        if ( aInfo.iImageFormatsSupported & CCamera::EFormatFbsBitmapColor16M )
            {
            return CCamera::EFormatFbsBitmapColor16M;
            }
        else if ( aInfo.iImageFormatsSupported & CCamera::EFormatFbsBitmapColor64K)
            {
            return CCamera::EFormatFbsBitmapColor64K;
            }
        else if ( aInfo.iImageFormatsSupported & CCamera::EFormatFbsBitmapColor4K)
            {
            return CCamera::EFormatFbsBitmapColor4K;
            }
        else if ( aInfo.iImageFormatsSupported & CCamera::EFormatMonochrome)
            {
            return CCamera::EFormatMonochrome;
            }
        else return CCamera::EFormatMonochrome;
        }
    
    ...
    
        CCamera::TFormat format = ImageFormatMax(info);
        
        for (TUint index = 0; index < info.iNumImageSizesSupported; index++)
    	{
    	    observer.GetCameraC()->EnumerateCaptureSizes(resSizes, index, format);
    	    TBuf<50> buffer;
    	    buffer.Append(_L("Res"));
    	    buffer.AppendNum(index);
    	    buffer.Append(_L(": "));
    	    buffer.AppendNum(resSizes.iHeight);
    	    buffer.Append(_L("x"));
    	    buffer.AppendNum(resSizes.iWidth);
    	    CEikonEnv::Static()->InfoWinL(buffer,buffer);
    	}
    ...
    CCamera::EFormatFbsBitmapColor16M is supported. The resolutions suported are :
    Induction on index:
    0: 0x0
    1: 0x0
    2: 0x0
    3: 960x1280
    4: 768x1024
    5: 480x640

    Where is my 2592x1944 ?!?! What's happening?

  6. #6
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    148

    Re: CamApp Compatibility with different phone platforms?

    You should always prefer JPEG/Exif data format for still images. Only subset of image resolutions are normally supported in bitmap format since the memory requirement for example for 5 MPix bitmap would be huge (something like 20 MB with 32-bit bitmap). Also compressed images are normally produced faster by the underlying camera HW, getting a bitmap would take longer. In case you really need the bitmap you should use the smaller resolutions or then decode the higher resolution JPEG (you may easily run out of memory though...)
    janza

  7. #7
    Registered User
    Join Date
    Oct 2008
    Posts
    19

    Re: CamApp Compatibility with different phone platforms?

    You meen I have to use EFormatJpeg ?! Just tried it - all results are 0x0 ?

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,683

    Re: CamApp Compatibility with different phone platforms?

    Quote Originally Posted by alexeystoyanov View Post
    You meen I have to use EFormatJpeg ?! Just tried it - all results are 0x0 ?
    You have probably forgotten to check TCameraInfo::iImageFormatsSupported first...
    Anyway, you can still try EFormatExif.

  9. #9
    Registered User
    Join Date
    Oct 2008
    Posts
    19

    Re: CamApp Compatibility with different phone platforms?

    Thank you!!! Problem solved!
    Last question: "Is the first resolution: "EnumerateCaptureSizes(resSizes, 0, format);" always the max resolution for still?"
    Last edited by alexeystoyanov; 2009-01-14 at 13:49.

  10. #10
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,683

    Re: CamApp Compatibility with different phone platforms?

    According to some resources, yes.

  11. #11
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    148

    Re: CamApp Compatibility with different phone platforms?

    According to Symbian spec EnumerateCaptureSizes() should return supported resolutions ordered by size, biggest first. So index 0 always returns the resolution of biggest image size OR (0,0) in case the biggest size is not supported for that format.
    janza

  12. #12
    Registered User
    Join Date
    Oct 2008
    Posts
    19

    Re: CamApp Compatibility with different phone platforms?

    Thank you! Lock.

Similar Threads

  1. Nokia Gamer (GamR) - concept phone
    By tgm91 in forum General Development Questions
    Replies: 4
    Last Post: 2008-10-01, 21:34
  2. OMA DRM media transfer using PC to Phone using USB
    By venky123 in forum Digital Rights Management & Content Downloading
    Replies: 1
    Last Post: 2008-08-13, 03:02
  3. Replies: 2
    Last Post: 2008-05-17, 23:29
  4. 7610 Contacts - Formatted Phone Numbers
    By padlon in forum General Development Questions
    Replies: 2
    Last Post: 2004-11-12, 18:02

Posting Permissions

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