Fix aac decoder flush

b/8543366

Change-Id: I746ffed6289486b802a2292bfc492ea6c780ed0b
Can't play AAC file with ID3 tag.

When the file is scanned, the ID3 tag is found to have a
footer at the end of audio data. And getAdtsFrameLength
return zero after reading the footer. As a result, the
duration and mInitCheck are not set. The current change
considers the data till footer and sets the duration based
on no. of frames read till the footer/corrupt frame.

Change-Id: Ie8f898435f0d4ca31fdd355146c4db7b37c0b988
Signed-off-by: Arulselvan M <arulselvan.m@intel.com>
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
stagefright: Use HW AAC decoder in ACodec if requested

 * testHLS is failing due to parsing issues with the AAC track
 * Switch to the more robust HW decoder for HLS as well.

Change-Id: I2299266d5f2d8cb0ac457241e4f1d0f4ef87ea05
stagefright: Correct total duration of HFR clips

HFR leverages the mp4 track timescale parameter which is not
considered when calculating total clip duration. This makes tracks
report the correct duration so that total clip duration is computed
correctly.

Change-Id: I8ff556913317eea15030f9f6920cefa560133872
stagefright: Correct timescale in MvHd for HFR

Either timescale or duration must be modified to show the correct
HFR clip duration. Since duration is also queried by the record
timer, modify the timescale instead.

CRs-Fixed: 662909
Change-Id: I6b744b4048b7a2d0bb70e2e3a102385a312bf81b
stagefright: remove target specific checks for hfr

and rely on capabilities published in media_profiles
which are guaranteed to be correct for a given target.

CRs-Fixed: 680348
Change-Id: I751031478689b0373674aa7858f4ad79483b990f
audio:mute duration at the beginning of the recording

-Sometimes shutter sound is getting recorded because
 current kAutoRampStartUs is not sufficient to mute the
 shutter sound

-Fix is to increase the kAutoRampStartUs to 500ms.

Change-Id: Id37b48c4bb7b5c903ef502f933eaff7be0ea566c
CRs-Fixed: 636491