[mythtv] 20180705 Android Observations

David Engel david at istwok.net
Thu Jul 12 19:56:16 UTC 2018

On Thu, Jul 12, 2018 at 03:39:03PM -0400, Peter Bennett wrote:
> On 07/11/2018 03:16 PM, David Engel wrote:
> > I tried using yesterday's patch to watch the World Cup last night and
> > some other stuff.  I had to abandon that when playback got very
> > stuttery and I didn't have time to debug.  I suspect your sledge
> > hammer was getting used repeatedly.  I tried again later and it
> > happened again and then went away.  It didn't happen on my other
> > shield, but I didn't test with it much.
> Was this in normal playback, time stretch or fast forward? AFAIK the
> IllegalStateException that the sledge hammer handles only happens in fast
> forward or occasionally in skip/jump. (i.e. when flush is used).

It was using timestretch at 1.5x.  It didn't happen last night.  I did
see multiple, but not too many, short pauses, as you described.  They
were annoying, but certainly not as annoying as exiting playback
altogether.  I later tried some talking heads shows at 1.8x
timestretch, but I couldn't take the jitter.

> > > I suppose I need to dig into the FFmpeg source code and figure out the
> > > IllegalStateException and find the correct FFmpeg fix.
> According to mediacodec documentation, IllegalStateException only happens on
> dequeue output if the decoder is not executing or it is in asynchronous
> mode.
> It is not in asynchronous mode or dequeue output would never work.
> The ways it can stop executing are if you call "stop" or "reset" or
> "release" it. In ffmpeg there is a "stop" routine but it is never called,
> and there is no reset routine.  It seems that there is no way to get into a
> non-executing state. Prehaps it is in an error state. Unfortunately there is
> no native API that will tell you the state.
> It seems that this may be a bug in mediacodec on the shield. I don't know
> how much I should do to try and work around it. I have tried reordering
> calls and adding a stop and start after the flush, but nothing has helped.
> > FYI, this might be related.
> > https://forums.geforce.com/default/topic/1056259/shield-tv/shield-experience-upgrade-7-0/post/5834167/#5834167
> > .  Kodi doesn't use ffmpeg (AFAIK) for MediaCodec.  I don't know about
> > Plex.
> Perhaps I need to report this to NVidia

Yes, it shouldn't hurt.  Hopefully, they will take interest.  Our
timestretch and fast forward/rewind use is definitely more of a
torture test than with any other player of which I'm aware.

David Engel
david at istwok.net

More information about the mythtv-dev mailing list