Increase max screen recording time from 30 minutes to 1 hour

Change-Id: I37c22b08afea32e6b6a88c404ab78250b7a9f377
Increase kFastTrackMultiplier from 1 to 2

Change-Id: I158f147295eebcea96e4047d7618069bc48bdd7d
stagefright: add an extra buffer to ANW's BUfferQueue

Add an extra buffer to ensure video player has a free buffer to
dequeue rather than wait for the queued buffer to be displayed.
Enable logs to indicate number of buffers allocated.

NOTE: This is not needed for 30fps content on 60fps panel, But
making this change regardless for all framerates till root-cause
is identified in SF

Change-Id: Id1048d7a104b2a75613dda8b9cf166e59bc4bb04
Revert extra buffer hack.

 * Breaks too many things, and this is an awful hack anyway.

Revert "stagefright: Fix "add an extra buffer to ANW's BUfferQueue""

This reverts commit dbb2bb90acd47a53d84809b1aa150bac6093f752.

Revert "stagefright: add an extra buffer to ANW's BUfferQueue"

This reverts commit 2bce3e06f60a8d60c81261b0438d0cc6f2bbe7d1.

Conflicts:
	media/libstagefright/OMXCodec.cpp

Change-Id: I94ce8908f8f6c270d3421841c2aae2e5750092ea
audio: Modified API for compress voip formats

 - Modified API for supported compress voip formats.

Change-Id: I0165fc48bbe631d3febf2104e8a28708bf85ef23
audio: do not invalidate stream used by voip

During the process of invalidation of voip streams,
actual driver is not closed so when it tries to open again
getoutput fails as only one instance of voip can be created.
so do not invalidate the tracks used by voip driver.
CRs-Fixed: 494093

Change-Id: I42a962991ce1d586d87f4aecba19c0e5dde6b9dd
audio: Fix for OMXCodec::read() getting blocked

- Sometimes notification sound is not heard if it is played
  and stopped multiple times in a short duration.
- If OMXCodec::read() gets blocked for filled buffers while
  in pause, it never returns as mFilledBuffers is always empty.
  Due to this AudioTrack destructor never exits as it waits for
  the AudioCallback thread to unblock it.
- Ensure OMXCodec::read() returns even if timeout occurs while
  in pause and handle the same in AudioPlayer by returning zero
  bytes in AudioCallback.
CRs-Fixed: 478768

Change-Id: I2ca40a673fdf95bccc3069a18b694670612a9895
 audio: Fix framecount calculation in AudioFlinger

 -Sharedblock implementation expects the framecount to
  be round up to the next highest power of 2. This is
  not done in TrackBase for non-voip case which leads
  to shared block getting corrupted.
 -Fix is to round up the framecount in TrackBase for
  all the audio formats.

  CRs-Fixed:  571279, 573735

Change-Id: I0186bb0e04a080100b364aead447ff2fce495ca2
Audio: Tunnel Exception for AAC main profile format

- Audio is not decoding properly for some mp4 content

- ADSP audio decoders don't support aac main profile

- Added tunnel exception for AAC main profile format

Change-Id: I8470457492e32d94ab36eea7b97f4e4ec8776bb4
NuPlayer: Check if video input format is NULL

Adds null check on querying for video input format metadata.
CRs-Fixed: 582533

Change-Id: I3832de56f67bf8e6b4abb426c6e539dd66009fa5
libstagefright: Do not use offload playback for DRM content

- Check DRM handle before checking canOffloadStream.
  Do not use offload playback for DRM contents

Change-Id: I519ab05ffe7812968cccc7beaa16709959cf7a53
CRs-Fixed: 587600
libmedia: Increase offload shared buffer size

Ensure that AudioTrack and OffloadThread share at least twice fragment
size worth of buffer space. This helps avoid failure to restart
on an underrun

Change-Id: I4dd9e5e5a7c8aebb34b13f2e6626b73adc2ba557
Camera: Rotate display if app doesn't use setDisplayOrientation.

Third party application not following setDisplayOrientation
logic properly and as a result preview used to come inverted.

Fix made to track setDisplayOrientation call invocation and
if no call had been made then, rotate the buffers accordingly.

Change-Id: I9eac28396c4ce8844bf6a4f19ee7650a620ff4a5
CRs-fixed: 575558
stagefright: Cleanup ifdefs in pause code

Change-Id: I01ec529811c664fb90f7ccd23c2df561b5504f7c
camera: Handle the num-jpegs-per-shutter mode

 * M7 will set this value to 1, but set the number of burst shots to 3.
 * We need to call takePicture on the hardware a number of times before
   accepting the jpeg.

Change-Id: I169ee3139e8643a39133d7385afe2f88982a1612
FLAC coded file does not play (single metadata block files)

FLAC files which has the last metadata block flag set in
STREAMINFO were not playing. Sniff of FLAC is modified to
accomodate this set flag.

Change-Id: I76f216cc2cde6e10958324afbc704fc3e5a0e2bf
Author: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Signed-off-by: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 32421
Revert "stagefright: Cleanup ifdefs in pause code"

Breaks audio pause-resume on non-QCOM device. The code here goes
with QCOM-specific mPaused code in OMXCodec.cpp.

Also added one more ifdef to fix compile error.

This reverts commit f771dc65603c8d06865f08a1b88be60cb53e19dd.

Change-Id: I1ebf3d15cfb7bf5c92745e0ab88cffd7adf192a0
audio: Supress redundant effect config events in short duration

Distortion sound persists for the whole song when re-enabling effect in
LPA playback mode till switch to next song. And pop noise is quite obvious
when enable/disable effects in LPA.

As the design of LPA, EffectsThreadEntry() loop is used to handle effect
config changes through applying effects with new config on dsp pcm buffers.
However, it can't handle too many config change events in a short time,
and effect with new configuration will be applied on part of dsp buffers.

Filter out redundant effect config events that come too closely to avoid
applying effect on dsp buffer in vain.

Change-Id: If8915b1d068724d5976e1519ec57e3c08cf89c9d
CRs-Fixed: 562806, 563418
libstagefright: Add HEVC as a recognized MIME in ExtendedExtractor

For HEVC playback through ACodec, ExtendedExtractor needs to recognize
the HEVC mime type and set the appropriate role to the component.

Change-Id: I60e05f4f1e480e137401112431c5c8093e637d56
audioflinger: Fix for a deadlock

AudioFlinger enters a deadlock (with itself) on trying to free a
RecordTrack object that failed initialization. Clear this
bad object from the caller instead.

CRs-Fixed: 589020
Change-Id: I926f2beb922a70f6924e593e2bbf1a5b5df85b16