手机拍照的奇怪的问题, 照着书写都不通过?
前边申明就不说了.
try {
p = Manager.createPlayer("capture://video");
p.realize();
vc = (VideoControl)p.getControl("VideoControl");
vc.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, this);
vc.setVisible(true);
p.play();
byte[] data = vc.getSnapShot(null);// 问题就在这里
/*
上边的参数理论上应该是能用 encoding=jpeg&width=额定宽度&height=额定高度 这样指定的吧
按照索爱技术手册上的说明用最基本的160*120的, 也取不下图, 就是参数错误 encoding=jpeg&width=120&height=160
有人像类似的这种代码用参数调试成功并在实机上运行通过的吗???
*/
}catch(MediaException e){}