Closed yunhaia closed 5 years ago
Hi,
As for rk, it not supports output YUV data via Hardware decoder, anyway, it supports set surface then output the data via the surface.
You could enable the setting as below:
private boolean is_enable_hardware_render_mode = true; //设置视频硬解码下Mediacodec自行绘制模式(此种模式下,硬解码兼容性和效率更好,回调YUV/RGB和快照功能将不可用)
It should works now..
@daniulive , hi, meet some tech issue when using smarterstreaming hardware decoding, will report configureCodec error. any ideas to fix it? attach the error log. ` OMXClient: Using client-side OMX mux. [OMX.rk.video_decoder.avc] configureCodec returning error -2147483648
`
`
12-04 23:40:05.680 14004-14050/com.daniulive.smartplayer I/DaniuLiveLog: VideoDecoder w:1920 h:1080 profile:High level:4.0 12-04 23:40:05.680 14004-14050/com.daniulive.smartplayer I/DaniuLiveLog: [HWdecoder] Run into get id++ 12-04 23:40:05.680 14004-14050/com.daniulive.smartplayer I/DaniuLiveLog: [HWDecoder] RegNatives ok, reg_ret=0 12-04 23:40:05.680 14004-14050/com.daniulive.smartplayer I/DaniuLiveLog: [HWdecoder] Run out of get id-- 12-04 23:40:05.680 14004-14050/com.daniulive.smartplayer I/DaniuLiveLog: [HWDecoder] Run into Init.. 12-04 23:40:05.681 14004-14050/com.daniulive.smartplayer I/DaniuLiveLog: [HWDecoder] attached, mediacodecref:0x100466, mediacodecobj:0x200001
12-04 23:40:05.681 14004-14050/com.daniulive.smartplayer I/DaniuLiveLog: [HWDecoder] call initDecoder ++
12-04 23:40:05.681 14004-14050/com.daniulive.smartplayer I/DNHWDecoder: Trying to find HW decoder for mime video/avc
12-04 23:40:05.681 14004-14050/com.daniulive.smartplayer I/DNHWDecoder: Found candidate decoder OMX.rk.video_decoder.avc
12-04 23:40:05.683 14004-14050/com.daniulive.smartplayer I/DNHWDecoder: Color: 0x7f420888
12-04 23:40:05.683 14004-14050/com.daniulive.smartplayer I/DNHWDecoder: Color: 0x15
12-04 23:40:05.683 14004-14050/com.daniulive.smartplayer I/DNHWDecoder: Color: 0x13
12-04 23:40:05.683 14004-14050/com.daniulive.smartplayer I/DNHWDecoder: Found target decoder OMX.rk.video_decoder.avc. Color: 0x13
12-04 23:40:05.683 14004-14050/com.daniulive.smartplayer I/DNHWDecoder: Java initDecode: : 1920 x 1080. Color: 0x13
12-04 23:40:05.684 14004-14050/com.daniulive.smartplayer I/DNHWDecoder: Format: {height=1080, width=1920, mime=video/avc, color-format=19}
12-04 23:40:05.684 14004-14050/com.daniulive.smartplayer I/DNHWDecoder: properties.colorFormat:19
12-04 23:40:05.688 14004-14044/com.daniulive.smartplayer I/SmartPlayer: Stop Buffering
12-04 23:40:05.692 14004-14057/com.daniulive.smartplayer I/OMXClient: Using client-side OMX mux.
12-04 23:40:05.704 14004-14057/com.daniulive.smartplayer E/ACodec: [OMX.rk.video_decoder.avc] configureCodec returning error -2147483648
12-04 23:40:05.704 14004-14057/com.daniulive.smartplayer E/ACodec: signalError(omxError 0x80001001, internalError -2147483648)
12-04 23:40:05.704 14004-14056/com.daniulive.smartplayer E/MediaCodec: Codec reported err 0x80001001, actionCode 0, while in state 3
12-04 23:40:05.704 14004-14050/com.daniulive.smartplayer E/MediaCodec: configure failed with err 0x80001001, resetting...
12-04 23:40:05.709 14004-14057/com.daniulive.smartplayer I/OMXClient: Using client-side OMX mux.
12-04 23:40:05.715 14004-14050/com.daniulive.smartplayer E/DNHWDecoder: initDecode failed
android.media.MediaCodec$CodecException: Error 0x80001001
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:577)
at com.videoengine.NTMediaCodecVideoDecoder.initDecode(NTMediaCodecVideoDecoder.java:275)
12-04 23:40:05.715 14004-14050/com.daniulive.smartplayer I/DaniuLiveLog: [HWDecoder] call initDecoder --
12-04 23:40:05.715 14004-14050/com.daniulive.smartplayer E/DaniuLiveLog: [HWDecoder] call initDecoder failed..
12-04 23:40:05.715 14004-14050/com.daniulive.smartplayer E/DaniuLiveLog: VideoDecoder::Run HW h.264 decoder->init() failed
12-04 23:40:05.839 14004-14050/com.daniulive.smartplayer I/DaniuLiveLog: [event]notify resolution infor: width: 1920, height: 1080
12-04 23:40:05.839 14004-14050/com.daniulive.smartplayer I/DaniuLiveLog: [eventMgr] AddEvent(3), id:0x1000007
12-04 23:40:05.841 14004-14049/com.daniulive.smartplayer I/DaniuLiveLog: AndroidVideoRender::Run first, c=1
12-04 23:40:05.841 14004-14049/com.daniulive.smartplayer I/DaniuLiveLog: CreateAndroidRenderChannel: Id 1
12-04 23:40:05.841 14004-14049/com.daniulive.smartplayer I/DaniuLiveLog: Init: AndroidSurfaceViewChannel
12-04 23:40:05.841 14004-14044/com.daniulive.smartplayer I/SmartPlayer: 分辨率信息: width: 1920, height: 1080
`