libstagefright: stop audio source before deleting AudioPlayer

-audio source won't be stopped during AudioPlayer destruction
 due to start failed and AUDIOPLAYER_STARTED not set
-handle audio source stop in AwesomePlayer if AUDIOPLAYER_STARTED
 not set

Change-Id: I395c045a0a8a5d5b6ea8cc762d6a2636bb885b0e
CRs-Fixed: 704605
libstagefright: fix drainInputBuffers for FlushCompleteEmulation Quirk

Codecs which use the "requires-flush-complete-emulation" require
flushing (draining) the buffers before filling them. The change
"accelerate camera recording start up speed" has changed the order
of filling and draining the buffers which doesn't work well with
the FlushCompleteEmulation quirk

Change-Id: I78193f0aca4a85455393a4cf20d33b919ea6a57e
stagefright: update OMAP3 h264 codec data construction

Changes are based on gingerbread branch and they help improve
video stuttering on OMAP3.

Change-Id: Ic886a4c555c2a7a41204e7a18f38560744b782f6
libstagefright: update OMAP3 support

* Move the OMAP_ENHANCENEMENT flag to make sure that the
  buffer is not modified futher on.
* Don't queue more than 4 buffers to the component. This
  greatly improved the video recording framerates both for
  480P and 720P.

Change-Id: Iacc983214d873099e8f6218f374717a2ae4ffcc8
stagefright: ifdef "libstagefright: Use proper ctts offset"

Causes A/V sync issues or corrupted recordings on NON-QCOM hardware

Change-Id: I8c8625c41936c3ecc9a70f82ddc17e6e66503fd3
stagefright: fix YV12 chroma stride align for Exynos4

Commit 906eba (exynos4: libstragefright: add support for samsung colorformat/omx/mfc)
was supposed to apply YV12 chroma stride align to 16 for the Planar format but was
mistakenly applied for all the other formats.

Source: http://git.insignal.co.kr/samsung/exynos/android/platform/frameworks/base/tree/media/libstagefright/colorconversion/SoftwareRenderer.cpp?h=exynos-ics&id=ede5597dcf8e9626b6a0ecf1a025c1e4bf57411e#n161

Change-Id: Iae0e785a908be8a452f6c5e947cd0175d777165b
stagefright: Add flag for enabling enhanced offload support

 * Some devices might not use the QCOM_HARDWARE flag, but still
   want to get the improved audio offload support.
 * Add TARGET_ENABLE_OFFLOAD_ENHANCEMENTS to enable support for
   PCM offload and 24-bit playback with no extra dependencies.

Change-Id: Ie1a92602c6c0cd59008db8dbf72125eecef08e85
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
Merge branch 'cm-11.0' of https://github.com/rogersb11/android_frameworks_av into cm-11.0