2

我做了这个问题的答案中提到的所有步骤(Android Lollipop 上的 MediaRecorder 问题无法使我的应用程序运行。在我尝试使用 VLC 播放流后,它向我抛出“连接到相机时发生错误:0” . 如何解决这个问题? 下面是我的 logcat 的日志。

04-19 18:13:33.986: D/VideoStream(13923): Video encoded using the MediaRecorder API
04-19 18:13:33.990: W/CameraBase(13923): An error occurred while connecting to camera: 0
04-19 18:13:33.991: E/RtspServer(13923): Fail to connect to camera service
04-19 18:13:33.992: W/System.err(13923): net.majorkernelpanic.streaming.exceptions.CameraInUseException: Fail to connect to camera service
04-19 18:13:33.993: W/System.err(13923):    at net.majorkernelpanic.streaming.video.VideoStream.openCamera(VideoStream.java:622)
04-19 18:13:33.993: W/System.err(13923):    at net.majorkernelpanic.streaming.video.VideoStream.createCamera(VideoStream.java:632)
04-19 18:13:33.993: W/System.err(13923):    at net.majorkernelpanic.streaming.video.VideoStream.encodeWithMediaRecorder(VideoStream.java:372)
04-19 18:13:33.993: W/System.err(13923):    at net.majorkernelpanic.streaming.MediaStream.start(MediaStream.java:274)
04-19 18:13:33.993: W/System.err(13923):    at net.majorkernelpanic.streaming.video.VideoStream.start(VideoStream.java:312)
04-19 18:13:33.993: W/System.err(13923):    at net.majorkernelpanic.streaming.video.H263Stream.start(H263Stream.java:68)
04-19 18:13:33.993: W/System.err(13923):    at net.majorkernelpanic.streaming.Session.syncStart(Session.java:451)
04-19 18:13:33.993: W/System.err(13923):    at net.majorkernelpanic.streaming.rtsp.RtspServer$WorkerThread.processRequest(RtspServer.java:506)
04-19 18:13:33.993: W/System.err(13923):    at net.majorkernelpanic.streaming.rtsp.RtspServer$WorkerThread.run(RtspServer.java:390)
04-19 18:13:33.994: D/RtspServer(13923): RTSP/1.0 500 Internal Server Error
04-19 18:13:33.994: D/RtspServer(13923): Server: MajorKernelPanic RTSP Server
04-19 18:13:33.994: D/RtspServer(13923): Cseq: 4
04-19 18:13:33.994: D/RtspServer(13923): Content-Length: 0
04-19 18:13:33.997: I/RtspServer(13923): Client disconnected
4

0 回答 0