stagefright: add missing QCOM_HARDWARE cflags

Change-Id: Ie3bd1fded5dee10868459c9ad129d9dffad6d1e7
Revert "libmediaplayerservice.so hack to allow camcorder to load with current setup"

This reverts commit 3e3b9d41e4b000d1401ee56b39c47a7bf0296481.

Change-Id: I27f9b156bc0894c24bd3706f0d79a88afe02e66b
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>
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: 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>
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: 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>
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
libstagefright: Add support for fragmented MPEG4 container

- Stagefright parser dosent support parsing fragmented 3G2 clips
- add support to used mm-parser to parser fragmented 3G2 clips

(cherry picked from commit f1eb550a11bdc2a4534a89764f8c42008add90ae)

Change-Id: I9afcbd144dbbd50218b5ad8733b07d6c73f5f4d7

Conflicts:

	include/media/stagefright/MediaDefs.h
	media/libstagefright/MediaDefs.cpp

Signed-off-by: Andrew Sutherland <dr3wsuth3rland@gmail.com>
framework\base:: remove decrypt handle

Decrypt context will be created directly in decoder so remove the code
that was used to copy the decrypt context pointer from parser.

(cherry picked from commit 5bb0aa03232513255ee22607f6995040a6b19cb7)

Change-Id: I01e540a0c28f0039f037a5045b4b1da78c12550c

Conflicts:

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

Signed-off-by: Andrew Sutherland <dr3wsuth3rland@gmail.com>
libstagefright: Change allocation buffer count for VideoEditor

- OMXCodec: AllocateBuffersOnPort: Add a check to allocated
  minmum buffer count for encoder, min + 1 for decoder input
  and min + 2 for decoder output

Change-Id: I483cbe0587b76b0c029e11054eda666e548c2b63

Conflicts:

	include/media/stagefright/OMXCodec.h
libstagefright: Enable frame by frame mode

- Enable frame by frame for all formats - local playback & http
  streaming.
- Arbitrary mode is enabled only for specific formats by setting
  a new key (kKeyUseArbitraryMode) in extractor, for following
  formats :
  - H264 Interlaced clips
  - VC1 Advance profile clips
  - MPEG4 in AVI container
- If the arbitrary mode key is not set by the extractor, it will
  default to frame by frame mode for all video clips except
  interlaced clips.
- Adds SPS parsing functionality.

Change-Id: If8c47d0499720eead86b4c4fbe74696aba4423fb
CRs-Fixed: 322872

Conflicts:

	include/media/stagefright/OMXCodec.h
	media/libstagefright/OMXCodec.cpp

Signed-off-by: Andrew Sutherland <dr3wsuth3rland@gmail.com>
libstagefright: Crop the native window with the display resolution

We were providing the native window with the display width and height in
set_geometry.  On the surfaceflinger side, they assume that this is
aligned, which causes problems for HDMI.  Instead we'll now pass in the
aligned stride and slice in native_window_set_geometry, then specify the desired
display width and height by calling native_window_set_crop.

Change-Id: I9b9a910e951468bdeb30f3f8ea9df70f3c2ad00a
CRs-Fixed: 283063

Conflicts:

	media/libstagefright/OMXCodec.cpp

Signed-off-by: Andrew Sutherland <dr3wsuth3rland@gmail.com>
libstagefright: Add interlaced video support

Stagefright waits for the Index Settings changed event to be propagated
to it from the component. If interlaced, appropriate flags are given to
the native window.

Change-Id: I240c5139232c6905c3de7632885736147d5f70b1
(cherry picked from commit ce070db0c8d491218adb9a8386116d39909813e9)

Conflicts:

	media/libstagefright/OMXCodec.cpp

Signed-off-by: Andrew Sutherland <dr3wsuth3rland@gmail.com>
libstagefright: Fix for crash during playback of unsupported clip

-Crash in media server observed during playback of unsupported clip
-The OMX_EventError not handled properly in SF IL client leading
to crash as i/p buffers and o/p buffers are not freed.
-Shutting down the i/p and o/p ports when OMX_EventError is
received with state OMX_ErrorInvalidState. In error state,
free i/p and o/p buffers on receiving empty buffer done and
fill buffer done messages.

Change-Id: I6d2b7b659b5f424b9fc5d668e47f2a9d51b49314
CRs-Fixed: 331572

Conflicts:

	media/libstagefright/OMXCodec.cpp

Signed-off-by: Andrew Sutherland <dr3wsuth3rland@gmail.com>
libstagefright: Set high frame rate encoding flag to 0 by default

- Set the hfr flag to be 0 by default
- Do not crash if the meta contains no value for kKeyHFR

CRs-Fixed: 332372
(cherry picked from commit 6712b25b7e600cf29e2940fa61ec5bacf4f1c879)

Change-Id: Ie6cfa21f3df2114dee335b70412f1239cf6376ec

Conflicts:

	media/libstagefright/OMXCodec.cpp