OSDN Git Service

Tungsten: Improve RX player error handling.
authorJohn Grossman <johngro@google.com>
Tue, 6 Dec 2011 22:05:05 +0000 (14:05 -0800)
committerJohn Grossman <johngro@google.com>
Tue, 6 Dec 2011 22:19:31 +0000 (14:19 -0800)
commite5bcf5c6572bb5190ee8394619e936ffb61db14d
treec06cc41a971f03174e6bd7daf80ea0a76987bc28
parenta2ad6febe24bb7baf544c7ba100ab76e55547f7c
Tungsten: Improve RX player error handling.

First, clear an issue which was causing an assert to fire.  Basically,
once a decoder pump had entered the error state and was shutdown, it
was not clearing its status, and when a substream attempt to recycle
the pump, startup was failing an assert (no thread had been created,
meaning that the system was not initialized, yet status indicated an
error).  This was a small one-liner in aah_decoder_pump.cpp.

Second, try to become a little nuanced about how we handle errors in
the decoder pump.  A comment in the code pretty much says it all, but
the summary is that we don't want to completely abort playback because
a single chunk of ES failed to decode, but if nothing is decoding and
we are making no progress at all, we probably need to put the
MediaPlayer instance into the fatal Error state and signal the app
level so that further action can be taken (automatic recovery attempts
followed by bug reports and signalling the user if those fail).

This is to address the fallout of http://b/issue?id=5498460, where
something at the OMX decoder level becomes unhappy about not being
able to obtain an output buffer which eventually unwinds to this
assert which results in a dead mediaserver.  After this change, the
mediaserver will no longer crash, and may even recover (depending on
whether or not the OMX unhappiness is transient or not), but the
primary issue (unhappy OMX) is probably still around.  It is quite
difficult to reproduce, I will probably need to open a different bug
to track that issue.

Change-Id: I5b65b818378a5ae9c915e91b7db7129f0bda6837
Signed-off-by: John Grossman <johngro@google.com>
media/libaah_rtp/aah_decoder_pump.cpp
media/libaah_rtp/aah_decoder_pump.h
media/libaah_rtp/aah_rx_player.h
media/libaah_rtp/aah_rx_player_core.cpp
media/libaah_rtp/aah_rx_player_substream.cpp