LWUIT 中的相机
我使用此代码在 LWUIT 中进行图像捕获,这在诺基亚 X2 中工作正常,但对于其他手机,它显示以下错误:
javax.microedition.media.mediaexception: unable to realize initialize failed.
请查看代码:
vc = VideoComponent.createVideoPeer("capture://image");
player = (Player) vc.getNativePeer();
// vc.setPreferredH(200);
// vc.setPreferredW(320);
player.realize();
player.prefetch();
videoControl = (VideoControl)player.getControl("VideoControl");
This code is used by me for image capture in LWUIT, this works fine in Nokia X2 but for other mobile it shows the following error:
javax.microedition.media.mediaexception: unable to realize initialize failed.
Kindly look into the code :
vc = VideoComponent.createVideoPeer("capture://image");
player = (Player) vc.getNativePeer();
// vc.setPreferredH(200);
// vc.setPreferredW(320);
player.realize();
player.prefetch();
videoControl = (VideoControl)player.getControl("VideoControl");
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这对您可能有用:
如何使用捕获图像LWUIt VIdeoComponent
在这里您可以找到有关如何使用
VideoComponent
捕获图像的说明I think this could be useful for you:
How to capture images using LWUIt VIdeoComponent
Here you can find an explanation to how can you capture images with a
VideoComponent