Determine the audible state in MediaSourcePlayer
commit2284586bd2d49cacd18c16bfe60fcb519c80b045
authortimav <timav@chromium.org>
Wed, 25 Mar 2015 00:17:37 +0000 (24 17:17 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 25 Mar 2015 00:18:26 +0000 (25 00:18 +0000)
treef3fed80ae3604aacf2e87d08d1f7513c336a5fb9
parent2ca5097c4db8905beba3c37a47f40b21b97877a0
Determine the audible state in MediaSourcePlayer

We set the audible state every time after the pipeline
has successfully decoded the frame: to false if prerolling
and true otherwise, taking the volume into account.

Also, we set the state to false if the flow is going to be
 interrupted because of a coded error, abort or Pause.

As well, we set audible state to false when the starvation
happens and there is no data in the MediaDecoderJob queue,
we believe this indicates the demuxer freeze.

BUG=414810

Review URL: https://codereview.chromium.org/1008093002

Cr-Commit-Position: refs/heads/master@{#322102}
media/base/android/audio_decoder_job.h
media/base/android/media_decoder_job.h
media/base/android/media_source_player.cc
media/base/android/media_source_player_unittest.cc