相机错误 100
我正在 Samsung Galaxy Ace 上测试我的应用程序,我得到了支持的尺寸,
cameraParams.getSupportedPictureSizes();
它适用于除 (320 x 240) 之外的所有尺寸 - 预览变黑,我收到此错误:相机错误 100
I'm testing my application on Samsung Galaxy Ace, and I get the supported sizes with
cameraParams.getSupportedPictureSizes();
It works with all of them except of (320 x 240) - the preview turns black and I get this error: Camera Error 100
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
相机错误 100 - “媒体服务器死亡。在这种情况下,应用程序必须释放相机对象并实例化一个新对象。”
按照 SDK 的说明进行操作,释放相机对象并创建一个新对象。
http://developer.android.com/reference/android/hardware/Camera。 html
也请阅读此内容。它可能对您有帮助:Droid 的媒体服务器在camera.takePicture() 上挂掉
Camera Error 100 - "Media server died. In this case, the application must release the Camera object and instantiate a new one."
Do what the SDK says and release the camera object and make a new one.
http://developer.android.com/reference/android/hardware/Camera.html
Read this, too. It might help you: Droid's mediaserver dies on camera.takePicture()
我在三星 Galaxy s3 上遇到错误 100。我的问题是相机尺寸。我遵循Android开发人员相机指南并在prepareVideoRecorder();中设置视频大小(setVideoSize (widht,height));
但我设置了错误的尺寸,导致相机冻结、崩溃并出现错误 100 和“相机服务器死亡”。
解决方案是:
添加接下来的两行
在块中
(在surfaceChange方法中):然后在prepareVideoRecorder()中将此参数设置为相机:
I had error 100 on samsung galaxy s3. The problem in my case was in camera dimensions. I followed android developers camera guide and was setting video size (setVideoSize (widht,height)) in prepareVideoRecorder();
But I was setting wrong dimension what caused camera freeze,crash with error 100 and "camera server died".
The solution is:
adding next two lines
in block (in surfaceChange method):
and then in prepareVideoRecorder() setting this parameters to camera:
我通过删除使用或设置相机参数解决了这个问题:
setAutoWhiteBalanceLock(false);
I solved the issue by removing usage or setting the of the Camera parameter:
setAutoWhiteBalanceLock(false);
当我使用带有 gLSurfaceView 的相机进行预览时出现错误。
我通过注释修复了该错误
I get the error when i use camera with gLSurfaceView for preview.
I fixed the bug by Comment out
在这种情况下,删除预览格式可能会有所帮助。我将预览格式设置为
删除上面的行解决了我的问题。
Removing the preview format might help in this case. I was setting the preview format as
Removing above line solved the problem for me.