libstagefright: Disable multi slice mode

- Disable multi slice mode video encoding for all
  targets

CRs-Fixed: 573731

Change-Id: I5087cbd2b2932b08e2c663be25104d82fc766ad4
nuplayer: Fixes in nuplayer Renderer

- Fix in AV sync calculation for video only stream's pause
  scenario

Change-Id: Ie4fae760ca485ee21121cf4018a62d5d86eacb57
libstagefright: fix force close issue when mute MPEG4 clips

- Forgot to get ESDS when convert message to MetaData for MPEG4 decoded
  clips
CRs-Fixed: 600462

Change-Id: I2e73f42b641b0224cdf37a81fee611e9856235f0
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: Fix AV sync issue for cached audio sources

Non-HTTP sources may continue to fetch audio data after video has
already seen a seek request causing audio to run ahead. When video
sees a seek request, audio should pause, resuming once it too has
handled the seek request.

Change-Id: Iddbf3d79f29bbe8bcdb4b07338c4a00734acd8e2
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
libstagefright/omx: Fix logic to handle dead observers.

  OMXNodeInstance freeNode tries to tear down OMX component
  if not in OMX_StateLoaded. It handles all other states except
  OMX_StatePause. This change adds OMX_StatePause handling.

Change-Id: I3bae2015c57b932186069756490c9bdf1f93eea4
libstagefright: Copy the entire buffer from/to OMX component

Presence of OMX extradata in buffers isn't reflected as part of
nFilledLen.  To avoid omitting the extradata, copy the entire buffer.

Change-Id: Ib310dda3dc93693d4ab380912a9997d7ea120be1
libstagefright: Fix for crash in sound recorder during device switch

 -Crash seen in sound recorder during frequent insertion and removal
  of wired headset

 -During device switch some time Codec's input buffers are too small to
  accomodate buffer read from source. Omx codec doesn't read the fix size
  buffer from source, during device switch scenario sometime buffer read
  from source exceeds input buffer size so it goes in error state which
  leads to crash.

 -Increasing the input buffer size fix this issue

Change-Id: Id15378670880d0c3c0bd4408841b28be963549a0
CRs-Fixed: 488449
audio: init rc to avoid effect's fault state

Effect command doesn't necessarily fill cmd return code into &cmdStatus,
so we should initialize cmdStatus to avoid uninitialized value propagates
to upper stack caller.

Change-Id: I5694616c9d3d66071241958f54a03b8d3b9d881e
libstagefright: Use channel count if channel mask is zero.

-If the channel mask which is part of the meta data is zero use
 a valid channel count to update the channel mask.
-PCM offload playback for wav clips fails for some clips because
 channel mask part of the wave header is zero.

CRs-Fixed: 664374
Change-Id: I1bd5f2cc56fbc1eb9a6e04d219185690d3ce409c
AwesomePlayer: post seek complete if seek cannot be handled

If the extractor says SEEK isn't supported, notify SEEK_COMPLETE
immediately.

Change-Id: I8b899c901b7eae3d6d437829a29672fc676c2560
CRs-Fixed: 630590
MediaProfiles: Use 2160P as 4K profile instead of 4K-UHD

to keep it consistent with upstream nomenclature.

Change-Id: I525ab449f71080f11aa0fe37fedbe95f36bcae91
stagefright: add rendering statistics

 - adds extra fps statistics
 - report via dumpsys
 - prints statistics before reset at the end of playback onto
   logcat
 - adds resume latency, from play_l to render
 - adds seek latency, from seek_l to render
 - enables using persist.debug.sf.statistics 1
 - prints all statistics when seek or resume is issued

libstagefright: print seek statistics even when paused

 - if seek is issued during paused state, SEEK_PREVIEW flag is set
   and statistics needs to be printed even if that happens.

add 64-bit compatibility

Change-Id: Ibba66a03f1290fef7c1cfeb7d400d1faf1a7a00d
audio: update enums for extended format/encoder

- Update enum for EVRC/QCELP/LPCM format/encoder
  These values need to be updated with MediaRecorder.java

Change-Id: I0b1950b5e779f5a7ab08ab3f6734d284eb8852d6
Conflicts:
include/media/mediarecorder.h
CameraService: Adds support for longshot mode

- This change introduces additional functionality inside
  CameraClient for supporting continuous compressed data
  callbacks. This is needed for 'Burst/Long shot' mode
  where we could have indefinite number of callbacks after
  capture is triggered.

(cherrypicked from commit e4f502aa7cbe8875e8a1589024cdcf227c228a2b)

Change-Id: Ia18ca9bdda7736c679db557e510870115089537a
CameraService: Bump up the maximum number of cameras

 Currently at maximum only two cameras will be
 advertised by CameraService layer. If we need
 to support multiple CameraHal implementations
 (HAL 1.0 vs. HAL 3.0) at the same time, then
 this limit needs to be updated.

Change-Id: Idc9d72da2eecfc2080dcc3f362d3939cebbd17eb
Camera: Add support for preview frame fd

-Add support for receiving dataCallback with fd/buffer as frame buffer

CRs-fixed: 654901
Change-Id: I5c16e560f1e209a6ab4afa4f3437602b02992b9b
libstagefright: Use QC MP4 parser

Use QC MP4 parser by default for HEVC codec type. Incase
codec is HEVC don't add extra start code.

Change-Id: I26bab4208167b58166eea3756651e1113028057b
camera: Remove cameraservice dependencies from CameraHardwareInterface

Include the static utility function to filter the errors as part of
CameraHardwareInterface instead of CameraService

Change-Id: If3c19f7b72615f3d7c7f6ff0f8bd1b9a66ef151a