<div dir="ltr">Ok, a little bit more or progress:<div><br></div><div>commenting this:</div><div> //if (codec_info.isEncoder())<br> // continue;<br></div><div><br></div><div>and this</div><div><br></div><div> // if (!CServiceBroker::GetDecoderFilterManager()->isValid(m_codecname, m_hints))<br> // continue;<br></div><div><br></div><div>now I'm at:</div><div><br></div><div>2021-01-31 12:09:44.920 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.google.aac.decoder<br>2021-01-31 12:09:44.920 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.google.amrnb.decoder<br>2021-01-31 12:09:44.921 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.google.amrwb.decoder<br>2021-01-31 12:09:44.921 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.google.flac.decoder<br>2021-01-31 12:09:44.921 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.google.g711.alaw.decoder<br>2021-01-31 12:09:44.922 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.google.g711.mlaw.decoder<br>2021-01-31 12:09:44.922 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.Nvidia.mp2.decoder<br>2021-01-31 12:09:44.922 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.google.mp3.decoder<br>2021-01-31 12:09:44.923 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.google.opus.decoder<br>2021-01-31 12:09:44.923 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.google.raw.decoder<br>2021-01-31 12:09:44.923 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.google.vorbis.decoder<br>2021-01-31 12:09:44.923 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.Nvidia.wma.decoder<br>2021-01-31 12:09:44.924 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.google.aac.encoder<br>2021-01-31 12:09:44.924 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.google.amrnb.encoder<br>2021-01-31 12:09:44.924 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.google.amrwb.encoder<br>2021-01-31 12:09:44.924 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.google.flac.encoder<br>2021-01-31 12:09:44.924 T:31447 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.Nvidia.h265.encoder<br>2021-01-31 12:09:44.925 T:31447 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::TRUE IS 1 <--- this is a marker I made.<br>2021-01-31 12:09:44.923 T:31323 INFO <general>: [WHITELIST] Searching the whitelist for: width: 3840, height: 2160, fps: 23.976, 3D: false<br>2021-01-31 12:09:44.927 T:31323 DEBUG <general>: [WHITELIST] Using the default whitelist because the user whitelist is empty<br>2021-01-31 12:09:44.928 T:31323 DEBUG <general>: [WHITELIST] Searching for an exact resolution with an exact refresh rate<br>2021-01-31 12:09:44.928 T:31323 DEBUG <general>: [WHITELIST] Matched an exact resolution with an exact refresh rate 3840x2160 @ 23.976025 - Full Screen (27)<br>2021-01-31 12:09:44.928 T:31323 INFO <general>: Display resolution ADJUST : 3840x2160 @ 23.976025 - Full Screen (27) (weight: 0.000)<br>2021-01-31 12:09:44.952 T:31447 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.Nvidia.h265.encoder), colorFormat(2135033992)<br>2021-01-31 12:09:44.952 T:31447 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.Nvidia.h265.encoder), colorFormat(19)<br>2021-01-31 12:09:44.952 T:31447 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.Nvidia.h265.encoder), colorFormat(21)<br>2021-01-31 12:09:44.952 T:31447 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.Nvidia.h265.encoder), colorFormat(2130708361)<br>2021-01-31 12:09:44.952 T:31447 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.Nvidia.h265.encoder), colorFormat(2146435328)<br>2021-01-31 12:09:44.952 T:31447 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.Nvidia.h265.encoder), colorFormat(2146435329)<br>2021-01-31 12:09:44.952 T:31447 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.Nvidia.h265.encoder), colorFormat(2146435330)<br>2021-01-31 12:09:44.952 T:31447 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.Nvidia.h265.encoder), colorFormat(2146435331)<br>2021-01-31 12:09:44.952 T:31447 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.Nvidia.h265.encoder), colorFormat(2146435332)<br>2021-01-31 12:09:44.953 T:31447 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.Nvidia.h265.encoder), colorFormat(2146435333)<br>2021-01-31 12:09:45.043 T:31447 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::InjectExtraData<br>2021-01-31 12:09:45.055 T:31447 ERROR <general>: CDVDVideoCodecAndroidMediaCodec::ConfigureMediaCodec: configure failed<br>2021-01-31 12:09:45.056 T:31447 INFO <general>: CDVDVideoCodecFFmpeg::Open() Using codec: HEVC (High Efficiency Video Coding)<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 31, 2021 at 11:06 AM Vitor Dall'Acqua <<a href="mailto:veggav@gmail.com">veggav@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Already tested your latest commits, Petri. <div>Much faster and the logs are much cleaner. Thank you.</div><div><br></div><div>I'm still working my way with the hardware rendering. </div><div>Sadly I can't debug this on windows with visual studio, bitstreamconverter isn't used neither androidmediacodec obviously. </div><div>So, I'm back at changing things with a notepad, compiling and testing. </div><div><br></div><div><br></div><div>Here is a log of how the m2ts stream played from a playlist should work:</div><div>2021-01-31 10:45:20.913 T:19521 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::Open hints: Width 3840 x Height 2160, Fpsrate 24000 / Fpsscale 1001, CodecID 173, Level 153, Profile 2, PTS_invalid 0, Tag 1447904328, Extradata-Size: 115<br>2021-01-31 10:45:20.913 T:19521 INFO <general>: CBitstreamConverter::Open Invalid hvcC<br>2021-01-31 10:45:20.913 T:19521 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.Nvidia.mp2.decoder<br>2021-01-31 10:45:20.917 T:13323 INFO <general>: [WHITELIST] Searching the whitelist for: width: 3840, height: 2160, fps: 23.976, 3D: false<br>2021-01-31 10:45:20.917 T:13323 DEBUG <general>: [WHITELIST] Using the default whitelist because the user whitelist is empty<br>2021-01-31 10:45:20.919 T:13323 DEBUG <general>: [WHITELIST] Searching for an exact resolution with an exact refresh rate<br>2021-01-31 10:45:20.920 T:13323 DEBUG <general>: [WHITELIST] Matched an exact resolution with an exact refresh rate 3840x2160 @ 23.976025 - Full Screen (27)<br>2021-01-31 10:45:20.920 T:13323 INFO <general>: Display resolution ADJUST : 3840x2160 @ 23.976025 - Full Screen (27) (weight: 0.000)<br>2021-01-31 10:45:20.924 T:19521 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.Nvidia.wma.decoder<br>2021-01-31 10:45:20.924 T:19521 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.Nvidia.h264.decode<br>2021-01-31 10:45:20.925 T:19521 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.Nvidia.DOVI.decode<br>2021-01-31 10:45:20.925 T:19521 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.Nvidia.h263.decode<br>2021-01-31 10:45:20.926 T:19521 INFO <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec:OMX.Nvidia.h265.decode<br>2021-01-31 10:45:20.927 T:13332 DEBUG <general>: Could not acquire timestamp<br>2021-01-31 10:45:21.073 T:19521 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.Nvidia.h265.decode), colorFormat(2135033992)<br>2021-01-31 10:45:21.073 T:19521 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.Nvidia.h265.decode), colorFormat(21)<br>2021-01-31 10:45:21.163 T:19521 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::InjectExtraData<br>2021-01-31 10:45:21.220 T:19521 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec:: width(3840), height(2160), stride(0), slice-height(0), color-format(0)<br>2021-01-31 10:45:21.220 T:19521 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec:: crop-left(0), crop-top(0), crop-right(3839), crop-bottom(2159)<br>2021-01-31 10:45:21.220 T:19521 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec:: Multi-Surface Rendering<br>2021-01-31 10:45:21.220 T:19521 INFO <general>: CDVDVideoCodecAndroidMediaCodec:: Open Android MediaCodec OMX.Nvidia.h265.decode<br>2021-01-31 10:45:21.220 T:19521 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::UpdateFpsDuration fpsRate:24000 fpsscale:1001, fpsDur:41708<br>2021-01-31 10:45:21.221 T:19521 DEBUG <general>: CVideoPlayerVideo::OpenStream - open stream with codec id: 173<br></div><div><br></div><div>and this is how it works during a menu:</div><div><br></div><div><br>2021-01-31 10:33:58.032 T:13409 INFO <general>: ffmpeg[0x2965bbd040X]: Duration: N/A, start: 600.000000, bitrate: N/A<br>2021-01-31 10:33:58.032 T:13409 INFO <general>: ffmpeg[0x2965bbd040X]: Program 1 <br>2021-01-31 10:33:58.033 T:13409 INFO <general>: ffmpeg[0x2965bbd040X]: Stream #0:0[0x1011]: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc<br>2021-01-31 10:33:58.033 T:13409 DEBUG <general>: CDVDDemuxFFmpeg::AddStream ID: 0<br>2021-01-31 10:33:58.033 T:13409 INFO <general>: Opening stream: 0 source: 256<br>2021-01-31 10:33:58.033 T:13409 INFO <general>: [WHITELIST] Searching the whitelist for: width: 3840, height: 2160, fps: 23.976, 3D: false<br>2021-01-31 10:33:58.033 T:13409 DEBUG <general>: [WHITELIST] Using the default whitelist because the user whitelist is empty<br>2021-01-31 10:33:58.034 T:13409 DEBUG <general>: [WHITELIST] Searching for an exact resolution with an exact refresh rate<br>2021-01-31 10:33:58.034 T:13409 DEBUG <general>: [WHITELIST] Matched an exact resolution with an exact refresh rate 3840x2160 @ 23.976025 - Full Screen (27)<br>2021-01-31 10:33:58.034 T:13409 INFO <general>: Display resolution ADJUST : 3840x2160 @ 23.976025 - Full Screen (27) (weight: 0.000)<br>2021-01-31 10:33:58.069 T:13409 INFO <general>: Creating video codec with codec id: 173<br>2021-01-31 10:33:58.071 T:13409 DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::Open hints: Width 3840 x Height 2160, Fpsrate 24000 / Fpsscale 1001, CodecID 173, Level 153, Profile 2, PTS_invalid 0, Tag 1447904328, Extradata-Size: 114<br>2021-01-31 10:33:58.071 T:13409 INFO <general>: CBitstreamConverter::Open Invalid hvcC<br>2021-01-31 10:33:58.073 T:13409 ERROR <general>: CDVDVideoCodecAndroidMediaCodec:: Failed to create Android MediaCodec<br>2021-01-31 10:33:58.074 T:13409 INFO <general>: CDVDVideoCodecFFmpeg::Open() Using codec: HEVC (High Efficiency Video Coding)<br>2021-01-31 10:33:58.074 T:13409 DEBUG <general>: CDVDVideoCodecFFmpeg - Updated codec: ff-hevc<br>2021-01-31 10:33:58.074 T:13409 DEBUG <general>: CVideoPlayerVideo::OpenStream - open stream with codec id: 173</div><div><br></div><div>It's not the exact same stream but you get the idea. </div><div>It is failing to use the nvidia decoder: OMX.Nvidia.h265.decode and using ffmpeg as software rendering. </div><div><br></div><div><a href="https://github.com/xbmc/xbmc/blob/c01b0f5778c7397325e29238a861d8dc62289e2b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp" target="_blank">https://github.com/xbmc/xbmc/blob/c01b0f5778c7397325e29238a861d8dc62289e2b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp</a><br></div><div><br></div><div>removing the goto fail results in crash. </div><div>basically it is failing to get m_codec. </div><div><br></div><div>But as you can see the invalid hvcC isn't the problem. It must be something in this decoder instructions. </div></div></div>
</blockquote></div>