libstagefright: Squashed commit of QC media features from CAF

libstagefright: Add support to plug-in proprietary parser

 - Introduce an Extended Extractor to facilitate plugging-in
   of proprietary parsers.

 - QC Proprietary parsers will be built and added only if
   TARGET_ENABLE_QC_AV_ENHANCEMENTS is true.

Change-Id: I2aae9515867f0beaa822e17fa390a1dc81953965

libstagefright: Add QC specific mime types

 - Add QC specific media extensions and mime types.

Change-Id: Id942a12cde131ca37a4a8855b340a9c8ff7b70d5

libstagefright: add ExtendedCodec to configure QC specific formats

 - ExtendedCodec configures omx component with QC specific
   extensions to augment container/codec format-support

Change-Id: I0eadf056f46d0512ae1cf3b2be29797a86cdd9eb

libstagefright: Configure decoder to support VC1 clips

Change-Id: I94900e9d6bd8a53c49a7449cc241b684749a4f33
 - Configure decoder in frame-by-frame or arbitrary mode
   based on the codec type.
 - Enable timestamp reordering for VC1 and AVI
CRs-Fixed: 432847

MediaProfiles: Add support for camcorder video resolutions.

Added video resolutions to support camcorder recording.

Change-Id: I2291de43ae2be7338c673f2f0417ec5c1581391e

audio: Add support for QCOM's VOIP solution

Change-Id: I108c4aea30b3e807209910ade429060e23545cde

libmedia: Add QC enhancements to MediaProfiles

Add entries for:
- EVRC, QCELP, and WMA formats
- 4K resolution support for camcorder

Change-Id: Ic308a735ffae5c57174824a86bff0248aff15ad2

audio: add support for QCOM audio formats

-Add support for EVRC, QCELP, AMRWB+, and WMA formats.

Change-Id: If110058284c8b3e18c2f242f560fc7748f62081c

mediaserver: conditionally launch ListenService

Conditionally instantiate ListenService from MediaService

Change-Id: Ib7a7e9bec41c64b0787433268d7ab769b852c124

framework/av:: Add support to decode mp3 data in mp4 container

- Added support to decode mp3 data in mp4 container packed as mp4a
  atom and .mp3 atom as well.

Port of 8fa3774adf9259b33ee721cfaeff26da42c29928
CRs-Fixed: 439897

Change-Id: I42acc43d7c856b7b565409924b4d08fe9b6b7344

audiomixer: Use High Quality resampler

Use very high quality resampler to upsample to 48KHz sample
rate.
CRs-fixed: 416730

Change-Id: I30420cbaa8f6d34e2bce408494cc08cb00b175a3

audio: Send correct channel mask in voice call recording.

-Using popCount function to get channel count gives incorrect value on
voice call recording.
-Only STEREO and MONO bits to be considered to count
channels on input

Change-Id: If3b7f8ec303e567ff10b572f09d504db5373afb3

libstagefright: Add Utilities for QC Enhancements

Introduce a QCUtils file containing utility methods
for QC enhancements. Enable these features only if
TARGET_ENABLE_QC_AV_ENHANCEMENTS is true.
Add following enhancements:
 - High Frame Rate (HFR) recording
 - Shell property to disable audio
 - Shell property to override encoding profiles
 - Support for B frame encoding

Change-Id: I466e7c4923db3c4d7516fb02d34dad840a0d114e

libstagefright: enable sync-frame-decoding mode for thumbnails

Force video decoder to sync-frame-decoding mode to optimize
thumbnail generation in terms of timing and resources

Change-Id: I7d6198747a42db05a08fd4cf237de51d3e936dcc

libstagefright: Add interlaced video support

- Adds call to set output buffer size on the native window

Change-Id: I4754e1f1d4d0bba375f719240499ef58c9e87ca2

frameworks/av: Add support for FM feature

Add FM volume key to AudioParamater class
which is used to initimate Audio HAL to
apply correct volume to FM stream

Change-Id: I5569bb12e33a07cde153b884bdceb549ac62c7e7

libmediaplayerservice: Add support for DashPlayer

Add support for DashPlayer in MedaPlayerFactor

Change-Id: I3e1fd871340117cb11975f6819d4bf0e6630607a

audioflinger: do not invalidate stream used by voip

During the process of invalidation of voip streams,
actual driver is not closed so when it tries to open again
getoutput fails as only one instance of voip can be created.
so do not invalidate the tracks used by voip driver.
CRs-Fixed: 494093

Change-Id: I42a962991ce1d586d87f4aecba19c0e5dde6b9dd

libmedia: Add support for LCH tones

- Add the INCALL_MUSIC flag for tracks
  created for INCALL_MUSIC stream.
- Adding tones to the ToneGenerator that are
  to be used for Local Call Hold.

Change-Id: I98c914a0d6cce26da5b82d010328ee689e12a1c5

libstagefright: Move checks for creating new extractor to ExtendedExtractor

- Move all the checks and creation of the extended extractor
into ExtendedExtractor.
- Restrict creation of new extractor to the following conditions
  o default extractor is NULL
  o default extractor says the content is video only
    or has an unrecognized audio stream
  o the audio stream is a amr-wb (plus).
- Avoid creation of two extractor, this improve start-up latency.
CRs-Fixed: 507045

Change-Id: Id9f9428f0ca5781ecdbc9b27f6c6d930df820751

libstagefright: wrong component name set for wma

Const key word for component name doesn't update the component name.
Update function signature to return component name.
CRs-Fixed: 507111

Change-Id: Ia79c7d9bbc3d7014ee13ed3a2d43d5825b7467e9

libstagefright: i/p o/p port config not required for AC3/EAC3

For Dolby AC3/EAC3 media we dont need to configure input and
output ports here

Change-Id: I772d31919c82d0598e3c2b2bbabf4ec04cdf92ed

libstagefright: Set the profile type to user selected type for AVC Encoder

User selected AVC profile was not set as it was over ridden
by base profile.For QC Enhancment Enabled,user selected profile
should be used.
CRs-Fixed: 514235

Change-Id: I4de760539d2b9f31f08e5e3956e2be3f5f280713

libstagefright: Add new QC Media formats

- Add QC MediaDefs and MetaData for new
  QC parsers
- Add property to support runtime enabling of
  QC parsers

Change-Id: I7df285a6556f49df2c1ed5eda650bbf6dd39a863