libstagefright: Set initial buffer size for H264 codec

For Google h264 decoder, the input port buffer size is
set to 8192 bytes, and for usecases where data source
does not specify input buffer size, there is a crash on
assert when the buffer size is larger than 8192 bytes.

Added change to set input buffer size for H264 to 80k.

Change-Id: I5bc177cc5078b2acfc930ee2746960dc26ab9662
stagefright: OMXCodec: free allocated port-buffers if init fails

If an error is encountered while allocating port buffers, init
would fail and buffers already allocated would not be freed.
Move OMXCodec to ERROR state and explicitly stop omx component,
hence forcing free-ing up of allocated buffers.
Also defer setting port-status to ENABLED only after having
moved the component to IDLE and add graphicBuffer to port-
buffers-list only if setBuffer is successful.

Change-Id: I54ffb2a299376bf1716473e94948c36648d24b92
CRs-Fixed: 610702
NuPlayer: Fix parsing RTSP play response from special server

- In some non-standard server, a different play response will be returned,
  which will cause CHECK failure
- Change in parsePlayResponse(), to get the current track index

Change-Id: I467e3000732cf1506095b17dc29eed25e6701150
CRs-Fixed: 621854
stagefright: Omit audio from timelapse recording use-case

Timelapse recording is only valid for video encoding, but audio
is subjected to the same infinite wait. This can result in an ANR
if encoded data is not being produced. Only wait forever in video
use cases.

Change-Id: I37d34c2235d110dc8954b66d830891fdccc50c0c
frameworks/media: Fix aliasing violations

Change-Id: I0c3ad4d935abe6cf6df222f7d70381d868f15fe8
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
downmix: Fix aliasing violation

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
EffectVisualizer: Fix aliasing violations

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
frameworks/av: Fix build in ISO C++ 11 mode

Fix build in ISO C++ 11 mode: constructs that are being interpreted as
new string literals and const vs. constexpr

Change-Id: Ibdf4867da37b819b1a499180edcf7ad480b6b9de
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
av: More ISO C++ 11 fixes

Change-Id: I84bfab66d561cb0ded6e312b8cfe02e5fe2a182f
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
av: Fix build in ISO C++11 mode

Change-Id: I461d8ce5b24afedee245a6441b600df286c76b63
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
av: Fix compile errors

Don't use memcpy() on areas that may overlap
Fix aliasing violation

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
libstagefright: audioflinger: use no strict aliasing for now

Change-Id: Ie16c84cd63418800953ee8105b0dc338d87e8aa5
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
libcameraservice: Fix build in ISO C++11 mode

Change log macro define so it can't be confused for a C++11 string
literal

Change-Id: Idcc8085735177aa3313fdea66dc0736cca749f9b
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Use -fno-strict-aliasing

Change-Id: Ib54afe176a6c86086d84970e3e5e549e64293345
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Use uint16_t instead of char16_t (C++11 compliance)

Change-Id: Iaf99c9b38e367e94642883fe4c05ab0bdce46b7e
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Fix aliasing violations

Change-Id: I49035dbf5d95afb90345daa97dd21048ee458ba3
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Revert "Use -fno-strict-aliasing"

This reverts commit 7f64e04f5749ef1def5088ace04094f9be088b5f.
Fix aliasing violations (properly)

Big ups to Haruki Hasegawa for the 4.3 equivalent:
	10d8e90 - frameworks/av: Fix Visualizer's get/set parameter methods not worked bug

Signed-off-by: nuclearmistake <nuclearmistake@gmail.com>
Change-Id: Id914f57700c21b8fa2dc4c2ca3b1c8872bf31256

Conflicts:
	media/libmedia/Visualizer.cpp
frameworks/av: Fix Visualizer's get/set parameter methods not worked bug

This commit fixes broken Visualizer's get/set parameter methods.
The bug was introduced by modifications to avoid complilation errors.(*1, *2)

  (*1) Commit ID: d64a966f40b05f514312291b2e43b6e7c475845c

    frameworks/media: Fix aliasing violations

  (*2) Commit ID: 350adb3460dfa29eac5e34c3e2a90cf5011ce3d4

    EffectVisualizer: Fix aliasing violations

Change-Id: I5fcef8d958108bf442b96d7726069f82ffbfe49c

Fixed strict alasing bug

Change-Id: I62d5d7efd0ec332b0f58bd12811f88d36aff6eba

Conflicts:
	services/audioflinger/Effects.cpp