libstagefright: Fix timestamp corruption during offload playback

-Timestamp gets corrupted at EOS of offload playback.
-This happens because the number of samples played returned from
 HAL could be zero if playback has reached EOS and if compress
 handle is invalid / closed.
-If HAL has posted EOS  avoid the update of real time and media
 time with the timestamp from HAL.

CRs-Fixed: 570368
Change-Id: I5ea75f4eda1df0c110bce780e50e3c8ae9b4cd85
libstagefright: Fix intermittent pause during tunnel A-V playback

-Media time is used in onVideoEvent for A-V sync. In offload
 playback we only use realtime(time from DSP).
-Media time should be same as real time. If media time is not
 updated with the real time value A-V sync issues are seen.
-Update media time to real time value to avoid intermittent pause
 during playback.

CRs-Fixed: 572060
Change-Id: Ib1123b7554f3508230ca67cd20a68fa32c753057
audio: Fix for OMXCodec::read() getting blocked

- Sometimes notification sound is not heard if it is played
  and stopped multiple times in a short duration.
- If OMXCodec::read() gets blocked for filled buffers while
  in pause, it never returns as mFilledBuffers is always empty.
  Due to this AudioTrack destructor never exits as it waits for
  the AudioCallback thread to unblock it.
- Ensure OMXCodec::read() returns even if timeout occurs while
  in pause and handle the same in AudioPlayer by returning zero
  bytes in AudioCallback.
CRs-Fixed: 478768

Change-Id: I2ca40a673fdf95bccc3069a18b694670612a9895
frameworks_av: Support pre-KitKat audio blobs

Patch Set 2: Combined duplicated method

Change-Id: I6384c13b0944a25cdf0cb90031b2e3698bc3e78d
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>