libstagefright: Extended media support via FFMPEG

 * Original work by Michael Chen - https://github.com/omxcodec
 * Kitkat port from Android X86 project

libstagefright: add null checking to addPlugin

libstagefright: fix error handling of dlsym()

According 'man dlsym', a NULL return from dlsym() doesn't indicate an error.
The correct way to test for an error is to call dlerror() to clear any old
error conditions, then call dlsym(), and then call dlerror() again to check
whether its return value is not NULL.

libstagefright: add more media mimetypes

This is the first step to add the ffmpeg plugins.

libstagefright: add ExtractorPlugin

The patch allows to load an ExtractorPlugin to extend the functions of
DataSource::sniff and MediaExtractor. A plugin has to implement a C
function getExtractorPlugin to fill the MediaExtractor::Plugin struct.

The filename of the plugin could be specified by the
media.stagefright.extractor-plugin property.

Change-Id: I995a37a4f1ab4bba6ca3c24c7001a27a1e3ccb90

FLACExtractor: Add more sample rates support

In FLACExtractor.cpp, it has function to check file's sample rate.
If the input sample rate is not in its list, it will return "unsupported
sample rate" issue. Modify code to make other sample rates (100,1k,42k,46k)
pass the check

Issue: AXIA-1441
Change-Id: I48f91119275560ec6d00feb0dedc70d10aa55262
Signed-off-by: Xiaobing Feng <xiaobing.feng@windriver.com>
Signed-off-by: Matt Gumbel <matthew.k.gumbel@intel.com>

libstagefright: add ffmpeg components

libstagefright: add more decoders

Add support for wma, wmv, ra, ape, dts decoders.

Change-Id: Iaf48a806aa0cef7d9bcb848383fc3d778c8bd248

libstagefright: allow to use the extended extractor in priority

If the meta contains the string "extended-extractor-use",
use the extended extractor first.

add support for rv20, rv30

add ffmpeg heuristic decoder

Change-Id: I5eed11b563ca7f15d44bacfb795d6f3da08ab883

add HEVC(H.265) decoder and cleanup

Squashed the following commits of branch cm_maguro-10.1 from
https://github.com/omxcodec/android_frameworks_av.git
by Michael Chen <omxcodec@gmail.com>

defb904 remove MEDIA_MIMETYPE_AUDIO_MP2
8036958 add fetchUriFromFd func to get file name
91bc7d5 fix videoCompressionFormatString and audioCodingTypeString funcs
f03069f reset FRAME_DROP_FREQ to 0
718b99a add HEVC(H.265) decoder
84f8bf6 cleanup
f026c93 cleanup
440614a add debug info

Change-Id: Ie75db0778f633357e2280aef6d47a0fa3beb823e

AwesomePlayer: use AwesomeLocalRenderer for OMX.ffmpeg.* components

stagefright: Remove duplicate types from QC media defs

Change-Id: I50ecafe79a2985d0868a1ac82464d6ca448aa2c5
libstagefright: Re-introduce a QCOM_HARDWARE ifdef after the FFMPEG commit

Fixes a build error on non QCOM hardware.

Change-Id: I4a4268b351d0d8bf748dd03ccea0fbab20ed4314
disable camera sounds (3/3)

Change-Id: Iff4eb5ca7dd13038bf852a76d0c605814864497a
Signed-off-by: Jonathan Steadman <xxwhitehawk@gmail.com>
screenrecord: Add audio support

Adds audio recording to the screenrecord system. Note that
while recording, the audio is muted from the device output,
and that the audio volume is controlled separately (so make
sure to turn up your volume if you hear nothing).
Audio from the microphone can also be recorded by adding
--microphone to the command line.

Change-Id: I97dfcaf3d93b786c5466e1f4215549e3d015bcf0
screenrecord: Enable SUBMIX_IN as well and cleanup on exit

While on Nexus 5/Nexus 7 (AOSP QCOM audio), trying to turn on
SUBMIX_IN fails and is not needed, it is required on Find 5
and N1 (CAF QCOM audio), or otherwise SUBMIX_OUT won't turn
on.
We also now release the audio routing as it wouldn't revive
the audio speakers otherwise.

Change-Id: I0f80a232304733e0b0a834b188b8cfa5b88915f3
Revert "libstagefright: Re-introduce a QCOM_HARDWARE ifdef after the FFMPEG commit"

This reverts commit 90044a90c66510274794ce6c3b7ad55f817b0165.
Revert "libstagefright: Extended media support via FFMPEG"

This reverts commit 3113d5d9c90adde859d62a48832fb3ca1d30b1a8.