stagefright: Only invoker HW decoder for actual decoding

 * Only prefer it if actually decoding, derp.

Change-Id: Ie3fe41a77bda8c72e786a906fa14dc1e20e9813f
stagefright: Extra checks for HW AAC decoder

 * Don't engage the HW AAC codec if we don't have channel metadata.
 * This is the case for secure decode, in which case the HW codec
   performs badly.

Change-Id: I993fd01d3074eddc3ed9e867cf213d2da36f8d27
stagefright: Fix stub function

Change-Id: Ifee620bb7b02819ac59f7154bf76f114b57646ee
stagefright: Fix MediaCodecList

 * Missed a few 32->64 conversions in the switch to handle additional
   media types.

Change-Id: I06e26f27576cbf2780a54e3e577209c22fc887b4
stagefright: Only use HW AAC for AV content

 * While this decoder can handle more streams, it can't handle gapless.

Change-Id: I60cb3ca56c57a1280ca0805976e766e242ac1744
stagefright: Support for offloading MPEG2 audio

Change-Id: I8e76e9f98139c8f5170ee2bcc39682e5cba9dfa8
Fix M3UParser relative path handling.

Bug: 16017037
Change-Id: Ibfff99387fb5b3e721144a2b3f9174092d785137
M3UParser: check for NULL before setting meta data

Bug:16351654
Change-Id: I64e9510f719b220471522b4d78a9b00a98bda772
Fix Externally reported security issue

bug: 12724697
Change-Id: I57f37dbb3b01c0c3d3256be67c395352dd6ada13
RTSP: Return the buffers in source side while the source is disconnected

There is a race condition, some buffers are held by the source
because of the poor network environment. If the client tries to flush at
this time, the flush operation will be blocked because not all the buffers
are returned to the client.
At this time, sometimes, the source will be disconnected from the server,
then these buffers held by the source won't be returned any more.
Without this patch, flush operation maybe won't finish, and blocks
other operations, causing ANR.

Change-Id: I19581498d17a29b637d5468932438ea862e1c7ff
libstagefright: Polish MPEG4Writer for MediaMuxer.

     1. Fixed bug in Utils, which ignore 'ESDS' data for MPEG4 video.

    2. Add format limitation for MPEG4Writer.
       only support H.263/AVC/MPEG4 video and AAC/AMR-NB/AMR-WB audio.

Change-Id: I6daa9fa7c487d6cd95983d8b8da6f7fa53a2c44d
Signed-off-by: Anjun Wen <ajwen@marvell.com>
Support MPEG4 codec in Matroska files

For MPEG4 the matroska parser must handle files with and without
configinfo in the codec private data.

Change-Id: I7025772c87ee24bc074bd3837f6877552245e389
Support AAC audio (WaveFormat = 0xFF) in AVI container.

Present AVIExtractor doesn't support AAC audio. So some AVI clip with AAC,
AAC-HEv1, AAC-HEv2 audio, can't be played from gallery.
With this fix, added support for AAC audio (WaveFormat = 0xFF) in AVI container.
Also added a condition to check the sampling rates which are supported and return
error if unsupported sampling rate is encountered, to avoid tombstone crash.

Change-Id: Ic8f081ed254ce8c0b3c0cbd1c3811b89b18c6e8e
Signed-off-by: gbhakteX <gurudattax.bhakte@intel.com>
Signed-off-by: Mazhar <mazharx.sameullah@intel.com>
Support MP2 contents in AVI container.

In present code only "Wave Format = 0x55 (MPEG Layer 3)" is supported in AVI container.
With this fix, adding support for "Wave Format = 0x50 (MPEG)".
As per "RFC 2361 - WAVE and AVI Codec Registries":
A.45 MPEG
WAVE form Registration Number (hex): 0x0050
Codec ID in the IANA Namespace:      audio/vnd.wave;codec=50
WAVE form wFormatTag ID:             WAVE_FORMAT_MPEG

Change-Id: I7cc9d3c8bd8da7a079ac8d50a6d61ccbdedb6f82
Signed-off-by: gbhakteX <gurudattax.bhakte@intel.com>
AwesomePlayer: improve scheduling of video event to hit PTS

Change-Id: I7b19911acbde9b592b757b952d4ad63cd8efebed

AwesomePlayer: use PTS for queueBuffer

Change-Id: I1c14ad4784c799c46cf06a14b0f00c5e4d01f718
Fix decoder EOS handling

Conceptually it should be the same whether EOS is signalled on the last
buffer holding data, or an empty buffer that follows. Make it so that
this actually behaves the same for mp3, AAC and Vorbis.

b/8747869

Change-Id: Idece8ef45689a3ffaf70fb45d19862d7b93b2f92
AACExtractor: Added support for APE tag

To support aac audio with APE tag we need parse
this tag. Otherwise AACExtractor stops reading of
audio file.

DR: OMAPS00267689

Change-Id: Ic697b90dbc9f2b93aeb227411359c36c113cb71e
Signed-off-by: Daniel Levin <dendy@ti.com>
AC3 support ATS (MPEG2TS) Parser

Added support for AC3 in TS parser.

Change-Id: Iaa7d29a7f791e1ca68156fa43a69d835dc4596ae
audioflinger: Cleanups

Change-Id: I23279f0602544320a191464ecde006bbfca6ab55
AudioTrack: When paused, return cached playback position

An offload output can be re-used between two audio tracks having
the same configuration. A timestamp query for a paused track
while the other is running would return an incorrect time.
To fix this, cache the playback position on a pause() and return
this time when requested until the track is resumed.

CRs-Fixed: 612943

Change-Id: I54b5a851ee3fa2ceadc37e3f5c6af4f37b8f404a