×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    80

    creating camera view finder using StartViewFinderDirectL()

    Below are the codes:

    myCameraTestAppUi.cpp
    void CmyCameraTestAppUi::ConstructL()
    {
    // Initialise app UI with standard value.
    BaseConstructL(CAknAppUi::EAknEnableSkin);

    // Create view object
    iAppView = CmyCameraTestAppView::NewL(ClientRect());

    //create camera object
    CCameraController* iCameraController = CCameraController::NewL();
    iCameraController->InitializeCameraL();
    }

    CCameraController.cpp
    void CCameraController::InitializeCameraL()
    {
    if (!iCameraEngine)
    {
    iCameraEngine = CCameraEngine::NewL();

    iCameraEngine->ReserveCameraL();

    iCameraEngine->startWithVFinder();
    }
    }

    CCameraEngine.cpp
    void CCameraEngine::startWithVFinder()
    {
    TCameraInfo info;
    iCamera->CameraInfo(info);
    TBool supportsDirectVF = info.iOptionsSupported & TCameraInfo::EViewFinderDirectSupported;

    if ( supportsDirectVF )
    {
    CCoeEnv* coeEnv = CCoeEnv::Static();
    iCamera->StartViewFinderDirectL( coeEnv->WsSession(),*(coeEnv->ScreenDevice()),*iAppView->DrawableWindow
    (),iViewFinderRect );
    }
    else // fall back to view finder using bitmaps
    {
    iCamera->StartViewFinderBitmapsL( iViewFinderRect.Size() );
    }
    }

    From here i do not know how to proceed. The error indicates:
    unidentified identifier 'iAppView'
    unidentified identifier 'iViewFinderRect'

  2. #2
    Registered User
    Join Date
    Jun 2008
    Location
    India
    Posts
    1,048

    Re: creating camera view finder using StartViewFinderDirectL()

    Hi,

    Undefined Identifier means there is any error in declaration of objects or you are not including the required headers. So check where you declared iAppView and check whether you have include it's header there.

  3. #3
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    80

    Re: creating camera view finder using StartViewFinderDirectL()

    I am actually refering to this example:
    http://wiki.forum.nokia.com/index.ph...r_with_CCamera

    The iAppView is not declared in CCameraEngine.cpp because it is a member data for CmyCameraTestAppUi class. It is already declared in myCameraTestAppUi.cpp. How to I link them? or i should just include CmyCameraTestAppUi.h in CCameraEngine.cpp? But i already try to include it, but it doesnt work.

    Thanks in advance.

  4. #4
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    74

    Re: creating camera view finder using StartViewFinderDirectL()

    if supportsDirectVF == EFlase then we must monitor CameraEngine::ViewFinderFrameReady(CFbsBitmap& aFrame) to get the bmp frame and draw it on GUI by self.

Similar Threads

  1. Camera field of view problem
    By torsak1 in forum Symbian
    Replies: 2
    Last Post: 2009-10-18, 06:03
  2. Replies: 4
    Last Post: 2009-09-07, 10:51
  3. n73 fullscreen camera odd behaviour
    By g_costanza in forum Symbian
    Replies: 2
    Last Post: 2009-04-05, 10:16
  4. secondary camera view
    By vineet.jain in forum Symbian Media (Closed)
    Replies: 5
    Last Post: 2009-03-19, 10:32
  5. capturing image without view finder.
    By sajindra in forum Symbian
    Replies: 4
    Last Post: 2006-01-09, 21:43

Posting Permissions

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