我做了这个问题的答案中提到的所有步骤 (MediaRecorder issue on Android Lollipop无法使我的应用程序运行。在我尝试使用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