Hello out there,
I am developing a camera handling in JavaME. Now a got a 'funny' effect I do nevertheless do not want. On the device C7-00 the camera view is rotated 90 Degrees. On N97 Mini the camera view is shown correctly. In both cases the snapshot taken is in the correct orientation. I use the same Jar for both devices.
I am using portraitmodus only (Flag Nokia-MIDlet-App-Orientation is set to portrait). Removing this Flag solves the problem with the camera orientation, but I want to keep it, as the camera is only part of a bigger application which runs into graphical problems on rotations without it. So I could remove it and fix the graphical problems in the rest of the application wihch will cost quiet a lot of time. Any better solutions?
Here the code to initialize the VideoControl.
private void initMyPlayer() throws IOException, MediaException, SecurityException, Exception
mPlayer = null;
mPlayer = Manager.createPlayer("capture://video");
// Grab the videocontrol and set it to the current display
mVideoControl = null;
mVideoControl = (VideoControl) (mPlayer.getControl("VideoControl"));
if (mVideoControl == null)
throw new Exception("Couldn't create VideoControl");
mVideoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO , MyMIDlet.mCanvas);
mVideoHeight = mVideoControl.getSourceHeight();
mVideoWidth = mVideoControl.getSourceWidth();