media: Add Ops check before starting audio recording.

Confirm user permission before starting audio recording.

Change-Id: Ia4e6d8fb6986d4e73fb656ba0efaf42c210e92af
OMXCodec: Only set B Frames for QC components

Conditionally set B frames for Qualcomm components only instead
of for all components.

Change-Id: Ib626a6a4fb613874d17e78420ef2ca4684ac1c89
libstagefright: Fix DP Parsing issue with mpeg4 SP,ASP

- DP partition logic returns true for mpeg4 clips with SP ,ASP
  profiles.
- Fix the issue by parsing additional fields in the ESDS atom

Change-Id: If09ba4185b873985945ca44ac755a3ccf8858e0f
libstagefright: notify updated stride to NativeWindow for DRC

Notify updated stride after resolution switch to NativeWindow
to re-interpret the buffer layout

CRs-fixed: 534910
Change-Id: I2886e7900003c9a5705afa60c28becd4d437f95e
frameworks/av: Fix a/v sync issue for playback over BT

-Audio and video are out of sync when a video is played/streamed
with a BT headset connected to the target.
-AudioTrack does not consider the BT latency.
-Latency of the BT stream added to the existing latency.

-query for tunnel mode latency
-During tunnel playback, we need to offset latency for audio plaback
 on BT devices by querying BT HAL.

Change-Id: I3142d8d70f1adaa6e7f5e37c812b13f69a84282a
libstagefright: Fix issues when checking mpeg4 dp clips

- start_code_offset is the unsigned integer. When it is
  assigned with -1, it is actually greater than zero.
- use another flag to check whether the buffer starts with
  VOL_START_CODE

Change-Id: I18737aeb90fbaf21489fe81038be6968ecaca976
CRs-fixed: 536026
libstagefright/omx: Fix observer died logic.

- Handle freeNode when the component is in OMX_StatePause.

Change-Id: I3bae2015c57b932186069756490c9bdf1f93eea4
libstagefright/omx: Fix CallbackDispatcher dereference in callback.

    - findDispatcher can return NULL. Check for NULL.

Change-Id: I07edc427b706dfdeec6a6f90f13d00c8941e77f2