Fixed sample video corrupted in MediaCodec mode.

Change-Id: I50c5660072d40f6e297e58fd026ea04c89d6a70a
related-to-bug: 6732061
Merge "Fixed sample video corrupted in MediaCodec mode." into jb-dev
merge in jb-release history after reset to jb-dev
merge in jb-release history after reset to jb-dev
Merge branch 'jb-release' of https://android.googlesource.com/platform/frameworks/av into aosp
CameraService: Adds support for burst compressed images

Depends on:
  - http://review.omapzoom.org/#/c/24537/
  - http://review.omapzoom.org/#/c/24538/

Change-Id: I1f17675b2854793de83c2b7cdecafc039c46f355
Signed-off-by: Solaiyappan Saravanan <saravanan.s@ti.com>
Signed-off-by: Emilian Peev <epeev@mm-sol.com>
Signed-off-by: Daniel Levin <dendy@ti.com>
Add CAMERA_MSG_RAW_BURST handling to CameraService

Change-Id: Id958836e726e9908f60311d5bfc6d26eb8298cea
Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
CameraService: Disable capture message types before stopping preview

If we try to stopPreview in the middle of capture, these
callbacks might occur. In this case, stopPreview will already be
holding mLock while the message handler will try to grab mLock.
Deadlock occurs if the stopPreview and message callback dependencies
are in the same thread.

Issue reproduced with Image Capture/Home Key scenario.

Port from GB: Issue is still reproducible (although extremely
              rarely) in ICS.

Signed-off-by: Emilian Peev <epeev@mm-sol.com>
Signed-off-by: Jean Johnson <jean-johnson@ti.com>
Signed-off-by: Daniel Levin <dendy@ti.com>
Change-Id: I222d00f8bd69c11302a35610095efe0ddc49f876
Merge "CameraService: Adds support for burst compressed images" into jellybean
Merge "Add CAMERA_MSG_RAW_BURST handling to CameraService" into jellybean
Merge "CameraService: Disable capture message types before stopping preview" into jellybean
frameworks/av: Syncronize resume and onPauseTimeOut

- All the mixer controls are closed 3s after pausing playback
through the onPauseTimeOut function
- A scenario where onPauseTimeOut is closing mixer controls, a
resume is issued, causes a crash
- Synchronize these 2 functions using a mutex to prevent
concurrent execution.

Change-Id: I850452f4d38d05cfa92ca4690a665b8e64170a49
CRs-Fixed: 398948
audioflinger: Add support for post proc effects in Direct Track

Change-Id: I3434bfdf300f18a4d3ac6e7de3e7c7c76a6619c1
Merge "frameworks/av: Syncronize resume and onPauseTimeOut" into jellybean
Merge "audioflinger: Add support for post proc effects in Direct Track" into jellybean
libmedia: Fix build on non qcom hardware.

Change-Id: I3eca4d5612785bbdb3dc4d23fca4f96280b34461
libstagefright: Fix for clips getting skipped during playback

-mLpaInProgress gets set to true for non-lpa mp3 and aac clips and
is never reset as LPA destructor is never called. Due to this, next
clips which require hardware decoder get skipped. Same scenario is
observed if a lpa clip is skipped.
-Fix this by making mLpaInProgress true only for LPA clips. Also
reset this variable always to ensure no issue is seen if lpa
clip is skipped.

Change-Id: I54c37d8c8ca7b48c67d7b173399f88c8d3b4e059
CRs-Fixed: 401725
libmedia: Fix for LPA audio loss issue

-LPA playback has no audio if next clip is selected and immediately
paused.
-DirectTrack write is called after pause that makes mActive true.
Due to this, start to DirectTrack fails to reach below layers as
mActive is true. Hence no audio is heard.
-Remove mActive being made true in DirectTrack write call.

Change-Id: I2faf5a41a91f077fce9cfd8e773ceebb69e55bbb
libaudioflinger: fix crash in LPA effects due to multiple tracks

- In gapless playback, the next track is created before the previous track
  is cleared. During this time, the effect chain is associated with the
  previous track
- If the next track is LPA, that track is not able to acquire the effect chain since
  the effect chain is associated with the previous track. This results in a failure
  in the creation of LPA track and hence a crash.

Change-Id: I8e3756f61fdb4401757317a92991888a369a4a6a
(cherry picked from commit d342a699a580d8ffe94416c59e1dc2c5321b8c4e)
Merge remote branch 'upstream/jellybean' into jellybean