libstagefright: print file name in nuplayer playback path

Print the file name of clip being decoded by nuplayer.

Change-Id: I1e7f590019176b3722fa49f5a969d19d94c39bef
CRs-Fixed: 767244
libstagefright: remove duplicate call

getCodecSpecificDataFromInputFormatIfPossible is called twice in
Track constructor in MPEG4Writer. This is integration bug.
Second call is the correct place to call this function, remove first
call.

Change-Id: Icf5c2d136c734f9a0b21caf14faad5f5663ec846
libmedia: Add support to offload Audio Track

Add support to offload Audio Track. This is required
to offload tracks with PCM 16 bit data only
as padding is not done for 24 bit data. Offloading
is done transparent to the client of audiotrack

Change-Id: Ia63a30bd4bf431ceeda44731b53caa3add7cc521
libstagefright: Fix incall camcorder crash

-Starting camcorder during call is causing
 mediaserver crash on some targets.
-Audiorecord creation from AudioSource returns
 with error on some targets where this concurrent
 use case is not supported, furhter access to this
 record instance is causing crash.
-Preventing unnecessary call on Audiorecord instance
 in case of error, fixes this issue.

CRs-Fixed: 761747
Change-Id: Id5727a14cf320884f417413b0856b88035e382e5
libstagefright: use extended extractor for AC3/EAC3 formats

- Use extended extractor to parse Dolby AC3/EAC3 formats.
  Default extractor cannot parse multi-channel AC3/EAC3
  files properly

CRs-Fixed: 646269
Change-Id: Id097533790b69f5a26d5b92fb4fd64d03b622d68
libstagefright: Add support for JOC format to stagefright.

Add support for EAC3 JOC format to utils to allow offload path
to be selected for EAC3 JOC contents.

CRs-Fixed: 761339
Change-Id: Icf247136f4aa272e3294e81e776142fe4000548d
DOLBY UDC fixes for JOC

Compilation fixes for when DOLBY_UDC may not be defined

CRs-Fixed: 761339
Change-Id: I4976958fb9f88c3a17f81c78e75f89cad97eb6e3
frameworks/av: Use QC parser for aac audio only in MPEG4 container

- Default parser causes frequent standby for 'aac audio only' inside
  MPEG4 container - which is also larger than 75 minutes.
  This is due to perfomance issues during read()
- No such performance issue is seen with QC parser

Change-Id: I28eb5ecfeeaa1103cc149f346e20c5c232967bed
CRs-Fixed: 760668
audioflinger: Increase Client heap size

This increase is needed to accommodate higher sampling rate clip
playback over devices like BT and to support gapless playback with
larger buffer sizes. In both cases, the cblk memory allocated for a track
can be high enough that a new allocation (either due to restoreTrack_l or
opening a new track) can fail.

Change-Id: I96f674706184f029259802d5552f5ceeebc689c1
CRs-Fixed: 768106
NuPlayer: Implement pre-roll for poor network conditions

In poor network conditions, NuPlayer attempts to play out the
available cache. This leads to intermittent and jerky video
and an overall poor playback experience.

Implement pre-rolling (AwesomePlayer way) by setting low
and high buffering thresholds for available cache and
pause/resume player based on the cache duration available.
Also notify the MediaPlayer listeners about buffering
start/end.

CRs-Fixed: 761496
Change-Id: If3b1bad38725b7e2ebb0f195b8a04d3f423f3a1e
audio: Fix PCM offload selection for 16-bit and 24-bit

Fix PCM offload selection for 16-bit and 24-bit audio
formats.

Change-Id: Id3b3356c360e12fef6d72e92948427e3d7e2bc89
CRs-Fixed: 769991
DO NOT MERGE - audio policy: fix inifinite loop in clearAudioPatches()

releaseAudioPatch() does not necessarily remove the audio patch
from the list.
Scan the list from the top down to avoid adjusting the index.

Bug: 18621514.
Change-Id: I58787154680f7cb1818509017835b1693d62190f
RTSP: check MPEG4 DP in RTSP

Since the HW decoder doesn't support MPEG4 DP clips, detect DP format in
RTSP souce and report a new MIME for SW decoder.

Change-Id: I9df34538ede8d63a2a0826bc025c7ebef281bb49
media: Various fixes and cleanups

 * Clean up cruft from old QC property checks
 * Enable correct CFLAGS for libmedia to support track offload
 * Clean up warnings around variable ordering

Change-Id: I63026b0c3dbf9bf1eea29357136df0a4451f94d9