stagefright: Clear mNoMoreOutputData flag during seeking

For some 3rd party players, stop won't be called when playing
to the end. If seeking happens after that, we need to clear
this flag to make it be ready for subsequence data flow.

Change-Id: I9b2d18d03225420a45821ba7536cdc91d52b1312
CRs-Fixed: 755988
Track volume should be maintained even if track is restored

If track is restored when it set its volume to a non-unity value (such as mute),
the volume was forced to unity again.  Now, the previous volume is restored.

Bug: 18570664
Change-Id: I79f34c6c7d6f535baba813fd3b8ba8e55cac8ad7
libmedia: Fix crash seen while running CTS

 * setVolume was called while the track was being torn down during
   MediaPlayerFlakyNetworkTest

Change-Id: Icb965478644909511215c17db3cf2debba85a864
libmedia: properly ifdef music streams

Select the correct audio usecase and restore music
offload for non QCOM_HARDWARE targets.

Change-Id: Id3882ae1dd0d5badcfafe1d02c9fed6c8844ed7f
audio_policy: Fix for mute count mismatch for sonification strategy

- Sometime ring tone is not heard while in MT call

- During call mode, primary output ringtone/alarm stream mute count
  is incremented on startOutput and decremented on stopoutput
  for all Output requests.
    This is resulting side effect if stop output for non-primary outputs
  called, when no active streams available on primary output(mute count
  will not decrement)

- Add requested output check on start & stop output before calling
  handleIncallSonification API

Change-Id: Id4f328e2f9fc6820cecfbd73df11c871f8587aad
audio_policy : Fix for incorrect input device selection

BLUETOOTH_SCO_HEADSET is not avaibale in input devices list
for recording usecases. Add the same to allow VOIP applications
to select BLUETOOTH_SCO_HEADSET as input device when
BT is connected.

Change-Id: I5d5010ab396f85bf58573943c91fd815f39f57c1
CRs-fixed: 712950
stagefright: httplive: Fix deadlock for low duration clips

PlaylistFetcher buffers up to 3 * target-duration bytes of data,
but if a stream is slow (ie due to bad network conditions), a
buffer threshold of 10s is used to resume playback. This results
in an indefinite freeze as PlaylistFetcher has stopped buffering
before this threshold. Reduce the 10s threshold to be more in-sync
with PlaylistFetcher's buffering size.

CRs-Fixed: 745835
Change-Id: Ife846e7c5b4f9645895873d08250c4bee0164972
stagefright: httplive: Reduce memcpy calls for chunked content

Streams using http chunking will not report the segment's total
content-length. In this case, a 64k buffer is allocated and is
increased by 32k each time the buffer is filled again. For high
bitrate content, this can lead to a large number of copies that
affect the HLS framework delay. Increase fetchFile buffer size
exponentially by 50% or at least 32k instead of by 32k each time
to reduce the number of memcpy calls.

Example for a chunked 6 MB 1080p segment (ie ~3s):
Adding 32k:
190 copies with 572.97 MB copied

Increasing by 50%:
12 copies with 16.09 MB copied

CRs-Fixed: 745835
Change-Id: Iedf0e4437e96026a58d50bce2660f85ac90d0ada
Added support for YEAR metadata key from VorbisComments

The OggExtractor wasn't extracting the YEAR key when the metadata in
the file was parsed. The YEAR key is now extracted when the file
metadata is parsed.

Change-Id: Idf0d1a37fb141491dce5de527703ca1b27f621e7
stagefright: Keep track of the bit width in the RAW codec

 * We need this to push 24-bit PCM around Stagefright and OMX

Change-Id: Ic94ec972162a01545d5dd0ad0bf3eb6c6731f42e
stagefright: Add FLAC support to MatroskaExtractor

Change-Id: Ib1b7d7e6fed617404eb5581a5f87ab67531f5bb8
stagefright: Support HEVC tracks in Matroska containers

 * Pass the HVCC atom to Stagefright.

Change-Id: I7fdca25e20b9051925936a34e594808b18a3a3bd
stagefright: Improve FLAC and WAV support for 24-bit

 * Forward-port changes from CM11
 * Remove truncation support as AudioFlinger handles
   rebuffering in case it can't go to the hardware.

Change-Id: Iad30d04ee051050e444c3d665fa8bb7a1cfef348
audioflinger: Enable floating point samples in AudioFlinger

 * Enable "new" mixer mode to enable mixing and reformatting
   of high precision (> 16-bit) streams.
 * Add missing 8_24 format to list of allowed formats.

Change-Id: I7d7b8ca7e34b25afda3af7e796d24cb94779715a
stagefright: Support for 24-bit audio in StageFright

 * Plumb bit depth thru ACodec and OMX
 * Add support for 24-bit PCM offload in NuPlayer on QC devices
 * Use new AudioFlinger features for mixing multi formats without offload
 * Clean up a bunch of code

Change-Id: I018d3a995b63450a38c6c43eaa37c86be30fd893
Merge pull request #1 from CyanogenMod/cm-12.0

Cm 12.0