stagefright: Fix the build

 * Update for API change

Change-Id: I8493c14ee51fd40a7a0d3995ecd32f4392fdd858
camera: Fix inclusion of CameraParametersExtra.h

* Needs to be enclosed in "" in order to be properly picked
  up from device path.

Change-Id: I5deddb0dead4e7694d400078a58c4774961d3240
Revert "libstagefright: Add support for HW AAC decoder"

- This reverts commit 146757db52a6531b90404b478d12f277f9cd39c9.

- On PDT tetsing crashes observed due to improper selection
  of multi aac decoder without setting system property

- As multi aac decoder using only for ISDBT case, reverting
  this gerrit to unblock PDT testing till root cause for crash
  is identified.

Change-Id: I1c195bb9150199ae71c686081d75bbb7653fa8fe
stagefright: ExtendedUtils: Correct codec config allocation check

Fix incorrect NULL check to use the proper variable name.

CRs-Fixed: 752762
Change-Id: I5aaed3f12b8cb61dd362c575e7ff1aad51daecce
libstagefright: httplive: Add NULL check for empty playlist

If the source playlist is empty, the playlist meta will be NULL.
Check for this case to avoid an invalid dereference. Also flag
playlists without the required EXT-X-TARGETDURATION tag as malformed.

CRs-Fixed: 736089
Change-Id: Idf74d890a89bbc6483a6d4060eb092dc7461be24
stagefright: fix for Executing state in resumeLocked

- When resumeLocked is called in Executing state, do
  nothing and return OK to avoid additional state change
  to Executing.

Change-Id: I015ad098d4efd480c1628598f519e96a16537f6e
CRs-Fixed: 740435
libstagefright: Remove parsing deprecated quirk

Remove parsing deprecated quirk "defers-output-buffer-allocation"
in OMXCodec.

Change-Id: Ib9f40f17f927c6af237969ee111bfd74bd63b3fe
audio - Query midi decoder state after stop()

 - On midiplayer stop, mState was not updated correctly
   hence when isPlaying() returns true to application.
 - Fix is to query midi decoder state after stop() so that,
   isPlaying() will return false after midiplayer.stop() to
   application.

Change-Id: If1e260e93da1712873b8419b611abe3206dd0f47
CRs-Fixed: 633774
libstagefright: Fix crash in FLAC decoder during fallback to sw decode

- Playback of FLAC clips fail over A2DP when PCM offload is enabled.
- As offload is not supported for A2DP, playback falls back to software
  decode during which the source (FLACDecoder) is stopped and the
  buffers allocated to the decoder are freed. These buffers are not
  re-allocated before attempting to decode data due to which
  the decoder crashes.
- Allocate memory while starting the decoder instead of allocating
  it during initialization.

CRs-Fixed: 743183
Change-Id: I05d9d2328ac8b959ae112699475d80556a4738b5
GenericSource: Aggregate fewer audio i/p buffer for http streaming

Aggregating huge audio i/p buffer in streaming use case will cause
delay in fetching video i/p buffer and starving video decoder which
will eventually causing frame drops. In case of clips with abnormal
a/v interleaving, audio and video offsets can get too far apart
causing frequent underrun and staving both A/V decoder resulting
in choppy audio and video freeze.

To avoid this issue aggregate A/V buffer similar to  widevine
use-cases, reduce the audio buffer count to 8 and add an extra
video buffer.

Change-Id: I0afdbe11a1e427bd63a10f5cd874dbf6d102e6ab
frameworks/av: Integrate STAProxy for httpstreaming

Added support to integrate STAProxy support in httpstreaming

Change-Id: I72a531b254fa06f2dd22cdbfd9d102f741d4f092
frameworks/av: Integrate STAProxy for NuPlayer httpstreaming

Added support to integrate STAProxy
support in httpstreaming through NuPlayer

Change-Id: I544d8c2620a8da0fbfc7e4a15f64641145d77ccf
media: Add NuPlayer, recording stats using ExtendedStats

Add Statistics for NuPlayer using PlayerExtendedStats.
Add Statistics for recording using RecorderExtendedStats.

Change-Id: I613bd2d44a25315297294abb87aeec2634d30c36
DataSource: Remove global variables in DataSource related to sniff

Remove global variables related to sniff, and added Sniffer class
to implement the sniff functionality with non-static members.

Change-Id: I6fbd0ba5b686e09fda11d78cdd687a69c81a6bdf
CRs-Fixed: 567753
hls: Print segment information in PlayListFetcher

Enable printing the segment information in PlayListFetcher
and remove the print in LiveSession.

Change-Id: If2a872a1e7f82c3bedf81748b13ddf4d19589428
NuPlayer: Add RTSP Server Timeout Setting to Meta Data

- Operator requires MoviePlayer to prompt dialog when the activity has been
  paused for longer than server timeout. This patch adds server timeout
  to meta data, so app can get the timeout value.

CRs-Fixed: 638087
Change-Id: I08f98e965497047c420d9d6ecc0b2898abe56369
libstagefright: Instantiate FLACDecoder at runtime

Remove the entry corresponding to FLACDecoder from
media_codecs.xml and instantiate it in OMXCodec for
mimetype "audio/flac" at runtime.

Use Google's RAW decoder to support ACodec path as
FLACDecoder is not OMX compliant.

CRs-Fixed: 749235
Change-Id: Ia8842256d00dd53293335535d3b03a3beffb13aa
audio: use FLAG_FAST for non-music stream on WFD

- Issue: WFD audio routes back to target speaker when
  starting a ringtone playback. Music and ringtone playback
  is mixed on target speaker. Expected behavior is music
  plays on WFD sink and ringtone plays on target speaker.

- Root cause:  primary output is created for music playback
  over WFD. The same primary output is reused for ringtone
  and output device is updated based on SONIFICATION strategy
  for both ringtone and music playback.
  The same issue is not seen on stock Android solution because
  two different HALs(remoted_submix for WFD audio and primary
  HAL for ringtone) are involved and primary output is not reused.

- Fix: update output flag to AUDIO_OUTPUT_FLAG_FAST when there
  is a non-music stream playback on WFD. So primary output is not
  reused for SONIFICATION strategy.
  Use AUDIO_EXTN_AFE_PROXY_ENABLED instead of WFD_CONCURRENCY to
  compile related code since WFD_CONCURRENCY is not enabled for
  all targets.

Change-Id: Id2f5965c8f5623646b2adb2aa892a9929f3bc5bb
CRs-Fixed: 745667
audioflinger: exclude channel check for offload thread

When moving effect chain between two playback threads, there's a
channel count check for stereo only. Such check only applies for deep
buffer playback where we upmix or downmix all channel count to stereo.

However, this constraint is not applicable for offload threads.

CRs-Fixed: 745226
Change-Id: Iaa16ddef1c19bf8b1c600e8bdb1ee1568a3a45db
audio: compress offload to pcm fallback on SSR

- Add support for error propagation on
  time stamp query for playback session

- Add support for compress to pcm fallback
  during SSR

Change-Id: I4fa793de95bfe58cde7a05735d8f70a672ea19fc