lipangit / JiaoZiVideoPlayer

MediaPlayer exoplayer ijkplayer ffmpeg
MIT License
10.47k stars 2.42k forks source link

RecyclerView横竖屏切换闪退,如何获取加载速度 #1333

Closed themass closed 6 years ago

themass commented 6 years ago

1.RecyclerView 点击大屏,再横竖屏切换时,闪退。我参考的是ActivityListViewRecyclerView里的代码,请协助一下, 2.还有我需要加载的速度显示出来,该怎么获取加载的速度。 3.还有划出屏幕时我想要自动暂停视频,该参考哪个?

lipangit commented 6 years ago
  1. image

  2. 好像取得不到加载的显示速度,你可以研究一下android.meida.MeidaPlayer,没有相关的api

  3. 暂时没研究过这个功能,可以参考 tinyWindow,滑动出列表时,进入小窗播放

themass commented 6 years ago

fragment里面有RecyclerView 的布局,在横竖屏切换的时候崩溃, android:configChanges="orientation|screenSize|keyboardHidden" /> activity增加这个没用

lipangit commented 6 years ago

闪退的log是什么

themass commented 6 years ago

没有日志,直接崩溃

themass commented 6 years ago

看样子不是应用层的崩溃,是底层的

lipangit commented 6 years ago

日志肯定有的,你把logcat的filter改成nofilter,然后在所有日志里找exception,或者类似的错误信息

有的日志不一定能在指定包名下看到

themass commented 6 years ago

我等下测试一下

themass commented 6 years ago

1-01 23:03:05.755 1656-22507/? E/IMediaHTTPConnection: remote readAt failed 11-01 23:03:05.755 1656-22507/? E/NuCachedSource2: source returned error -2147483648, 10 retries left 11-01 23:03:05.755 1656-22870/? E/Surface: queueBuffer: error queuing buffer to SurfaceTexture, -32 11-01 23:03:05.755 1656-22870/? E/ACodec: queueBuffer failed in onOutputBufferDrained: -32 11-01 23:03:05.755 1656-22870/? E/ACodec: signalError(omxError 0x80001001, internalError -2147483648) 11-01 23:03:05.755 1656-22869/? E/MediaCodec: Codec reported err 0x80001001, actionCode 0, while in state 6 11-01 23:03:05.756 1656-22870/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa8bf27c0 11-01 23:03:05.756 1656-22870/? E/ACodec: queueBuffer failed in onOutputBufferDrained: -22 11-01 23:03:05.756 1656-22870/? E/ACodec: signalError(omxError 0x80001001, internalError -22) 11-01 23:03:05.759 2001-2468/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=32, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] 11-01 23:03:05.761 2001-2468/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=33, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] 11-01 23:03:05.765 1656-22869/? E/MediaCodec: Codec reported err 0xffffffea, actionCode 0, while in state 0 11-01 23:03:05.765 1656-22868/? E/NuPlayerDecoder: failed to flush OMX.qcom.video.decoder.avc (err=-38) 11-01 23:03:05.765 1656-22389/? E/NuPlayer: received error(0xffffffda) from video decoder, flushing(2), now shutting down 11-01 23:03:05.778 1656-22870/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa8bf2310 11-01 23:03:05.778 1656-22870/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa8bf2590 11-01 23:03:05.780 1656-22870/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa8bf2720 11-01 23:03:05.781 1656-22870/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa8bf27c0 11-01 23:03:05.781 1656-22870/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa8bf2860 11-01 23:03:05.782 1656-22870/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa8bf28b0

themass commented 6 years ago

