×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    80

    My existing camera based applications not working with n8(symbian^3)..plz help

    Dear All,

    I am doing Augmented Reality(AR) project in symbian . Recently I tried to install my AR applications in Nokia N8 (Symbian^3). My application already work in S60_3rd/S60_5th Edition phone. I am using free artoolkitplus (symbian) library for tracking part. Now when i tried to open my AR application in Nokia N8 it shows error "already in use". It seems problem is coming from camera and camera also not opening. I already tried to build my existing application in Symbian^3 SDK v0.8 and shows same problem in phone. MY camera coding is something like:

    #define CAP_IMG_WIDTH 256
    #define CAP_IMG_HEIGHT 192

    #define BG_TEXTURE_WIDTH 256
    #define BG_TEXTURE_HEIGHT 256

    void CCube::AppInit( void )
    {
    camera = new CameraN(0);
    camera->Init(15.0, CAP_IMG_WIDTH, CAP_IMG_HEIGHT, BG_TEXTURE_WIDTH, BG_TEXTURE_HEIGHT);

    vidTex = new VideoTexture();
    vidTex->Create(CAP_IMG_WIDTH, CAP_IMG_HEIGHT, BG_TEXTURE_WIDTH, BG_TEXTURE_HEIGHT);
    ...............
    ..............
    }


    void CCube::AppCycle( TInt aFrame )
    {

    camera->Capture();

    if (camera->pBufRGBA!=NULL)
    {

    vidTex->Update(camera->pBufRGBA); }

    .............

    }

    Basically as I mentioned. it seems camera coding has mismatch with symbian^3 with my existing(S603rd/5th) coding.
    So can anybody help me to solve this problem...

    Thanks

    Sabera

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

    Re: My existing camera based applications not working with n8(symbian^3)..plz help

    If the built-in Camera application can not open, your application has little chances. Consider restarting the device.

  3. #3
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: My existing camera based applications not working with n8(symbian^3)..plz help

    Try debugging by putting some logs or commenting the camera part and check if the problem is due to camera application only.

  4. #4
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    80

    Re: My existing camera based applications not working with n8(symbian^3)..plz help

    Quote Originally Posted by wizard_hu_ View Post
    If the built-in Camera application can not open, your application has little chances. Consider restarting the device.
    Thanks

    But in built camera application(default) has no problem. problem is my Augmented reality application in camera part. can you check my coding.specially FPS/image width/height..If my this applications runs in N97 then why not N8. Nokia already mentioned S60_5th application should run on Symbian^3.

    Please suggest me to solve this problem.

    Regards
    Sabera

  5. #5
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    80

    Re: My existing camera based applications not working with n8(symbian^3)..plz help

    Dear Everbody,

    I am trying to solve this problem . but still failed. As for Augmented Reality (AR) application Camera is the first action to be open, but in N8 my AR application unable to open the camera. when I tried to open the application its shows "already in use". If i ignore camera part of my application then application open and draw opengles object. So seems problem is in camera part of my coding. But with this same coding S60-3rd/5th Ed mobile can work no problem. May be camera api liitle bit has changed in Symbian^3.

    As the error shows "already in use" that means my coding has some conflict with camera API of symbian^3. So I attached my camera full coding. please see my coding and help me to solve this problem.

    CameraN.cpp
    --------------------------

    void CameraN::Init( float fps, int width, int height, int bufWidth, int bufHeight )
    {
    Camera::Init(-1.0, width, height, bufWidth, bufHeight); // we don't care about fps so just set it as -1
    bpp = 4; // default: RGBA mode
    tmpBuffer = new unsigned char[width*height*4];
    cam = CCamera::NewL( *this, type );
    cam->Reserve();
    copying = false;
    }

    void CameraN::Capture()
    {
    if (newFrameReady)
    {
    pBufRGBA = pBufInternal;
    newFrameReady = false;
    }
    else pBufRGBA = 0; // this to tell the renderer: no need to update video texture and do tracking this time.
    }

    void CameraN::Uninit()
    {
    cam->StopViewFinder();
    cam->Release();
    delete pBufInternal;
    delete tmpBuffer;
    }

    void CameraN::ReserveComplete(TInt aError)
    {
    cam->PowerOn();
    }

    void CameraN::PowerOnComplete(TInt aError)
    {
    pBufInternal = new unsigned char[bufWidth*bufHeight*4];
    pImG = new unsigned char[width*height];

    TSize imSize(width,height);
    cam->StartViewFinderBitmapsL(imSize);
    }

    the main cpp file I already posted here before where camera function Init and call.

    Please see my coding and help me to solve this problem.

Similar Threads

  1. nokia 5700: Need Help Abt Camera PLz PLz
    By amirx64 in forum Streaming and Video
    Replies: 1
    Last Post: 2009-06-24, 07:32
  2. Replies: 4
    Last Post: 2008-03-11, 11:34
  3. can we develop sim based applications using symbian c++
    By vanitha in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2007-10-22, 12:21

Posting Permissions

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