lipangit / JiaoZiVideoPlayer

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

Android 8.1.0 在同一界面,在同一个页面 单独的JzvdStd 全屏没问题, 但ListView中的JzvdStd 全屏就报空指针。 #2374

Open xuguang0417 opened 5 years ago

xuguang0417 commented 5 years ago

什么jzvd版本 7.0_preview 是否和安卓版本有关系,什么版本 Android 8.1.0 是否和特定品牌的手机机型有关系,什么机型 荣耀 8X 有刘海 相关log是什么 image

复现流程 在这个界面添加一个单独的 JzvdStd 播放点击全屏没问题, 但 在listView 中的 子 JzvdStd 点击全屏就报空指针。 这是一个新的工程。 最好有截图或者视频说明情况 2019-04-03 09:43:32.581 7898-7931/com.xuguang.videodemo I/MediaPlayerNative: setDataSource(http://jzvd.nathen.cn/6ea7357bc3fa4658b29b7933ba575008/fbbba953374248eb913cb1408dc61d85-5287d2089db37e62345123a1be272f8b.mp4) 2019-04-03 09:43:32.594 7898-7931/com.xuguang.videodemo W/MediaPlayer: setScreenOnWhilePlaying(true) is ineffective for Surface 2019-04-03 09:43:32.597 7898-7914/com.xuguang.videodemo V/MediaHTTPService: makeHTTPConnection: CookieManager created: java.net.CookieManager@269f35e 2019-04-03 09:43:32.597 7898-7914/com.xuguang.videodemo V/MediaHTTPService: makeHTTPConnection(android.media.MediaHTTPService@64e99e0): cookieHandler: java.net.CookieManager@269f35e Cookies: null 2019-04-03 09:43:32.606 7898-7914/com.xuguang.videodemo D/NetworkSecurityConfig: No Network Security Config specified, using platform default 2019-04-03 09:43:32.798 7898-7921/com.xuguang.videodemo D/MediaPlayerNative: Message: MEDIA_SET_VIDEO_SIZE(5), ext1=960, ext2=960 2019-04-03 09:43:32.798 7898-7921/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1237] callback app listenerNotNull=1, send=1 2019-04-03 09:43:32.798 7898-7921/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1254] callback application 2019-04-03 09:43:32.799 7898-7898/com.xuguang.videodemo I/JZVD: onVideoSizeChanged [226989399] 2019-04-03 09:43:32.799 7898-7921/com.xuguang.videodemo D/MediaPlayerNative: Message: MEDIA_BUFFERING_UPDATE(3), ext1=2, ext2=0x0 2019-04-03 09:43:32.799 7898-7921/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1237] callback app listenerNotNull=1, send=1 2019-04-03 09:43:32.799 7898-7921/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1254] callback application 2019-04-03 09:43:32.807 7898-7898/com.xuguang.videodemo I/JZResizeTextureView: onMeasure [60488675] 2019-04-03 09:43:32.808 7898-7898/com.xuguang.videodemo I/JZResizeTextureView: widthMeasureSpec [MeasureSpec: EXACTLY 720] 2019-04-03 09:43:32.808 7898-7898/com.xuguang.videodemo I/JZResizeTextureView: heightMeasureSpec [MeasureSpec: EXACTLY 400] 2019-04-03 09:43:32.809 7898-7898/com.xuguang.videodemo I/JZResizeTextureView: onMeasure [60488675] 2019-04-03 09:43:32.809 7898-7898/com.xuguang.videodemo I/JZResizeTextureView: widthMeasureSpec [MeasureSpec: EXACTLY 720] 2019-04-03 09:43:32.809 7898-7898/com.xuguang.videodemo I/JZResizeTextureView: heightMeasureSpec [MeasureSpec: EXACTLY 400] 2019-04-03 09:43:33.611 7898-7904/com.xuguang.videodemo I/zygote64: Compiler allocated 6MB to compile void android.view.ViewRootImpl.performTraversals() 2019-04-03 09:43:33.801 7898-7914/com.xuguang.videodemo D/MediaPlayerNative: Message: MEDIA_BUFFERING_UPDATE(3), ext1=43, ext2=0x0 2019-04-03 09:43:33.802 7898-7914/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1237] callback app listenerNotNull=1, send=1 2019-04-03 09:43:33.802 7898-7914/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1254] callback application 2019-04-03 09:43:33.802 7898-7913/com.xuguang.videodemo D/MediaPlayerNative: Message: MEDIA_PREPARED(1), ext1=0, ext2=0x0 2019-04-03 09:43:33.802 7898-7913/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1237] callback app listenerNotNull=1, send=1 2019-04-03 09:43:33.802 7898-7913/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1254] callback application 2019-04-03 09:43:33.819 7898-7931/com.xuguang.videodemo V/PlayerBase: baseStart() piid=21823 2019-04-03 09:43:33.820 7898-7931/com.xuguang.videodemo I/MediaPlayer: [HSM] stayAwake true uid: 10150, pid: 7898 2019-04-03 09:43:33.824 7898-7931/com.xuguang.videodemo I/MediaPlayerNative: Pid:7898 MediaPlayer::start 2019-04-03 09:43:33.825 7898-7931/com.xuguang.videodemo D/MediaPlayerNative: Action:start, CurrentState:MEDIA_PLAYER_STARTED 2019-04-03 09:43:33.842 7898-7913/com.xuguang.videodemo D/MediaPlayerNative: Message: MEDIA_BUFFERING_UPDATE(3), ext1=44, ext2=0x0 2019-04-03 09:43:33.842 7898-7913/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1237] callback app listenerNotNull=1, send=1 2019-04-03 09:43:33.842 7898-7913/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1254] callback application 2019-04-03 09:43:34.066 7898-7914/com.xuguang.videodemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000 2019-04-03 09:43:34.069 7898-7914/com.xuguang.videodemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000 2019-04-03 09:43:34.071 7898-7959/com.xuguang.videodemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000 2019-04-03 09:43:34.074 7898-7913/com.xuguang.videodemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000 2019-04-03 09:43:34.081 7898-7965/com.xuguang.videodemo D/MediaPlayerNative: Message: Unknown MediaEventType(6), ext1=0, ext2=0x0 2019-04-03 09:43:34.081 7898-7965/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1237] callback app listenerNotNull=1, send=1 2019-04-03 09:43:34.081 7898-7965/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1254] callback application 2019-04-03 09:43:34.114 7898-7959/com.xuguang.videodemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000 2019-04-03 09:43:34.119 7898-7921/com.xuguang.videodemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000 2019-04-03 09:43:34.130 7898-7921/com.xuguang.videodemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000 2019-04-03 09:43:34.131 7898-7959/com.xuguang.videodemo D/MediaPlayerNative: Message: MEDIA_SET_VIDEO_SIZE(5), ext1=960, ext2=960 2019-04-03 09:43:34.131 7898-7959/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1237] callback app listenerNotNull=1, send=1 2019-04-03 09:43:34.131 7898-7959/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1254] callback application 2019-04-03 09:43:34.132 7898-7959/com.xuguang.videodemo D/MediaPlayerNative: Message: MEDIA_INFO(200), ext1=MEDIA_INFO_RENDERING_START(3), ext2=0 2019-04-03 09:43:34.132 7898-7959/com.xuguang.videodemo W/MediaPlayerNative: info/warning (3, 0) 2019-04-03 09:43:34.132 7898-7959/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1237] callback app listenerNotNull=1, send=1 2019-04-03 09:43:34.132 7898-7959/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1254] callback application 2019-04-03 09:43:34.142 7898-7898/com.xuguang.videodemo I/JZVD: onVideoSizeChanged [226989399] 2019-04-03 09:43:34.142 7898-7898/com.xuguang.videodemo I/JZVD: onPrepared [226989399] 2019-04-03 09:43:34.148 7898-7898/com.xuguang.videodemo I/JZVD: onStatePlaying [226989399] 2019-04-03 09:43:34.148 7898-7898/com.xuguang.videodemo I/JZVD: startProgressTimer: [226989399] 2019-04-03 09:43:34.279 7898-7959/com.xuguang.videodemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000 2019-04-03 09:43:34.785 7898-7904/com.xuguang.videodemo I/zygote64: Do full code cache collection, code=248KB, data=174KB 2019-04-03 09:43:34.786 7898-7904/com.xuguang.videodemo I/zygote64: After code cache collection, code=157KB, data=106KB 2019-04-03 09:43:34.801 7898-7898/com.xuguang.videodemo V/InputMethodManager: Reporting focus gain, without startInput 2019-04-03 09:43:34.842 7898-7959/com.xuguang.videodemo D/MediaPlayerNative: Message: MEDIA_BUFFERING_UPDATE(3), ext1=92, ext2=0x0 2019-04-03 09:43:34.842 7898-7959/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1237] callback app listenerNotNull=1, send=1 2019-04-03 09:43:34.842 7898-7959/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1254] callback application 2019-04-03 09:43:35.844 7898-7921/com.xuguang.videodemo D/MediaPlayerNative: Message: MEDIA_BUFFERING_UPDATE(3), ext1=100, ext2=0x0 2019-04-03 09:43:35.844 7898-7921/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1237] callback app listenerNotNull=1, send=1 2019-04-03 09:43:35.844 7898-7921/com.xuguang.videodemo D/MediaPlayerNative: [notify] : [1254] callback application 2019-04-03 09:43:36.862 7898-7918/com.xuguang.videodemo I/zygote64: Starting profile saver IsSaveProfileNow end. 2019-04-03 09:43:36.895 7898-7898/com.xuguang.videodemo I/JZResizeTextureView: onMeasure [60488675] 2019-04-03 09:43:36.895 7898-7898/com.xuguang.videodemo I/JZResizeTextureView: widthMeasureSpec [MeasureSpec: EXACTLY 720] 2019-04-03 09:43:36.895 7898-7898/com.xuguang.videodemo I/JZResizeTextureView: heightMeasureSpec [MeasureSpec: EXACTLY 1520] 2019-04-03 09:43:36.949 7898-7898/com.xuguang.videodemo I/PressGestureDetector: ORIENTATION_LANDSCAPE 2019-04-03 09:43:36.951 7898-7898/com.xuguang.videodemo D/CubicBezierInterpolator: CubicBezierInterpolator mControlPoint1x = 0.23, mControlPoint1y = 0.06, mControlPoint2x = 0.09, mControlPoint2y = 0.97 2019-04-03 09:43:36.952 7898-7898/com.xuguang.videodemo D/CubicBezierInterpolator: CubicBezierInterpolator mControlPoint1x = 0.6, mControlPoint1y = 0.9, mControlPoint2x = 0.8, mControlPoint2y = 1.0 2019-04-03 09:43:36.953 7898-7898/com.xuguang.videodemo D/CubicBezierInterpolator: CubicBezierInterpolator mControlPoint1x = 0.23, mControlPoint1y = 0.06, mControlPoint2x = 0.09, mControlPoint2y = 0.97 2019-04-03 09:43:36.953 7898-7898/com.xuguang.videodemo D/CubicBezierInterpolator: CubicBezierInterpolator mControlPoint1x = 0.6, mControlPoint1y = 0.9, mControlPoint2x = 0.8, mControlPoint2y = 1.0 2019-04-03 09:43:36.966 7898-7898/com.xuguang.videodemo I/JZResizeTextureView: onMeasure [60488675] 2019-04-03 09:43:36.967 7898-7898/com.xuguang.videodemo I/JZResizeTextureView: widthMeasureSpec [MeasureSpec: EXACTLY 1465] 2019-04-03 09:43:36.967 7898-7898/com.xuguang.videodemo I/JZResizeTextureView: heightMeasureSpec [MeasureSpec: EXACTLY 720] 2019-04-03 09:43:36.973 7898-7898/com.xuguang.videodemo D/AndroidRuntime: Shutting down VM 2019-04-03 09:43:36.976 7898-7898/com.xuguang.videodemo E/AndroidRuntime: FATAL EXCEPTION: main Process: com.xuguang.videodemo, PID: 7898 java.lang.NullPointerException: Attempt to invoke virtual method 'void cn.jzvd.JzvdStd.setUp(java.lang.String, java.lang.String, int)' on a null object reference at com.xuguang.videodemo.AdapterVideoList.getView(AdapterVideoList.java:62) at android.widget.AbsListView.obtainView(AbsListView.java:2417) at android.widget.HwAbsListView.obtainView(HwAbsListView.java:909) at android.widget.ListView.makeAndAddView(ListView.java:2078) at android.widget.ListView.fillSpecific(ListView.java:1500) at android.widget.ListView.layoutChildren(ListView.java:1808) at android.widget.AbsListView.onLayout(AbsListView.java:2215) at android.view.View.layout(View.java:19851) at android.view.ViewGroup.layout(ViewGroup.java:6141) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1816) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1660) at android.widget.LinearLayout.onLayout(LinearLayout.java:1569) at android.view.View.layout(View.java:19851) at android.view.ViewGroup.layout(ViewGroup.java:6141) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:19851) at android.view.ViewGroup.layout(ViewGroup.java:6141) at android.support.v7.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:444) at android.view.View.layout(View.java:19851) at android.view.ViewGroup.layout(ViewGroup.java:6141) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:19851) at android.view.ViewGroup.layout(ViewGroup.java:6141) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1816) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1660) at android.widget.LinearLayout.onLayout(LinearLayout.java:1569) at android.view.View.layout(View.java:19851) at android.view.ViewGroup.layout(ViewGroup.java:6141) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at com.android.internal.policy.DecorView.onLayout(DecorView.java:894) at android.view.View.layout(View.java:19851) at android.view.ViewGroup.layout(ViewGroup.java:6141) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2729) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2436) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1558) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7463) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1041) at android.view.Choreographer.doCallbacks(Choreographer.java:847) at android.view.Choreographer.doFrame(Choreographer.java:774) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1027) at android.os.Handler.handleCallback(Handler.java:809) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:166) at android.app.ActivityThread.main(ActivityThread.java:7555) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963) 2019-04-03 09:43:37.039 7898-7898/? I/Process: Sending signal. PID: 7898 SIG: 9

xuguang0417 commented 5 years ago

image image 配置 应该是没问题的, 因为 单独的全屏没有问题。

lipangit commented 5 years ago

新版是预览版 ,还没做完 先别用在生产环境中用6.4.* 7.0目前还没有新东西

a26145 commented 5 years ago

我遇到同样的问题 我是这样解决的 2种方式 1. 换成recyclerview 第二种方式 复写那个全屏的button,进入到一个单独的页面 全屏播放 具体原因 没有查找出来, 希望对你有帮助

zt80hou commented 2 years ago

我也是改成recyclerview,不出现,ListView有问题