pili-engineering / PLDroidMediaStreaming

PLDroidMediaStreaming 是七牛推出的一款适用于 Android 平台的推流 SDK,支持 RTMP 推流,h.264 和 AAC 编码,硬编、软编支持。具有丰富的数据和状态回调,方便用户根据自己的业务定制化开发。具有直播场景下的重要功能,如:美颜、背景音乐、水印等功能。PLDroidMediaStreaming 是现在目前重点维护的版本,自带采集模块也支持用户自己做采集端。
https://github.com/pili-engineering/PLDroidMediaStreaming/wiki
Apache License 2.0
1.45k stars 459 forks source link

短促切换摄像头会出现ANR #303

Closed crayfishxu closed 5 years ago

crayfishxu commented 5 years ago
DALVIK THREADS (42):
"main" prio=5 tid=1 Blocked
  | group="main" sCount=1 dsCount=0 obj=0x75246fa8 self=0x5579f46330
  | sysTid=17168 nice=0 cgrp=default sched=0/0 handle=0x7f8418fe80
  | state=S schedstat=( 3220313381 1191878544 5782 ) utm=272 stm=50 core=1 HZ=100
  | stack=0x7fd3631000-0x7fd3633000 stackSize=8MB
  | held mutexes=
  kernel: __switch_to+0x70/0x7c
  kernel: futex_wait_queue_me+0xd4/0x12c
  kernel: futex_wait+0xdc/0x1e4
  kernel: do_futex+0xc8/0x8d0
  kernel: SyS_futex+0xf8/0x174
  kernel: cpu_switch_to+0x48/0x5a0
  native: #00 pc 000137c4  /system/lib64/libc.so (syscall+28)
  native: #01 pc 000d17c8  /system/lib64/libart.so (_ZN3art17ConditionVariable4WaitEPNS_6ThreadE+140)
  native: #02 pc 002b7e00  /system/lib64/libart.so (_ZN3art7Monitor4LockEPNS_6ThreadE+400)
  native: #03 pc 002ba770  /system/lib64/libart.so (_ZN3art7Monitor4WaitEPNS_6ThreadElibNS_11ThreadStateE+1664)
  native: #04 pc 002bb3b8  /system/lib64/libart.so (_ZN3art7Monitor4WaitEPNS_6ThreadEPNS_6mirror6ObjectElibNS_11ThreadStateE+244)
  native: #05 pc 00000658  /system/framework/arm64/boot.oat (Java_java_lang_Object_wait__+140)
  at java.lang.Object.wait!(Native method)
  - waiting to lock <0x13f70660> (a android.opengl.GLSurfaceView$GLThreadManager) held by thread 32
  at android.opengl.GLSurfaceView$GLThread.onPause(GLSurfaceView.java:1647)
  - locked <0x13f70660> (a android.opengl.GLSurfaceView$GLThreadManager)
  at android.opengl.GLSurfaceView.onPause(GLSurfaceView.java:550)
  at com.qiniu.pili.droid.streaming.a.c.a(CameraManager.java:504)
  at com.qiniu.pili.droid.streaming.MediaStreamingManager.switchCamera(MediaStreamingManager.java:921)
  at com.qiniu.pili.droid.streaming.demo.activity.AVStreamingActivity$Switcher.run(AVStreamingActivity.java:301)
  at android.os.Handler.handleCallback(Handler.java:739)
  at android.os.Handler.dispatchMessage(Handler.java:95)
  at android.os.Looper.loop(Looper.java:135)
  at android.app.ActivityThread.main(ActivityThread.java:5418)
  at java.lang.reflect.Method.invoke!(Native method)
  at java.lang.reflect.Method.invoke(Method.java:372)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1037)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)