11-01 23:14:35.378 1656-21789/? E/IMediaHTTPConnection: remote readAt failed 11-01 23:14:35.378 1656-21789/? E/NuCachedSource2: source returned error -2147483648, 10 retries left 11-01 23:14:35.378 1656-22496/? E/Surface: queueBuffer: error queuing buffer to SurfaceTexture, -32 11-01 23:14:35.381 1656-22496/? E/ACodec: queueBuffer failed in onOutputBufferDrained: -32 11-01 23:14:35.381 1656-22496/? E/ACodec: signalError(omxError 0x80001001, internalError -2147483648) 11-01 23:14:35.382 1656-22495/? E/MediaCodec: Codec reported err 0x80001001, actionCode 0, while in state 6 11-01 23:14:35.383 1656-22494/? E/NuPlayerDecoder: failed to flush OMX.qcom.video.decoder.avc (err=-38) 11-01 23:14:35.383 1656-21659/? E/NuPlayer: received error(0xffffffda) from video decoder, flushing(2), now shutting down 11-01 23:14:35.384 1656-22496/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa8bf1be0 11-01 23:14:35.384 1656-22496/? E/ACodec: queueBuffer failed in onOutputBufferDrained: -22 11-01 23:14:35.384 1656-22496/? E/ACodec: signalError(omxError 0x80001001, internalError -22) 11-01 23:14:35.384 1656-22495/? E/MediaCodec: Codec reported err 0xffffffea, actionCode 0, while in state 0 11-01 23:14:35.387 2001-2468/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=36, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] 11-01 23:14:35.391 2001-2468/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=37, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] 11-01 23:14:35.394 1656-22496/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa8bf1be0 11-01 23:14:35.395 1656-22496/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa8bf1a00 11-01 23:14:35.396 1656-22496/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa8bf2180 11-01 23:14:35.396 1656-22496/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa8bf2310 11-01 23:14:35.397 1656-22496/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa8bf2400 11-01 23:14:35.397 1656-22496/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa8bf2450 11-01 23:14:36.761 2830-2830/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /data/user/0/com.sohu.inputmethod.sogou/files/.theme/sogou/res/composing_bg.png (No such file or directory) 11-01 23:14:36.774 2830-2830/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /data/user/0/com.sohu.inputmethod.sogou/files/.theme/sogou/res/composing_bg.png (No such file or directory) 11-01 23:14:36.883 2830-2830/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /data/user/0/com.sohu.inputmethod.sogou/files/.theme/sogou/res/composing_bg.png (No such file or directory) 11-01 23:14:36.891 2830-2830/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /data/user/0/com.sohu.inputmethod.sogou/files/.theme/sogou/res/composing_bg.png (No such file or directory) 11-01 23:14:48.871 23389-23389/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 23389 (netstat)

                                     [ 11-01 23:14:48.871   269:  269 W/         ]
                                     debuggerd: handling request: pid=23389 uid=10242 gid=10242 tid=23389

