我需要模拟诺基亚默认相机midlet的行为。
适用于诺基亚C6,我在J2ME中编写它。
我使用MMAPI,问题是VideoControl项目的大小,我把它videoControl.setDisplayFulscreen(true);
但它根本不是全屏,方法setDisplaySize没有帮助,videoControl本身的大小大约是三分之一显示器(所需displaySize的其余部分只是黑色),这是一个代码示例:
public CameraCanvas (Evidence_elektromeru midlet, ManagePhotos caller,String name) {
super(true);
this.midlet = midlet;
this.caller = caller;
this.name = name;
this.setFullScreenMode(true);
try {
player = Manager.createPlayer("capture://devcam0");
player.realize();
// player.prefetch();
if (videoControl2 != null)
videoControl2.setVisible(false);
videoControl1 = (VideoControl) player.getControl("VideoControl");
videoControl1.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,this);
videoControl1.setDisplayLocation(0, 0);
videoControl1.setDisplaySize(360,500);
}catch (MediaException me2) {
try {
videoControl1.setDisplayFullScreen(true);
} catch (Exception e) {}
}
catch (Exception e) {}
finally {
try {
player.start();
} catch (Exception e) {}
videoControl1.setVisible(true);
}
答案 0 :(得分:0)
尝试使用
mCamera = Manager.createPlayer("capture://video");
mCamera.realize();
mCamera.prefetch();
或者您可以替换Camera = Manager.create Player(“capture:// video”);由
mCamera = Manager.createPlayer("capture://image");