libmedia: Update media profile cap for video codecs

- Update H.263, MPEG4 and H.264 profile caps
- Changes made to max width, height, bitrate and fps

Patchset 1: Add QCOM_HARDWARE ifdefs.
Patchset 2: Fix non-qcom createDefaults.

Change-Id: I0d50221a9e38a45fcccb70b7455412abe9a7a48b
Signed-off-by: Evan McClain <aeroevan@gmail.com>
frameworks/base: Add support for QCELP/EVRC non-tunnel encoding in SF

Add support for QCELP and EVRC formats non-tunnel mode encoding
in StageFright using hardware accelerated encoders.

Patchset 1: Add QCOM_HARDWARE ifdefs.
Patchset 2: Fix ifdef derp.
Patchset 3: Fix endif derp, change omx-core include to vendor/qcom.

Conflicts:

	media/libstagefright/Android.mk
	media/libstagefright/OMXCodec.cpp

Change-Id: I179030d71a9598ddddcf754e963fbed1e1357024
Signed-off-by: Evan McClain <aeroevan@gmail.com>

Conflicts:

	media/libstagefright/Android.mk

Signed-off-by: Andrew Sutherland <dr3wsuth3rland@gmail.com>
libstagefright: Ignore other sniffers if current sniffer returns positive confidence

-MP3 sniffer functions takes around 400ms for the playback
of most of the clips.
-This was causing a startup delay of 1.5 seconds on playback
-Increasing the value of confidence for amr,wav,ogg,mpeg4 formats
to 0.6 so that when they are detected, we ignore the sniffMP3
function.

Change-Id: I08acf28a63c8ae7b1b69e03f85fa9065a52c649e
Signed-off-by: Andrew Sutherland <dr3wsuth3rland@gmail.com>
frameworks/base/nuplayer: Fixes to enable HTTP live streaming

- Enable QCOM specifc color formats in ACodec
- Do not skip lines without /n, in M3U Parser
- Stop scanning sources until reset is handled in NuPlayer.

Patchset 1: Add QCOM_HARDWARE ifdefs.

Conflicts:

	media/libstagefright/ACodec.cpp

Change-Id: Ie7e902c0cd56e7aec17d0ac67d2869a7819770cd
Signed-off-by: Evan McClain <aeroevan@gmail.com>
Signed-off-by: Andrew Sutherland <dr3wsuth3rland@gmail.com>
libstagefright: Changes to support NV21 pixel format Video buffer

-video component returns NV21 color format on qdsp5 targets and it is
mapped to correct HAL Pixed format.

Patchset 1: Add QCOM_HARDWARE ifdefs.

Conflicts:

	media/libstagefright/OMXCodec.cpp

Change-Id: I6b427a2e8b498103ea6c428b62112e8ce1517b2c
Signed-off-by: Evan McClain <aeroevan@gmail.com>

Conflicts:

	media/libstagefright/OMXCodec.cpp

Signed-off-by: Andrew Sutherland <dr3wsuth3rland@gmail.com>
libstagefright: Add property to enable software decoder for video

Add sys property to enable software decoder for video in AwesomePlayer.

Enable software decoder using the adb shell command:
 setprop sys.media.vdec.sw 1

Disable software decoder using the adb shell command:
 setprop sys.media.vdec.sw 0

Change-Id: I9ae6c139575761d2b374b447f38dc5d43172ab40
libstagefright: changes to return proper HAL Pixel format for video buffers.

  -video component returns NV21_SP color formatted video buffers on qdsp5 targets and
it is mapped to HAL_PIXEL_FORMAT_YCrCb_420_SP pixel format for MDP/GPU to do proper
color conversion.

Conflicts:

	media/libstagefright/OMXCodec.cpp

Change-Id: I9e794994e0f66694255e3cf88036472220e233b5
Signed-off-by: Evan McClain <aeroevan@gmail.com>

Conflicts:

	media/libstagefright/OMXCodec.cpp

Signed-off-by: Andrew Sutherland <dr3wsuth3rland@gmail.com>
libstagefright: Remove qcelp decoder from encoder info list

-qcelp decoder omx component is present in the omx component
 encoder list.
-Removed qcelp decoder component.

