×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    19

    Question CameraApp Viewfinder ?

    Hi all,

    I'm new to symbian and I'm wondering if the viewfinder function in CameraApp is working ? The CameraApp comes with a .sis file and after I installed and ran it on my n6600, I saw that the viewfinder is working.
    From the earlier post, I learn that the viewfinder in CameraSnapShot is not working. But it seems that the viewfinder implementation in the CameraApp is not much different from the one in CameraSnapShot.
    Could someone please clarify it ?
    Thank you very much!

    William

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

    Re: CameraApp Viewfinder ?

    these examples are quite different, the main difference is that the cameraapp is usinf CCamera API, which was instroduced in OS 7.0. The Snapshot examaple was made for OS 6.1 phones using camera Server API, and with it the viewfinder had to be implemented by the developer.

    yucca

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    19

    Re: CameraApp Viewfinder ?

    Hi,

    Thank you for your reply. I am quite confused about this CCamera API and camera server API you mentioned.

    In the CameraSnapShot example, it seems that it's using the CCamera API like the one used in CameraApp example.

    In CameraSnapShotAppUi.h , it #include <ECam.h> and defines the class as:
    class CCameraSnapShotAppUi : public CAknAppUi, public MCameraObserver
    {
    ....

    it also defines functions from MCameraObserver:

    virtual void ReserveComplete(TInt aError);
    virtual void PowerOnComplete(Tint aError);
    virtual void ViewFinderFrameReady(CFbsBitmap& aFrame);
    virtual void ImageReady(CFbsBitmap* aBitmap, HBufC8* aData, TInt aError);
    virtual void FrameBufferReady(MFrameBuffer* aFrameBuffer, TInt aError);

    .......
    private:
    CCamera* iCamera;
    ......

    Isn't it the CCamera API used in the CameraApp example ?
    Thank you very much!

    William

  4. #4
    Registered User
    Join Date
    Dec 2005
    Posts
    19

    Viewfinder seems working but problem in displaying image

    I tested the ViewFinderFrameReady() in my AppUi file by inserting a printing command. It seems to be working as it prints the text repeatedly on the screen.

    in my ViewFinderFrameReady() function (in AppUi), I call:
    (STATIC_CAST(CBluetoothChatAppView*, iAppView))->DrawImageNow( aFrame );

    in my AppView function, I call functions:
    DrawImageNow() -> Draw() -> DrawImage()
    I also call CreateOffScreenBitmapL() which is called in AppView::ConstructL()

    All these functions are very similar to the ones written in CameraApp container file. However, nothing is shown on the screen. It remains blank.

    I checked in DrawImageNow() function that the bitmap passed is not null.
    But why can't it be shown on the screen ?
    What went wrong?
    Thank you very much!

    William

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

    Re: CameraApp Viewfinder ?

    Uups, I mixed up the examples, and thought that you were talking about one older camera example.

    yucca

  6. #6
    Registered User
    Join Date
    Dec 2005
    Posts
    19

    Problem in displaying the viewfinder image

    Thank you very much for your reply Yucca. About this viewfinder in CameraSnapShot example, I can't seem to be able to display it on the screen. Is the DrawImage() function in CameraSnapShot bugged ? Do you know any functions that I can use to display the viewfinder ?
    Thank you very much!

    William

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

    Re: CameraApp Viewfinder ?

    I seems to not have CameraSnapShot example with me today, anyway, in case you want to use camera with viewfinder, then the CameraApp would propably be the easiest one to get working. All you need to do is to remove the audio handling (or change the audio file name) and it should work very well.

    yucca

  8. #8
    Registered User
    Join Date
    Dec 2005
    Posts
    19

    Re: CameraApp Viewfinder ?

    Thank you for your reply Yucca. I have finally managed to get both camera examples; CameraApp and CameraSnapShot working.
    Now I'm trying to add a viewfinder option in the BluetoothChat example.
    I added a new file BluetoothChatAppView which is exactly the same as CameraSnapShotAppView file to display the viewfinder images.
    I did reserve and power on the camera before I start the viewfinder option.
    I also added the BluetoothChatAppView into the resources in the .mmp file.
    However, it did not display anything on the screen. I pass the bitmap address containing the viewfinder image the same way as that in CameraSnapShot example.
    What could have gone wrong ? Is there a small detail I might have missed ?
    I really need your advice.
    Thank you very much!

  9. #9
    Registered User
    Join Date
    Dec 2005
    Posts
    19

    Re: CameraApp Viewfinder ?

    hi,
    I finally get it to work. In my AppUi::ConstructL(), I called iAppView after iAppDialog. After I switch the order, it works.

Similar Threads

  1. Cannot get CameraApp to work
    By ryanrst in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2006-03-08, 09:25
  2. Viewfinder in CameraApp ?
    By wilzki in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-12-22, 19:19
  3. Problems with CameraApp application
    By andreas84 in forum Symbian
    Replies: 2
    Last Post: 2005-05-24, 05:00
  4. can`t compile the cameraapp example
    By manu.20 in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2005-04-17, 18:44
  5. Getting CameraApp to work
    By neomedia in forum Symbian
    Replies: 0
    Last Post: 2005-02-04, 19:50

Posting Permissions

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