ksvc / KSYMediaPlayer_Android

金山云Android播放SDK(KSYUN Live Streaming player SDK),支持RTMP HTTP-FLV HLS 协议(supporting RTMP HTTP-FLV HLS protocol),直播延时2-3秒(Living delay 2 or 3 seconds),supporting jitter control,software&hardware decode
http://v.ksyun.com/
Apache License 2.0
856 stars 247 forks source link

播放几率性的不显示画面(有声) #318

Open loveanao opened 4 years ago

loveanao commented 4 years ago

服务器OS:ubuntu 18.4 流媒体服务器,nginx +nginx-rtmp-moudle 网络场景:内网

开发环境AS3.5.3 目标编译版本27 只使用armeabi-v7a

KSYMediaPlayer_Android 使用SDK版本2.2.3 拉流文件格式 flv h.264编码

设置按照官网设置

用以下设置自由组合 设置 android:hardwareAccelerated="true" 设置 KSYMediaPlayer.KSYDecodeMode.KSY_DECODE_MODE_AUTO 设置 KSYMediaPlayer.KSYDecodeMode.KSY_DECODE_MODE_SOFTWARE 设置 KSYMediaPlayer.KSYDecodeMode.KSY_DECODE_MODE_HARDWARE

使用 KSYMediaPlayer 和 KSYTextureView 均出现

会间歇性的不显示画面,语音一直正常获取

不显示画面 SurfaceHolder.Callback的 surfaceChanged仅回调2次

显示画面 SurfaceHolder.Callback的 surfaceChanged 会回调6次

设置 KSYMediaPlayer.KSYDecodeMode.KSY_DECODE_MODE_SOFTWARE 显示画面会多显示如下日志,

/KSYMediaPlayer: KSYMediaPlayer Use Software Decode and SDK Version is:2.2.3, BufferTimeMax:0.5 /KSYMediaPlayer: SDL_VoutFFmpeg_CreateOverlay(w=1280, h=720, fmt=I420(0x30323449, dp=0x8e43a280) /KSYMediaPlayer: [GLES2] Version = OpenGL ES 3.2 v1.r14p0-00cet0.9500166da1423e9591394b068a52b758 /KSYMediaPlayer: [GLES2] Vendor = ARM /KSYMediaPlayer: [GLES2] Renderer = Mali-G71 /KSYMediaPlayer: [GLES2] Extensions = GL_EXT_debug_marker GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture /KSYMediaPlayer: create render yuv420p

设置 KSYMediaPlayer.KSYDecodeMode.KSY_DECODE_MODE_SOFTWARE 显示画面会多显示如下日志, KSYMediaPlayer: SDL_VoutAMediaCodec_CreateOverlay(w=1280, h=720, fmt=_AMC vout=0x8dfd8828) KSYMediaPlayer: AMEDIACODEC__INFO_OUTPUT_FORMAT_CHANGED width-height: (1280 x 720) color-format: (FormatUnknown: 0x32315679) stride: (1280) slice-height: (736) crop: (0, 0, 1279, 719)

从日志分析来看,应该是某个实例没有正常创建, 由于看不到源码,难以分析

测试手机 华为mate 20 pro ud (android 10 ), 红米6a(android 9) nexus 6(android 7.1) 出现