×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    31

    Capturing image from secondary camera problem

    Hi,

    I have developed an image and video capturing application for my N95, by using the Camera Application Engine API example given at :

    http://wiki.forum.nokia.com/index.ph...ion_Engine_API

    I have given camera index as :

    Code:
    void CCamEngine::ConstructL(TInt aCameraIndex)
    {
        iCaeEngine=CCaeEngine::NewL(aCameraIndex);
        iCaeEngine->SetCamAppEngineObserver(*this);
        iCaeEngine->InitL();
    }
    The camera index is 0 for primary (back) camera and 1 for the secondary (front) camera.

    It works for :

    1. Video Capturing from primary camera
    2. Video Capturing from secondary camera
    3. Image Capturing from primary camera

    But it does not work for :

    4. Image Capturing from secondary camera

    I have changed nothing else. My N95 default camera application can capture image from secondary camera. But my application stucks when I call :

    Code:
    iCaeEngine=CCaeEngine::NewL(1);
    I don't know what else do I need to do.

    Any idea please?

    Thanks.

    Regards.

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: Capturing image from secondary camera problem

    Maybe you could try using the CCamera API instead.

  3. #3
    Registered User
    Join Date
    Sep 2008
    Posts
    31

    Re: Capturing image from secondary camera problem

    Thanks yucca for your reply.

    I have used CCamera as you suggested. When I try to capture image from secondary camera, it says "Feature not supported".

    What can I do for this? Anything I miss? I have all 13 capabilities that I can have.

    Do you have any suggestions?

    Thank you.

    Regards.

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: Capturing image from secondary camera problem

    Beats me, it has worked fine for me, though I'm not sure have I tried it ever with 3rd edition really. Anyway, quick search on this forum didn't bring up any known problems either..

  5. #5
    Registered User
    Join Date
    Sep 2008
    Posts
    31

    Re: Capturing image from secondary camera problem

    Hi,

    My problem is clearer now. I know why I get "Feature not supported" error from secondary camera.

    I got this error when I call function :

    Code:
    iCamera->PrepareImageCapture(CCamera::EFormatExif, 1) ;
    I have also tried

    CCamera::EFormatJpeg
    CCamera::EFormatFbsBitmapColor16M
    CCamera::EFormatFbsBitmapColor64K
    CCamera::EFormatFbsBitmapColor4K
    CCamera::EFormatYUV420Planar

    But these also didn't supported by secondary camera.

    How can I find the formats supported by secondary camera?

    Or anyone already knows this please?

    Thanks.

  6. #6
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: Capturing image from secondary camera problem

    Ok, then, you could do a bit of searching on the problem. There has been quite few posts on the topic, and the problem has often been related to size parameters.

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,570

    Re: Capturing image from secondary camera problem

    How about checking what TCameraInfo says?

  8. #8
    Registered User
    Join Date
    Sep 2008
    Posts
    31

    Re: Capturing image from secondary camera problem

    Hi,

    About TCameraInfo and size issue, I have written the code below to get the sizes that secondary camera supports and use the smallest size, but it again gives the same "Feature not supported" error.

    Since I can get "jpeg" images by the phone's default camera application from the secondary camera, I think I can use the format "EFormatExif" for the secondary camera also.

    Code:
    CCamera::TFormat format = CCamera::EFormatExif ;
    
    TCameraInfo aInfo;
    iCamera->CameraInfo(aInfo); 
    TInt sizeCount = aInfo.iNumImageSizesSupported;
    TSize size[6];
    TInt imageSizeIndex = 1 ;
    
    // all non-zero sizes returned are supported for the format specified
    for (TInt i=0; i < sizeCount; i++) 
    {
        iCamera->EnumerateCaptureSizes(size[i], i, format); 
    }
    
    imageSizeIndex = sizeCount - 1 ;
    TRAPD(err, iCamera->PrepareImageCaptureL(format, imageSizeIndex ));
    The size of the image got from the default application is 320x240.

    I have found following for the primary camera,

    Format / Resolution (index) 2592x1944 (0), 2048x1536 (1), 1600x1200 (2), 1024x768 (3), 640x480 (4)

    EFormatExif (JPEG) 0, 1, 2, 3, 4
    EFormatFbsBitmapColor4K - - - 3, 4
    EFormatFbsBitmapColor64K - - - 3, 4
    EFormatFbsBitmapColor16M - - - 3, 4
    But I don't know about the secondary camera. Any idea?

    Thanks.

    Regards.

Similar Threads

  1. Problem with E90 and secondary screen
    By Tatanka.nbr1 in forum Symbian
    Replies: 5
    Last Post: 2008-06-27, 10:01
  2. camera problem in N73
    By krgvs in forum Symbian
    Replies: 0
    Last Post: 2008-04-17, 07:04
  3. Opening a JPEG Image
    By ummarbhutta in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2007-02-15, 06:34
  4. Image Problem
    By Spider_Eg in forum Mobile Java General
    Replies: 2
    Last Post: 2007-01-30, 13:52
  5. how to save image taken by camera with bitmap
    By winsys in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2006-10-10, 05:46

Posting Permissions

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