frameworks/av : Playing AAC and MP3 clips using LPA.

-AAC and MP3 clips are not playing.
-AAC and MP3 are not using LPA path.
-Enable LPA decoder path and implement LPAPlayer class.

Change-Id: I76438319fc72c4898fad5910f8de874f89287687
libstagefright: Collection of fixes for TunnelPlayer

-Handling of EOS, and triggering EOS was wrong
in TunnelPlayer. Seeking when EOS was posted
to the HAL was wrong. EOS should
not be posted till seek is complete
-Also, EOS should not be posted to
the app if we are seeking
-Player should wake up when seeked,
even after EOS was posted from player
to HAL
-Fixed this issue by cleaning up the code for EOS
-Disable tunnel mode playback for streaming use cases
 to avoid jittery playback

Change-Id: I21699d2d5874bde6cbfe549ce0251b252e9a4090
CRs-Fixed: 433346
CRs-Fixed: 432233
CRs-Fixed: 429868

libstagefright: Add new mime for QC TS container

- Add new mime type for TS container that is sniffed by extended
  extractor. This is needed for media extractor to determine which
  parser to create.

Change-Id: I18dcebbbf3b31cea7db29a4dd65385638343bec1

libstagefright: Use software decoder for ADTS content.

Use software decoder for widevine content which uses ADTS
format.

CRs-fixed: 431096
(cherry picked from commit 3edf2e703bcdc47f122864865056d5cb65b7ab43)

Change-Id: I50eba673ddd6ec2bbb737577978e61902ff68d13

audioflinger: Fix to release wakelock after closeoutput

-In DirectTrack destructor, closeOutput is called after
releaseWakelock is done. This may sometimes result in
power collapse happening even before actual close
sequence of Audio path is completed and will result
in high power consumption.
-Release wakelock only after closeOutput is done
in directtrack destructor.

CRs-fixed: 438179
Change-Id: Ibe103804daf2cb09bade998d6d34c3a34508dd09

libstagefright: Add support to change clip duration to enable LPA

Added support to change the clip duration threshold value for LPA
playback. A new system property 'lpa.min_duration' has been added
which controls the minimum clip length for enabling LPA.
The default threshold value has been retained as 60sec.

Change-Id: I6a8be6d6bf67495977d8c75e5be14723a31353b1

frameworks/av: Skip tunnel mode for playback through AudioCache

In the use case of playback using SoundPool, decoded data is
cached from player and further rendered through AudioCache.
Avoid Tunnel mode for the use case AAC format through SoundPool

Change-Id: I21005a5b39f9fb480ae0d525ecb560fec4382620
CRs-Fixed: 437539

frameworks/base: dumpsys rendering statistics for Stagefright

- this adds extra fps statisticis
- report via dumpsys

Change-Id: I7b4d4582c4eb2ccf2d11557844dade92f9e587c0
CRs-Fixed: 435013

libstagefright: Stop extractor source after start in TunnelPlayer

Issue: In the use case of frequent suspend resume during Video
Playback with HDMI Connected, we encounter a scenario where tunnel
player is created and destroyed without the extractor source
started. In such use case, stopping the source in reset during the
tunnel player destruction leads to failure during assertion check.

Fix: Check for mStarted flag to ensure that stop on source is
called only after they are started.

Change-Id: Ib18e7ee3d10b2cc706944e358046f163d156706c
CRs-Fixed: 440239