×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    442

    Unhappy How set high priority in camera example?

    Hi

    I download camera example from this site, when I test this application in E71 device It works, but when I start inbuilt camera application this example application do not work.

    I want that set high priority for this example application that means when start our application( get reserved) at that time inbuilt camera application do not work, if I close that example application than inbuilt camera application able to work.

    I tried in following way but get -1 error (-1 = Unable to find the specified object).

    NewL in system header file: IMPORT_C static CCameraEngine* NewL( TInt aCameraHandle,
    TInt aPriority,
    MCameraEngineObserver* aObserver );

    view.cpp
    ---------------
    TRAP(camErr, iCameraWrapper = CCameraEngine::NewL(0,63,this));

    I set high priority = 63 but getting -1 error if I set 0 or 1 priority than do work, So Hoiw can set high priority compare to inbuilt camera application.

    Regards,
    SymbianTH

  2. #2
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    442

    Re: How set high priority in camera example?

    Hi

    Please anybody help me, give me some solution.

    I tried to set 61 priority but using this get same result, both application (my EXAMPLE and INBUILT application) able to use camera.

    Please help me hoe I can block inbuilt camera from my application?

    Regards,
    SymbianTH

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,738

    Re: How set high priority in camera example?

    Priority is probably not enough, you may need MultimediaDD capability too.

  4. #4
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    442

    Re: How set high priority in camera example?

    Thank You wizard_hu_

    I include MultimediaDD capability and set 63 priority, using this getting -1 error.

    My code
    Code:
    void CCameraWrapperExampleAppView::SizeChanged()
        {
        // Create camera wrapper class here because
        // whole camera wrapper and all handles have to reset
        // while orientatio of the application changes.
        if (iCameraWrapper)
            {
            // Power off camera if it is on
            iCameraWrapper->StopViewFinder();
            iCameraWrapper->ReleaseAndPowerOff();
            delete iCameraWrapper; iCameraWrapper = NULL;
            }
        TInt camErr(KErrNotSupported);
        if(CCameraEngine::CamerasAvailable() > 0)
          {
    		//TRAP(camErr, iCameraWrapper = CCameraEngine::NewL(0,0,this));
    		TRAP(camErr, iCameraWrapper = CCameraEngine::NewL(1,63,this));
          }
    
        // iViewFinderSize is picture size for viewfinder.
        // iCaptureSize is picture size for capturing picture.
        // We want fill whole screen
        if (Rect().Size().iWidth > Rect().Size().iHeight)
            {
            iViewFinderSize = TSize(Rect().Size().iWidth,Rect().Size().iWidth);
            iCaptureSize = TSize(1280,960); // Captured picture size
            }
        else
            {
            iViewFinderSize = TSize(Rect().Size().iHeight,Rect().Size().iHeight);
            iCaptureSize = TSize(1280,960); // Captured picture size
            }
    
        // Focus rectangle
        iFocusRect = Rect();
        iFocusRect.Shrink(Rect().Size().iWidth/4, Rect().Size().iHeight/4);
        
        // Create back buffer where recieved camera pictures are copied
        ReleaseBackBuffer();
        CreateBackBufferL();
        
        // Power on camera, start viewfinder when MceoCameraReady() received
        if(camErr == KErrNone)
          {
          iCameraWrapper->ReserveAndPowerOn();    
          SetTitle(_L("Camera power on"));
          }
        else
          {
          SetTitle(_L("no camera found"));
          }
        }
    Regards,
    SymbianTH

  5. #5
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    442

    Re: How set high priority in camera example?

    Quote Originally Posted by wizard_hu_ View Post
    Priority is probably not enough, you may need MultimediaDD capability too.
    Hi wizard_hu_

    Please help me, have you any idea where I am going on wrong??

    Thanks
    SymbianTH

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,738

    Re: How set high priority in camera example?

    Actually I do not know, never wanted to interfere with the built-in camera.
    A thing you can check if you get different result codes if you want to get the same or the other camera than the one currently used by the Camera application.

  7. #7
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    442

    Re: How set high priority in camera example?

    Hi

    Before post this problem over here I searched on Google and on this site also, related to set higher protity to application's camera, but do not get solution.

    After one I post over here for get some positive solution. I think it's not possible.

    You have any idea now which thing or logic help me to solve this problem?

    I am trying to find solution if I am getting solution than I post solution over here also.

    Thanks,
    SymbianTH

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

    Re: How set high priority in camera example?

    You can look around in the open source Symbian code, at least you would see what priority that one uses.

  9. #9
    Registered User
    Join Date
    May 2008
    Location
    Surat Thani
    Posts
    260

    Re: How set high priority in camera example?

    Quote Originally Posted by SymbianTH View Post
    Hi

    I download camera example from this site, when I test this application in E71 device It works, but when I start inbuilt camera application this example application do not work.

    I want that set high priority for this example application that means when start our application( get reserved) at that time inbuilt camera application do not work, if I close that example application than inbuilt camera application able to work.
    Hi,

    CCameraEngine internally uses CCamera, which only supports setting the priority if using MCameraObserver2 for callbacks. E71 is a 3rd edition FP1 device and and FP1 devices don't support observer2, so probably the priority value given to CCameraEngine doesn't affect anything. And as for MultimediaDD capability, it's very likely that built-in camera has that as well, so the capability wouldn't give you the extra edge.

    Do you need to actually use the camera or just prevent the built-in camera app from working? How about simply sending EEikCmdExit to camera app's process if it's started?

    -TongMuan

Similar Threads

  1. Setting High priority to Message editor
    By nair.shanker in forum Symbian
    Replies: 5
    Last Post: 2009-07-26, 11:25
  2. How can i set priority high of process
    By aamitgupta in forum Symbian
    Replies: 3
    Last Post: 2007-10-24, 14:53
  3. Answer incoming call when high-priority application is active
    By Dmitry_Tarasov in forum Symbian User Interface
    Replies: 2
    Last Post: 2007-01-14, 10:12
  4. High priority Help needed.
    By vickyguy in forum Browsing and Mark-ups
    Replies: 4
    Last Post: 2006-03-14, 19:33
  5. How to create a high priority dialog?
    By ivuorio in forum Symbian
    Replies: 1
    Last Post: 2002-10-09, 10:07

Posting Permissions

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