pushExternalVideoFrame推送闪退

具体报错内容如下,请问是什么原因呢?

(_ZN7android6Thread11_threadLoopEPv+140)
2020-07-17 09:32:13.664 29014-29128/? A/art: art/runtime/runtime.cc:422] native: #07 pc 0006706b /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+82)
2020-07-17 09:32:13.664 29014-29128/? A/art: art/runtime/runtime.cc:422] native: #08 pc 00047a03 /system/lib/libc.so (_ZL15__pthread_startPv+22)
2020-07-17 09:32:13.664 29014-29128/? A/art: art/runtime/runtime.cc:422]
2020-07-17 09:32:13.665 29014-29128/? A/art: art/runtime/runtime.cc:422] | sysTid=29165 nice=-20 cgrp=default sched=0/0 handle=0x964cc920
2020-07-17 09:32:13.665 29014-29128/? A/art: art/runtime/runtime.cc:422] | state=S schedstat=( 4341092 4005625 58 ) utm=0 stm=0 core=2 HZ=100
2020-07-17 09:32:13.665 29014-29128/? A/art: art/runtime/runtime.cc:422] | stack=0x963d0000-0x963d2000 stackSize=1014KB
2020-07-17 09:32:13.666 29014-29128/? A/art: art/runtime/runtime.cc:427] native: #05 pc 000ca1f5 /system/lib/libart.so (_ZN3art11ScopedCheck10CheckArrayERNS_18ScopedObjectAccessEP7_jarray+124)
2020-07-17 09:32:13.666 29014-29128/? A/art: art/runtime/runtime.cc:427] native: #06 pc 000c985f /system/lib/libart.so (_ZN3art11ScopedCheck22CheckPossibleHeapValueERNS_18ScopedObjectAccessEcNS_12JniValueTypeE+74)

--------- beginning of crash

2020-07-17 09:32:13.666 29014-29128/? A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 29128 (Thread-2)
2020-07-17 09:32:13.701 29014-29128/? A/libc: failed to resend signal during crash: Operation not permitted

实现代码为 前提已经 joinchannel 成功。

AgoraVideoFrame frame = new AgoraVideoFrame();
// frame.textureID = textureId;
frame.format = AgoraVideoFrame.FORMAT_I420;
// frame.transform = transform;
frame.stride = DEFAULT_CAPTURE_HEIGHT;
frame.height = DEFAULT_CAPTURE_WIDTH;
// frame.eglContext14 = mEglCore.getEGLContext();
frame.timeStamp = System.currentTimeMillis();
// frame.buf = bytesBitmap;
boolean pushResult = mRtcEngine.pushExternalVideoFrame(frame);

你有配合setExternalVideoSource使用吗?
https://docs.agora.io/cn/Video/API%20Reference/oc/Classes/AgoraRtcEngineKit.html#//api/name/setExternalVideoSource:useTexture:pushMode:
要是使用了的话,那提供一下sdk日志,sdk日志获取方法为:
https://docs.agora.io/cn/faqs/logfile

agora-rtc.zip (30.5 KB)

您好这个是 相关日志。具体是不是这一段出现的问题 。
INFO (10:12:34: 98 | 0) 7377; join channel success: cname ‘testminicap’ uid 3064226266 elapsed 75928
INFO (10:12:34: 99 | 1) 7377; CacheManager: save cache to storage elapsed 2
INFO (10:12:34:100 | 1) 7377; [cap] Received capability set ack seq: 1
INFO (10:12:34:103 | 3) 7377; [stun10] login strategy=2
INFO (10:12:34:103 | 0) 7377; [stun10] localip is 192.168.0.85, address: 0.0.0.0:37099, port: 37099, combined: 192.168.0.85:37099, ip: 1426106560, port: 60304
INFO (10:12:34:103 | 0) 7377; [stun11] login strategy=2
INFO (10:12:34:103 | 0) 7377; [stun11] localip is 192.168.0.85, address: 0.0.0.0:37099, port: 37099, combined: 192.168.0.85:37099, ip: 1426106560, port: 60304
ERROR (10:12:34:103 | 0) 7377; [stun10] join stun timedout: 115.239.228.105:7000
INFO (10:12:34:103 | 0) 7377; [stun10] login strategy=2
INFO (10:12:34:103 | 0) 7377; [stun10] localip is 192.168.0.85, address: 0.0.0.0:37099, port: 37099, combined: 192.168.0.85:37099, ip: 1426106560, port: 60304
ERROR (10:12:34:103 | 0) 7377; [stun11] join stun timedout: 119.84.82.45:7000
INFO (10:12:34:103 | 0) 7377; [stun11] login strategy=2
INFO (10:12:34:103 | 0) 7377; [stun11] localip is 192.168.0.85, address: 0.0.0.0:37099, port: 37099, combined: 192.168.0.85:37099, ip: 1426106560, port: 60304
INFO (10:12:34:106 | 3) 7377; [vocs/u] responsed from 3.0.163.78:8000, 3 vos, elapsed 75937, server ts 1595297535992, wan ip 219.****.112
INFO (10:12:34:122 | 16) 7377; [ch0] onConnectionReset reason: 1, new address: 219.134.218.112:50822
INFO (10:12:34:122 | 0) 7377; [cm] connection state changed from 3 to 4
INFO (10:12:34:123 | 1) 7377; [vos] [rejected] failed to join vos
ERROR (10:12:34:123 | 0) 7377; [vos] No available vos can be selected. 0 in list
INFO (10:12:34:123 | 0) 7377; [vos] failed to join vos
WARN (10:12:34:123 | 0) 7377; [vos] reportFailure: cannot find in inuse list:
INFO (10:12:34:123 | 0) 7377; updateActiveVosList:
ERROR (10:12:34:123 | 0) 7377; [vos] No available vos can be selected. 0 in list
INFO (10:12:34:123 | 0) 7377; [vocs] selected: 116.62.134.61:8000
INFO (10:12:34:124 | 1) 7377; tcp_client connecting 116.62.134.61:8000
INFO (10:12:34:124 | 0) 7377; [vocs] report bitrate: a/v/t: 50/1131/1181
INFO (10:12:34:124 | 0) 7377; [vocs] creating channel with 116.62.134.61:8000, ts 1595297554124…
INFO (10:12:34:124 | 0) 7377; [vocs] selected: 47.95.116.69:1080
INFO (10:12:34:124 | 0) 7377; [vocs] report bitrate: a/v/t: 50/1131/1181
INFO (10:12:34:124 | 0) 7377; [vocs] creating channel with 47.95.116.69:1080, ts 1595297554124…
INFO (10:12:34:125 | 1) 7377; [vocs]

出现了如下报错 :
INFO (10:12:34:123 | 1) 7377; [vos] [rejected] failed to join vos
ERROR (10:12:34:123 | 0) 7377; [vos] No available vos can be selected. 0 in list

检查一下 setLocalRenderModesetupLocalVideo 的参数配置。从日志来看参数设置有问题。

这个应该是网络出口变化,导致断开连接。

我是自定义视频源,localRenderMode和localVideo也需要设定?

setExternalVideoSource 我用的是这个。

应该是这里的问题:


摄像头没有正常打开
可能是你的处理时序有问题:

尽量往摄像头这方面考虑来解决问题

这个 已经有处理 ,enableVideo放在了 setExternalVideoSource之前。

不是啊,是setExternalVideoSource在enableVideo之前

setExternalVideoSource在enableVideo之前 是这样没错,初步判定是 手机设配的问题。