myrao / ScreenRecorder

A demo of Android screen recorder, no root but SDK version should more than Android 5.0 API 21.
497 stars 174 forks source link

大佬 我启动之后开启录屏 提示 E/AndroidRuntime: FATAL EXCEPTION: AudioSenderThread 能告诉我怎么解决吗谢谢 #32

Open liukaibaby opened 4 years ago

liukaibaby commented 4 years ago

E/ACodec: [OMX.qcom.video.encoder.avc] storeMetaDataInBuffers (output) failed w/ err -1010 W/ACodec: do not know color format 0x7fa30c04 = 2141391876 W/ACodec: do not know color format 0x7f000789 = 2130708361 W/ACodec: do not know color format 0x7f000789 = 2130708361 W/IInputConnectionWrapper: reportFullscreenMode on inexistent InputConnection W/IInputConnectionWrapper: finishComposingText on inactive InputConnection W/System.err: java.lang.IllegalStateException: Deque

E/AndroidRuntime: FATAL EXCEPTION: AudioSenderThread Process: net.yrom.screenrecorder, PID: 22898 java.lang.IllegalStateException: Deque full at java.util.concurrent.LinkedBlockingDeque.addLast(LinkedBlockingDeque.java:306) at java.util.concurrent.LinkedBlockingDeque.add(LinkedBlockingDeque.java:604) at net.yrom.screenrecorder.task.RtmpStreamingSender.sendFood(RtmpStreamingSender.java:139) at net.yrom.screenrecorder.ui.activity.ScreenRecordActivity$2.collect(ScreenRecordActivity.java:112) at net.yrom.screenrecorder.task.AudioSenderThread.sendRealData(AudioSenderThread.java:112) at net.yrom.screenrecorder.task.AudioSenderThread.run(AudioSenderThread.java:70) W/System.err: at java.util.concurrent.LinkedBlockingDeque.addLast(LinkedBlockingDeque.java:306) W/System.err: at java.util.concurrent.LinkedBlockingDeque.add(LinkedBlockingDeque.java:604) at net.yrom.screenrecorder.task.RtmpStreamingSender.sendFood(RtmpStreamingSender.java:139) W/System.err: at net.yrom.screenrecorder.ui.activity.ScreenRecordActivity$2.collect(ScreenRecordActivity.java:112) at net.yrom.screenrecorder.task.ScreenRecorder.sendRealData(ScreenRecorder.java:221) W/System.err: at net.yrom.screenrecorder.task.ScreenRecorder.recordVirtualDisplay(ScreenRecorder.java:147) W/System.err: at net.yrom.screenrecorder.task.ScreenRecorder.run(ScreenRecorder.java:95)

myrao commented 4 years ago

Deque full,这里的 LinkedBlockingDeque 队列设置大小比较小,demo 中设置的 queue 大小仅作为参考,你需要自定义和维护自己的 queue

FrankLove commented 4 years ago

@eterrao 博主,请问librtmp的RTMP_SendPacket()函数你是有修改过吗?在网络差的情况下这个发送会不会阻塞?

myrao commented 4 years ago

@eterrao 博主,请问librtmp的RTMP_SendPacket()函数你是有修改过吗?在网络差的情况下这个发送会不会阻塞?

好像没有改动过,不太确定阻塞问题 :)