Change-Id: I05cd86d83384c2b9c0921948775b76de19b9d75c
libstagefright: Checking buffer size.

Checking if the allocated buffer size is equal
to the buffer size requested by decoder.

Change-Id: I6e23668b3005badd7748b7687d014854e7152132
libstagefright: Populating sync sample index for Video track only.

- While an A/V clip in playback, seek fails to desired location
  and starts playback from zero position.
- The stss atom has zero entry count and sync sample index for Audio
  track. Due to this seek fails and starts playback from zero position.
- Skip populating values from stss atom for Audio track, fix added
  for the same.

Change-Id: I3b9073dc182cf4afc8faf612e1d69493d64d113a
CRs-Fixed: 271385
frameworks/base: libstagefright: use new gralloc header

Conflicts:

	media/libstagefright/Android.mk

Change-Id: Ia4dcd07bb62ce767f8d714bc84df016adc1a0552
Signed-off-by: Evan McClain <aeroevan@gmail.com>

Conflicts:

	media/libstagefright/Android.mk

Signed-off-by: Andrew Sutherland <dr3wsuth3rland@gmail.com>
libstagefright : Fix to support AVC1 and MSNV file types

-Add Support for AVC1 and MSNV file types in SniffMPEG4
 function
-Function returns true if the header contains one of these
 filetypes

Change-Id: I6d14f4fef0837b2f6d07ffa2f013616ebb76a085
libstagefright : Fix to support mmp4 file type

-Add Support for mmp4 file type in SniffMPEG4 function.
-Function returns true if the header contains one of these
 filetypes.

Change-Id: I3f88b4b34f9c79c7e3172e813751bcf1c18ad58a
CRs-Fixed: 253907
libstagefright: Adding support for k3g1, skm3 and mp41 major brands

This change adds support for ftyp's k3g1, skm3 and mp41 major brands in
the mp4 parser

Change-Id: I816f80ec1ab288df15a41116bb0b2fedd3b2f692
CRs-Fixed: 257978
libstagefright: Add check for zero chunk size.

mp4 file with chunksize of zero causes a infinite recursive call
of parsechunk of the parser resulting in ANR. Added check to handle
this case.

Change-Id: Id522da4c600600628e528a66b2a53468602020ce
Crs-Fixed:254974
Fixed issue with MPEG4 with 0 audio channels.

Removed check that numChannels != 0 in MPEG4Extractor.
The problem was that numChannels==0 valid, and implies that
the number of channels should come from the audio object
embedded in the MPEG4.

Change-Id: Ibe1b8f1d81ea661932ff1a1c02ed5b992068c15d
CRs-Fixed: 249523
libstagefright: Check for H.264 profile when using sw decoder.

- Adds a check for the video profile when configuring the H.264
software decoder. Returns error unsupported if the profile
is not supported by the decoder.

Conflicts:

	media/libstagefright/OMXCodec.cpp

Change-Id: Id720c642b1d01ef4bf425380f9cfe613c6484937
Signed-off-by: Andrew Sutherland <dr3wsuth3rland@gmail.com>
libstagefright: Add NV12 Tile to RGB color conversion

- Adds support of NV12 Tile to RGB565 color conversion
using the qcom color convertor library.

Patchset 1: Add QCOM_HARDWARE ifdefs

Change-Id: I8f6fa92651b666376af514b46a5027f56492dd43
httplive/ACodec: Enable smooth streaming

- Use property to enable - hls.enable.smooth.streaming
- Set component in smooth streaming mode by doing a setParameter
  with OMX extension for SS
- Handle Port Reconfig Info event from component
- Whenever resolution changes do update buffer geometry on
  native window

Patchset 1: Add QCOM_HARDWARE ifdefs

Conflicts:

	media/libstagefright/ACodec.cpp

Change-Id: I694d05fe7aba2482f50f31a6e80b646822f15b31
libstagefright: return proper color format on target basis.

 Video preferred Color format is different for different targets.
Add a method to choose the preferred format for each target.

Patchset 1: Add QCOM_HARDWARE ifdefs

Conflicts:

	media/libstagefright/ACodec.cpp

Change-Id: Iba28d5d6e2917792492b3b2e9d38396d468f3202