Kodi Community Forum

Full Version: Kodi on LG Web OS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2023-10-16, 08:32)sundermann Wrote: [ -> ]Yes, that is the one for webOS
I found two problems:

1. CBitstreamConverter::Open is called from CDVDVideoCodecStarfish::OpenInternal and there is a check below the line which says: "// valid avcC data (bitstream) always starts with the value 1 (version)" and it assumes extradata[0] = 1 which is not the case for the stream (the first four extradata bytes are actually 0x00 0x00 0x01 0x67. So to satisfy the assumption I tweaked the code and added:
Code:
  in_extradata +=2;
  in_extrasize -=2;
The function CDVDVideoCodecStarfish::OpenInternal now proceeds until we meet the second problem:

2. CDVDVideoCodecStarfish::OpenInternal is sending load payload to Starfish SoC and it does that here:
Code:
if (!m_starfishMediaAPI->Load(payload.c_str(), &CDVDVideoCodecStarfish::PlayerCallback, this))
It doesn't return from this call. Now wondering if I can somehow debug the starfish Media API. Probably not w/o root...
@jockyw2001: I'm not convinced the bistream converter thing is an error. Annex b streams could also have extradata but in this case no conversion is needed. Also you're erroring out in Load which means that the bitstream converter wasn't even converting anything yet
Hi

Is possible root my tv
Lg c2
software 03.33.80
webos 7.3.1 ?
Cool yep that'll be it! Thanks for the response. I take it as of now there's no way to do any LE -> WebOS addon + settings migration ?
(2023-10-16, 18:11)sundermann Wrote: [ -> ]@jockyw2001: I'm not convinced the bistream converter thing is an error. Annex b streams could also have extradata but in this case no conversion is needed. Also you're erroring out in Load which means that the bitstream converter wasn't even converting anything yet
Yes, you're totally right, the problem is not caused by a faulty starfish video codec. But I believe the H264 playback crash is caused by the same issue as this: [webOS] Crash when playing AV1 video file.  
Because I see this debug info at the end of kodi.log although apparently Webos 5+ isn't supposed to use ACB API:
Code:
2023-10-17 20:35:33.205 T:16255   debug <general>: AcbCallback: ACB callback: acbId=2, taskId=1, eventType=1, appState=1, playState=1, reply=

@sundermann: could it be the dummy ACB library  fix is not sufficient? Or is there another issue.
@sunlollyking: Probably not, but you can try to move over everything except for the binary addons.
@jockyw2001: You have a webOS 4.9 TV so you need acb
(2023-10-17, 17:03)sundermann Wrote: [ -> ]@jockyw2001: You have a webOS 4.9 TV so you need acb
OMG! And all the time I was thinking I was on webOS 5+
So is there anything I can do to make it work?
Not at the moment. k5lp seems to be very special
(2023-10-14, 14:36)sundermann Wrote: [ -> ]@k.gg: Unfortunately it has to be some streaming service, file playback works differently

Would it work to play trailers from Amazon Prime? If so, then here is the log: https://paste.kodi.tv/igunivavip
@k.gg: Yes that works, unfortunately no suspicious attributes there
I have now rooted my webOS 4.9 TV and played a stream in Amazon Prime video player while tailing messages but only get this:
Code:
2023-10-19T06:29:50.294154Z [1990.666827071] user.info surface-manager-starfish [] LSM NL_VSC {"app_id":"com.webos.app.toast","visible":true,"window_t
ype":"_WEBOS_WINDOW_TYPE_TOAST"} 
2023-10-19T06:29:55.631842Z [1996.004519549] user.info surface-manager-starfish [] LSM NL_VSC {"app_id":"com.webos.app.toast","visible":false,"window_
type":"_WEBOS_WINDOW_TYPE_TOAST"}
I played a stream with Netflix and can now provide some hopefully useful data showing pipeline_init and generateJsonPayloadForPlayer as requested in #392
See: https://paste.kodi.tv/jujeyofono
Playing a video with Amazon prime video gives following results: https://paste.kodi.tv/adefijipeb
I have opened libomx_vdec in Ida Pro and looking up the functions indicated by the addresses given in the crash log call stack. From there it can be seen that OMX Component Init calls OMX rpc_init which calls vrpc_setRingBuf which very likely fails with an "init error" and then exits by calling _Z15vrpc_flash_exitP14_vrpc_handle_t
Could be a memory allocation failure for creating the ring buffer. I will try to tweak the buffer size and pass a smaller value.
OMX log messages can be found in /var/ log/legacy-log
Indeed, allocation errors are logged which lead to the forementioned "init error" of omxrpc_init which causes the thread to crash.
Please find the log here: https://paste.kodi.tv/edeconikiz.kodi

I suspect Kodi is requesting too much memory via OMX API call(s). The question is where can this be modified?