×

Discussion Board

Results 1 to 1 of 1
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    7

    Question (SOS)The problem of S60 3rd fp2midp2.1Jsr135 about Camera

    The problem is happending when I take photo in N78,N85,N96,5800.
    the code is here:
    <1>my Camera initialize
    try
    {
    if (ClientSetManager.Platform != ClientSetManager.S40)
    {
    mPlayer = Manager.createPlayer("capture://video");
    } else
    {
    mPlayer = Manager.createPlayer("capture://image");
    }
    mPlayer.realize();
    mVideoControl = (VideoControl) mPlayer.getControl("VideoControl");

    } catch (Exception ex)
    {
    }
    if (mVideoControl == null)
    {
    }
    try
    {
    mVideoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, getCanvas());
    mVideoControl.setDisplayLocation(0, containery + 10);
    mVideoControl.setDisplayFullScreen(true);
    mPlayer.start();
    mVideoControl.setVisible(true);
    } catch (MediaException e)
    {
    }
    <2>Take photo
    byte[] raw = null;
    try
    {
    // raw = mVideoControl.getSnapshot("encoding=jpeg");
    raw = mVideoControl.getSnapshot(ClientSetManager.ImgSize);
    } catch (MediaException ex)
    {
    Alert alert = new Alert("Alerm");
    alert.setString("");
    Display.getDisplay(midlet).setCurrent(alert);
    return;
    } catch (SecurityException ex)
    {
    Alert alert = new Alert("Alerm");
    alert.setString("");
    Display.getDisplay(midlet).setCurrent(alert);
    return;
    }


    My code is above,and when I take photo in N78,N85,N96,5800(s60 3rd fp2 or high),it can not work immediately,and all of other operation fail in answer.But when I'm back to nokia menu serface,unexpectedly it takes photo and have a sound.
    So I think the problem is from native Thread,but I do not sure.

    My code work well in S40 and S60 3rd fp1(midp 2.0).

    Here is document from Nokia:
    Threading does not act the same on different platforms unlike most of other Java aspects. Two main areas of difference are thread scheduling and thread priorities.

    In S60 3rd Edition FP 2 onwards, Java threading model has been changed to use native threading. This means that each Java thread maps to the native thread. Previously all Java threads ran in single native thread (green threads). Threading change is transparent for MIDlets and does not cause any issues for correctly implemented MIDlets.


    Anyone have idea?Please help me ,my English is poor
    Last edited by liplke1224; 2009-02-24 at 03:25.

Similar Threads

  1. S60 3rd ed. NO FP Camera Problem on device
    By coolblues5000 in forum Symbian
    Replies: 6
    Last Post: 2008-11-17, 12:54
  2. Nokia N-Series Complete Model Line-Up
    By Dopod in forum General Development Questions
    Replies: 6
    Last Post: 2008-07-22, 20:16
  3. S60 3rd Edition Emulator CCamera camera class problem
    By william_j in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2006-11-01, 14:15
  4. What is going on with Vibration on S60?
    By amd_rikus in forum Mobile Java General
    Replies: 3
    Last Post: 2006-06-16, 00:29
  5. Replies: 0
    Last Post: 2006-05-22, 15:09

Posting Permissions

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