onConsumeFrame不触发造成的错误
Ymmmsick opened this issue · 2 comments
从另外一个项目移植过来的代码,更换了第三方除了初始化的地方不一样其他都一样,但是在onInitialize->onStart->connectChannel之后没有触发OnConsumeFrame方法,导致另外一端无法看到视频图像,并且在退出频道之后报错如下:
2020-11-10 19:19:58.174 9390-9704/com.mxehvn A/com.mxehvn: java_vm_ext.cc:577] JNI DETECTED ERROR IN APPLICATION: JNI GetMethodID called with pending exception java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.os.Handler.post(java.lang.Runnable)' on a null object reference
java_vm_ext.cc:577] at void io.agora.capture.framework.modules.channels.VideoChannel.connectConsumer(io.agora.capture.framework.modules.consumers.IVideoConsumer, int) (VideoChannel.java:212)
java_vm_ext.cc:577] at io.agora.capture.framework.modules.channels.VideoChannel io.agora.capture.framework.modules.channels.ChannelManager.connectConsumer(io.agora.capture.framework.modules.consumers.IVideoConsumer, int, int) (ChannelManager.java:51)
java_vm_ext.cc:577] at io.agora.capture.framework.modules.channels.VideoChannel io.agora.capture.video.camera.VideoModule.connectConsumer(io.agora.capture.framework.modules.consumers.IVideoConsumer, int, int) (VideoModule.java:52)
java_vm_ext.cc:577] at void com.vchat.tmyl.chatroom.rtc.RtcVideoConsumer.connectChannel(int) (RtcVideoConsumer.java:63)
java_vm_ext.cc:577] at boolean com.vchat.tmyl.chatroom.rtc.RtcVideoConsumer.onStart() (RtcVideoConsumer.java:112)
java_vm_ext.cc:577]
java_vm_ext.cc:577] in call to GetMethodID
OnConsumeFrame没有触发代表前序步骤存在问题,
可以尝试调试或者在下面方法输出日志:
- PreprocessorFaceUnity.initPreprocessor
- PreprocessorFaceUnity.onPreProcessFrame
看看采集和美颜处理有没有成功完成
感谢解答