11-01 23:14:48.983 23395-23395/? A/DEBUG: 11-01 23:14:48.983 23395-23395/? A/DEBUG: Build fingerprint: 'google/shamu/shamu:7.0/NBD91X/3532935:user/release-keys' 11-01 23:14:48.983 23395-23395/? A/DEBUG: Revision: '0' 11-01 23:14:48.983 23395-23395/? A/DEBUG: ABI: 'arm' 11-01 23:14:48.983 23395-23395/? A/DEBUG: pid: 23389, tid: 23389, name: netstat >>> netstat <<< 11-01 23:14:48.984 23395-23395/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 11-01 23:14:48.984 23395-23395/? A/DEBUG: r0 00000000 r1 b0e76191 r2 00000008 r3 00000080 11-01 23:14:48.984 23395-23395/? A/DEBUG: r4 b0e76190 r5 befa9980 r6 b0e72b85 r7 00000000 11-01 23:14:48.984 23395-23395/? A/DEBUG: r8 ffffffff r9 b09985c0 sl 00000000 fp b09ad400 11-01 23:14:48.984 23395-23395/? A/DEBUG: ip 00000073 sp befa9968 lr b0e5b94d pc b0cb401c cpsr 200e0030 11-01 23:14:48.999 23395-23395/? A/DEBUG: backtrace: 11-01 23:14:49.000 23395-23395/? A/DEBUG: #00 pc 0003a01c /system/lib/libc.so (strncmp+5) 11-01 23:14:49.000 23395-23395/? A/DEBUG: #01 pc 00017949 /system/bin/toybox 11-01 23:14:49.000 23395-23395/? A/DEBUG: #02 pc 00007485 /system/bin/toybox 11-01 23:14:49.000 23395-23395/? A/DEBUG: #03 pc 0000751f /system/bin/toybox 11-01 23:14:49.000 23395-23395/? A/DEBUG: #04 pc 000074bb /system/bin/toybox 11-01 23:14:49.001 23395-23395/? A/DEBUG: #05 pc 00016fe1 /system/bin/toybox 11-01 23:14:49.002 23395-23395/? A/DEBUG: #06 pc 0000ade1 /system/bin/toybox 11-01 23:14:49.002 23395-23395/? A/DEBUG: #07 pc 0000a9f5 /system/bin/toybox 11-01 23:14:49.002 23395-23395/? A/DEBUG: #08 pc 0000ae43 /system/bin/toybox 11-01 23:14:49.002 23395-23395/? A/DEBUG: #09 pc 00016c41 /system/lib/libc.so (__libc_init+48) 11-01 23:14:49.002 23395-23395/? A/DEBUG: #10 pc 000068f0 /system/bin/toybox 11-01 23:14:49.524 2847-22059/? E/LockboxBrokerService: Could not query UDC's getDeviceDataUploadOptInStatus; 15 null 11-01 23:14:49.681 2847-2856/? E/DataBuffer: Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder@49c667e) 11-01 23:14:49.682 2847-2856/? E/DataBuffer: Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder@14637df) 11-01 23:14:49.682 2847-2856/? E/DataBuffer: Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder@565ec2c) 11-01 23:14:49.682 2847-2856/? E/DataBuffer: Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder@6326f5) 11-01 23:14:49.683 2847-2856/? E/DataBuffer: Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder@6946c8a) 11-01 23:14:49.683 2847-2856/? E/DataBuffer: Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder@30072fb) 11-01 23:14:50.809 2001-2024/? E/BatteryStatsService: no controller energy info supplied 11-01 23:14:50.882 2001-2024/? E/BatteryStatsService: power: Missing API 11-01 23:14:50.903 2001-2024/? E/BatteryStatsService: modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0} 11-01 23:14:53.175 23468-23468/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 23468 (netstat)

                                     [ 11-01 23:14:53.176   269:  269 W/         ]
                                     debuggerd: handling request: pid=23468 uid=10242 gid=10242 tid=23468

11-01 23:14:53.236 23469-23469/? A/DEBUG: 11-01 23:14:53.236 23469-23469/? A/DEBUG: Build fingerprint: 'google/shamu/shamu:7.0/NBD91X/3532935:user/release-keys' 11-01 23:14:53.236 23469-23469/? A/DEBUG: Revision: '0' 11-01 23:14:53.236 23469-23469/? A/DEBUG: ABI: 'arm' 11-01 23:14:53.236 23469-23469/? A/DEBUG: pid: 23468, tid: 23468, name: netstat >>> netstat <<< 11-01 23:14:53.236 23469-23469/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 11-01 23:14:53.236 23469-23469/? A/DEBUG: r0 00000000 r1 af0f7191 r2 00000008 r3 00000080 11-01 23:14:53.237 23469-23469/? A/DEBUG: r4 af0f7190 r5 bea21980 r6 af0f3b85 r7 00000000 11-01 23:14:53.237 23469-23469/? A/DEBUG: r8 ffffffff r9 aec185c0 sl 00000000 fp aec2d400 11-01 23:14:53.237 23469-23469/? A/DEBUG: ip 00000073 sp bea21968 lr af0dc94d pc aeda901c cpsr 200e0030 11-01 23:14:53.256 23469-23469/? A/DEBUG: backtrace:

themass commented 6 years ago

我不想允许横屏 该怎么设置?

lipangit commented 6 years ago

image

参照orientationActivity,修改这两个变量控制全屏前和全屏后的屏幕方向