libstagefright: ifdef the audio_defs.h include for QCOM_DIRECTTRACK

Devices that use BOARD_USES_LEGACY_ALSA_AUDIO do not use this file,
this was breaking build for all 8960 devices.

Change-Id: Ic0ae606615f7ccc72cef9836d52bfa7045f326ae
Camera: Support obtaining camera memory from MemoryHeapIon

* Exynos 5 devices want the ION file descriptor from MemoryHeapIon

Change-Id: I9e445cf24c15713f713181667e7b7caa1a96592e
stagefright: Adjust confidence threshold for extended sniffers

 * Some sniffers return 0.2 for cases where they only find an audio
   track in some containers.
 * Change the comparison to also examine files right on this threshold.
 * This allows us to score ONE FUCKING HUNDRED PERCENT on the Antutu
   Video Test \o/

Change-Id: I78b6ab8a634771e0e290f669801f5b08d6a32a51
stagefright: Fix FFMPEG catchall decoders

 * Get this metadata properly flowing
 * Allows us to play tracks such as Apple Lossless :)

Change-Id: I2990b30eef5b672da339d24444424c61a43b85c2
stagefright: Increase raw codec buffer size

 * Enlarge the buffer to handle up to 6 channels of 32-bit data.
 * We should probably do this dynamically in the future.

Change-Id: Id1af10b52c4e71e811d0d034baf2d3f1388f4abd
AudioTrack: Reject offloading for non-music streams

Reject AudioTrack initialization if called with non-music
stream type (or attribute) but with AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD.

This will allow the client to fall back to SW decode or
deal with the error appropriately.

CRs-Fixed: 740607
Change-Id: I4d1dda6523bd792ab26b0363e16febcd14b1ad98
stagefright: Revert patches which should not have carried over

 * These patches cause problems on L, revert them.

Revert "Disconnect the mediaplayer when reset"

This reverts commit 9ab0b00dcd43f9f695aec13da4613058f69f7678.

Revert "Remove potential cause of underrun."

This reverts commit a60271120ca16959a9ed0f6a16cfd08543e28375.

Change-Id: I1ee0a447cc5820afd4c068170d6d04b50e45a36d
stagefright: Allocate only what is needed for FLAC decoding

 * Choose buffer size based on bit depth

Change-Id: Ic3aef0ac77f330896dfcfe4cccfc5113925d28b1
stagefright: Fix metadata/message conversion issues

 * Remove duplication of code between ExtendedCodec and FFMPEGSoftCodec,
   just call into ExtendedCodec and properly ifdef QCOM-only parts.
 * Fix CSD not being converted when AV_ENHANCEMENTS wasn't set- this
   was breaking the software video codecs on Hammerhead.

Change-Id: I9cd4316ce19b15baabf12b78b992498ce48e2697
libstagefright: Fix QCOM_BSP_LEGACY cflags

Change-Id: I432541f4923a42b1fafcff8fcd886c81c94ba3be
Fix compile error after I9cd4316ce19b15baabf12b78b992498ce48e2697

frameworks/av/media/libstagefright/ExtendedCodec.cpp:1187:1: error:
expected '}' at end of input

Change-Id: I7d75e69160f794b177f4235f4a6bb5a188dc0d08