×

Discussion Board

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

    Camera View Finder is not display on device screen

    Below are my codes:

    The 2 functions highlighted with the same colour is the same function.

    myCameraTestAppUi.cpp
    void CmyCameraTestAppUi::ConstructL()
    {
    BaseConstructL(EAknEnableSkin);

    iAppView = CmyCameraTestAppView::NewL(ClientRect());

    CCameraController* iCameraController = CCameraController::NewL();
    const TRect RectSize = ClientRect();
    iCameraController->InitializeCameraL(iAppView,const_cast<TRect&>(RectSize)) ;

    }

    CCameraController.cpp
    void CCameraController::InitializeCameraL(CmyCameraTestAppView* aAppView,TRect& aRect)
    {
    if (!iCameraEngine)
    {
    iCameraEngine = CCameraEngine::NewL();

    iCameraEngine->ReserveCameraL();

    iCameraEngine->startWithVFinder(aAppView,aRect) ;
    }
    }

    CCameraEngine.cpp
    void CCameraEngine::startWithVFinder(CmyCameraTestAppView* aAppView, TRect& aRect)
    {
    TCameraInfo info;
    iCamera->CameraInfo(info);
    TBool supportsDirectVF = info.iOptionsSupported & TCameraInfo::EViewFinderDirectSupported;

    if ( supportsDirectVF )
    {
    CCoeEnv* coeEnv = CCoeEnv::Static();
    TRAPD(error,iCamera->StartViewFinderDirectL( coeEnv->WsSession(),*(coeEnv->ScreenDevice()),*aAppView-
    >DrawableWindow(),aRect));
    if (error == KErrNone)
    {
    aAppView->ViewFinderDraw(iCamera);
    }
    }
    }

    myCameraTestAppView.cpp
    void CmyCameraTestAppView::ViewFinderDraw(CCamera* aCamera) {
    CWindowGc& gc = SystemGc();
    if ( aCamera->ViewFinderActive() )
    {
    // clear the background of viewfinder with transparent color
    gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
    gc.SetBrushColor( TRgb( 0, 0 ) );
    gc.Clear();
    return;
    }
    }

    Why the view finder is not display on the device screen. Anyone can tell me the prob?
    Thanks in advance.

  2. #2
    Nokia Developer Champion
    Join Date
    May 2004
    Posts
    2,267

    Re: Camera View Finder is not display on device screen

    Hi,

    Did you try the camera examples provided by Forum Nokia? It is always good to start from a working example instead of coding from scratch.

    "S60 Platform: Camera Example"
    http://www.forum.nokia.com/info/sw.n...a_Example.html

    Regards

    Ziteng Chen

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

    Re: Camera View Finder is not display on device screen

    Quote Originally Posted by chenziteng View Post
    Hi,

    Did you try the camera examples provided by Forum Nokia? It is always good to start from a working example instead of coding from scratch.

    "S60 Platform: Camera Example"
    http://www.forum.nokia.com/info/sw.n...a_Example.html

    Regards

    Ziteng Chen
    i tried to install the example on my phone. the phone shows the installation is complete. but, i couldnt find the location of the installed example. i try to search but there's no result. can you suggest a way to do it? (phone type, N96, usually application is install in aps folder) moreover, is there any documentation written on the example, as i want to understand everything the code in the example does.

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

    Re: Camera View Finder is not display on device screen

    Quote Originally Posted by fecxelmin View Post
    i tried to install the example on my phone. the phone shows the installation is complete. but, i couldnt find the location of the installed example. i try to search but there's no result. can you suggest a way to do it? (phone type, N96, usually application is install in aps folder) moreover, is there any documentation written on the example, as i want to understand everything the code in the example does.
    the problem that i encounter (as quoted) occured when i installed .sisx file that comes together with CameraExample example. Now i created my own .sisx file using carbide c++. i get 3 errors and they are:

    Error : Cannot find file : Epoc32\release\gcce\urel\CameraExample_0xEF24C10A.exe
    file I/O fault.
    makesis.exe returned with exit value = 1

    The CameraExample_S60.pkg is marked with white x with red circle at project explorer. the point of error is marked at:
    ;Files to install
    "Epoc32\release\gcce\urel\CameraExample_0xEF24C10A.exe" -"!:\sys\bin\CameraExample_0xEF24C10A.exe"

    Can someone tell me how to solve this prob?

  5. #5
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: Camera View Finder is not display on device screen

    I suppose you did not succeed on building the CameraExample_0xEF24C10A.exe for GCCE Urel, so check the target you are building and try again. Also you might want to use complete path for the Epoc32 folder, it might also help.

Similar Threads

  1. How to display a simple label with text on Screen?
    By neeraja.nokia in forum Symbian
    Replies: 7
    Last Post: 2009-06-18, 13:51
  2. Replies: 0
    Last Post: 2009-04-27, 14:03
  3. Live Video Display and Camera Server Timeouts
    By simonplatt in forum Symbian
    Replies: 2
    Last Post: 2007-08-16, 12:09
  4. Replies: 2
    Last Post: 2004-08-04, 09:48

Posting Permissions

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