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
libstagefright: back off exynos4 hacks

Change-Id: I953f502171bc98854b5d59165057c57b3c65cdaa
libstagefright: align YV12 for software codecs on exynos4

YV12 chroma stide should be aligned to 16 according to the
android framework. But, GSC & Mali couldn't accept a seperate
stride for U & V components. They just use Y_stride/2 as a
UV Stride.

Change-Id: Ibeeb3439ee10a4666420e5fa34ff0a6d6ea7c003
libstagefright: fix YV12 stride for software codecs on exynos4

Change-Id: I3612899d2bffa474eb6447788858911757a7f45d
omx: exynos4: bring inline with jellybean

Change-Id: Ic275fd30a721f8161dcc44c2706b86ab5ea213ba