Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
ADD: [amcs] restart codec when surface is lost and found #12858
Resume after focus loss seems to be fixed. Tried Chromecast, the "open with" dialog when connecting an USB storage and switching to another app.
What people still have to keep in mind is that when doing some Chromecast or switching app, a running PVR only goes into pause, which means that it keeps fully running, writing data to some timeshift buffer, which might be desired or not. In the latter case, people have to stop playback manually.
@CiNcH83 Continuing from 12866
It's tricky to restart it though, as the shutdown of the codec from, e.g. ChromeCast, takes a while, and surely longer than when we get the signal that the surface is available again.
I confirmed it working with a semi-hack, but I have to think about a better way, if possible
I retested on Sony Android TV with Kodi being paused in the background. I tested with file (H.264 720p50) from USB (to eliminate potential PVR and network problems). Here is what I tried during file playback...
(1) Initiate Chromecast playback of some YouTube clip:
(2) Pressing HOME > open Netflix:
So pausing Kodi in the background does not work at all for me, neither for PVR nor for file. Might be due to the slow Sony TV.
Here is a video of the Netflix incident (2). Netflix crashes at the very end of the video.
So like @FernetMenta wrote, I would also do a stop. Things seem to go wrong as soon as another app tries to do some video playback. If I think about it more, it might very well be a video decoder resource shortage, with the second video (Chromecast, Netflix) having to use SW. A SHIELD can probably cope with that. DRM video might require HW video decoding though.
BTW. According to Sony MediaTek MT5890 specs, the SoC can handle up to 4 AVC or HEVC 1080p60 streams. As for 4K and VP9 generally, it can only do 1 stream.
I only tested YouTube which is VP9 most probably and Netflix in 4K. I should probably try some Netflix 1080p. It is still a problem for the mentioned cases where only 1 stream is supported..