Hello
This is my first post to this forum, I had get much valuable information from here.
My problem is that using Camera with Nokia 6700 Slide, Type RM-576, firmware 061.004 (and C5-00), I use Developer Platform S60 3rd Edition, Feature Pack 2. Then I start Player with start - method application crash without error.
I tried to start player in own thread but it didn't work.
Customer said that application worked quite long time, can firmware update cause problems? Is camera landscape orientation problem (must I set it?). I tried to change phone camera options but it didnt solve the problem. There is enough memory both in camera (39Mb) and in memory card (1.5Gb).
Application works then I comment line:
player.start();
but then my Camera canvas is blank (white). Application has worked OK with other Nokia models with their own SDK's. By the way, is there matter which one line is first:
player.start();
or
videoControl.setVisible(true);
I had seen both ways.
--
Code:
import javax.microedition.media.*;
import javax.microedition.media.control.*;
import javax.microedition.amms.control.camera.FlashControl;
...
private Player player = null;
private VideoControl videoControl = null;
...
void initCamera()
{
try
{
player = Manager.createPlayer("capture://video");
player.realize();
// player.prefetch();
// Grab the video control and set it to the current display.
videoControl = (VideoControl)(player.getControl("VideoControl"));
if (videoControl == null)
{
discardPlayer();
Debug.out.println("Unsupported: Can't get video control");
}
else
{
videoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, iRepainter);
int x = 8;
// TITLE_LINE_Y = 21, so y will be 30
int y = TITLE_LINE_Y + 9;
videoControl.setDisplayLocation(x, y);
}
}
catch (IOException ioe)
{
discardPlayer();
Debug.out.println("IOException: "+ioe.getMessage());
}
catch (MediaException me)
{
discardPlayer();
Debug.out.println("MediaException: "+me.getMessage());
}
catch (SecurityException se)
{
discardPlayer();
Debug.out.println("SecurityException: "+se.getMessage());
}
}
...
if ((player != null) && !iActive) {
Debug.out.println("Start");
try
{
// This crash APP (Nokia 6700)!!!!!! - WHY?
player.start();
videoControl.setVisible(true);
// player starting on own thread didnt solve problem
// t.run();
}
catch (MediaException me)
{
Debug.out.println("MediaException: "+me.getMessage());
}
catch (SecurityException se) {
Debug.out.println("SecurityException: "+se.getMessage());
}
}
...
/*
Thread t = new Thread(new Runnable() {
public void run() {
try {
player.start();
} catch (MediaException ex) {
ex.printStackTrace();
}
}
});
*/

Reply With Quote




