libstagefright: Use YAMATO(Adreno semiplanar) color format for 7x27a.
libstagefright: Fix bitrate and I frame interval values for HFR mode
libstagefright: Fix HFR crash in MPEG4Writer

From ICS, for video kkeyframerate is used instead of kkeysamplerate. This
needed correction in MPEG4Writer.
kkeydecoding timestamp is used for sending the decoding timestamp. The
decoding timestamp had to updated for HFR.

Change-Id: I194a218b00ffcd41b1646a0c29c26a7a8f87e819
libstagefright: Fix to avoid deadlock while audio/video track stop

- Before writing to the file, the lock was released two times which
  is not required. This could lead to uncertain behavior.
- Fixed by removing the second "unlock".

(cherry picked from commit 8715b7f53597d1e3a32df997fca1dc043b98acf2)

Change-Id: I876f96807acf9dce4b0b25f60580b79bd5607ac4
CRs-Fixed: 290916
libstagefright: Remove assert failure for kKeyHfr
libstagefright: Use writer thread for video only recording.

The MPEG4 writer is currently writing the frames to the file in
the video track thread when doing video only recording. This causes
frame drops when the call to write to the file takes too long.

With this change, frames are written to the file from the writer
thread on video only recording, preventing the video track thread
to get blocked on writes.

(cherry picked from commit f9bc5cead918d8aedea2fc4f3c4f7cd275c3b5b6)

Change-Id: Icdb91be1c9cf919eadb1227481bce07dac547527
CRs-Fixed: 341670
libstagefright: Enable metadata mode recording
libmediaplayerservice: Fix for audio recording test through CTS

- Issue: Failure in stop is observed with the audio recording test
through CTS.
console, the recording session is force closed with a notification
File Size limit exceeded. Further, the stop fails with the same
message(notification of the File size exceeded error).

- Cause: The calculation of nTotalBytesEstimate for the recording
session exceeds the limit 95 percent of mMaxFileSizeLimitBytes.
As a result of size deficit, the recording is stopped at the
beginning of the recording session notifying
MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED.

- Fix: The factor size used in the calculation of nTotalBytesEstimate
has been updated properly for 64bit file offset setting. The
setParam64BitFileOffset in StagefrightRecorder::prepare() is executed
based on two additional validations so that the factor size is updated
appropriately.

(cherry picked from commit 7bffcd1e6842bb7e5d88ba767104c73e84b14b15)

Change-Id: Iad0c45e148311f85dc93b76b7cf258bf97afa13a
TestScenario: When the audio record test is initiated in the CTS
CRs-Fixed: 328461
media: cleanup system property ro.product.device usage

Replace 'ro.product.device' usage with 'ro.board.platform'
to enable qcom chipset specific features.

Using ro.product.device for enabling chipset specific
features requires manual changes for customers who
want build their own device.

CRs-fixed: 338149
(cherry picked from commit 9fa3017fee5de099017b9ccffc93ffdeae79a913)

Change-Id: I71e769ac19a39a636e23afb4d05f46edbcfadc6a
libstagefright: Change thread priority for LPA threads

- Since A2DP behaves like a render thread, there is a need for it
  run at urgent audio priority.

CRs-Fixed: 344793
(cherry picked from commit 3b81741adf7b743cfa72874f63bf561950c9cd22)

Change-Id: I44c40b812f0368ec81d7c11fd45daef6d5e16702
libstagefright: Fix in calculating size of data remaining in cache

- Do not consider interleaving offset while calculating cache size
- Do not update last access position when seek internal is ignored

CRs-Fixed: 349980

(cherry picked from commit 6b406f9832631ba19dd47bfe0be478770166fcec)

Change-Id: I106bad67c87ab0e5813b75c3ecf75c5f211e0931
libstagefright: VP8 playback fixes

- The VP8 input buffer size is hardcoded to 256Kb in
  the VP8 omx component input port definition.
  This is insufficient for 1080p videos.
- Increase input buffer size to 750Kb.

CRs-Fixed: 345892
(cherry picked from commit d8a2ac05962bac053066800707010310ba46aee1)

Change-Id: I5f7749421c7e91d0e0e13786e80d420a3c5d1272