使用实时视频流时,Android MediaPlayer和VideoView ANR(应用程序无响应)

时间:2017-10-10 14:59:29

标签: android android-mediaplayer

过去几天使用实时视频流时,Android的VideoView和MediaPlayer一直面临着问题。所有其他非现场网络视频已经完美地工作多年了。

由于很多用户使用的是API版本14和15,因此无法移至Exoplayer.ANR始终出现在本机_reset方法中。以下是跟踪文件的片段。

在处理实时流时是否有不同的方法来重置mediaPlayer?

"main" prio=5 tid=1 Native | group="main" sCount=1 dsCount=0 obj=0x7604f2b8 self=0x7f876c7a00 | sysTid=10072 nice=-10 cgrp=default sched=0/0 handle=0x7f8c248a98 | state=S schedstat=( 4827792381 564524901 5877 ) utm=400 stm=82 core=4 HZ=100 | stack=0x7fc7a10000-0x7fc7a12000 stackSize=8MB | held mutexes= kernel: __switch_to+0x98/0xac kernel: 0xd565f18494f88f2d kernel: 0xd565f18494f8732d kernel: 0xd565f18495324be1 kernel: 0xd565f184953203c9 kernel: 0xd565f18495320791 kernel: 0xd565f18495df17fd kernel: 0xd565f18495df1939 kernel: 0xd565f18495f3fa41 native: #00 pc 00000000000797d8 /system/lib64/libc.so (__ioctl+4) native: #01 pc 0000000000020a0c /system/lib64/libc.so (ioctl+140) native: #02 pc 0000000000055e40 /system/lib64/libbinder.so (_ZN7android14IPCThreadState14talkWithDriverEb+256) native: #03 pc 0000000000056e04 /system/lib64/libbinder.so (_ZN7android14IPCThreadState15waitForResponseEPNS_6ParcelEPi+708) native: #04 pc 000000000004b6d4 /system/lib64/libbinder.so (_ZN7android8BpBinder8transactEjRKNS_6ParcelEPS1_j+72) native: #05 pc 000000000010aaa4 /system/lib64/libmedia.so (???) native: #06 pc 00000000000fa7a8 /system/lib64/libmedia.so (_ZN7android11MediaPlayer7reset_lEv+64) native: #07 pc 00000000000fa87c /system/lib64/libmedia.so (_ZN7android11MediaPlayer5resetEv+64) native: #08 pc 0000000000049fcc /system/lib64/libmedia_jni.so (???) native: #09 pc 000000000073ea30 /system/framework/arm64/boot-framework.oat (Java_android_media_MediaPlayer__1reset__+124) at android.media.MediaPlayer._reset(Native method) at android.media.MediaPlayer.reset(MediaPlayer.java:2048)

0 个答案:

没有答案