ExtendedCodec: update amrwb+ format parameters

- Add new API to update channel count and
  sample rate of Amrwb+ format.

CRs-Fixed: 631469

Change-Id: I46d2f219a13f3edf49ac0e7a8d098ca96bcd22a2
ExtendedCodec: update amrwb+ component input/output ports

- updated sample rate and channel count of amrwb+ input
  and output configurations

Change-Id: I1a0412ed402e8d58f1db5422c904e18a51fb5965
CRs-Fixed: 631469
libstagefright: Get rtp port range and cache size from system properties

- Operators require setting rtp/rtcp network port range and cache size.
- Parse rtp network port range from persistent system property
  "persist.sys.media.rtp-ports".
- Get cache size from persistent system property
  "persist.sys.media.cache-params", in order to store the value.

Change-Id: Ie044682c422d71f018e509a89a19d976f313e27c

Conflicts:
	media/libstagefright/include/ExtendedUtils.h
stagefright: Cleanup legacy stuff

Change-Id: Ic87e66939424a23ea589822b4d4e122296d5b20c

Conflicts:
	media/libstagefright/AwesomePlayer.cpp
libstagefright: Add the conditions to ignore seek and allow sink stop

 -If app issues the multiple seek request to EOF position, player EOS
  gets delayed and app does not move to the next clip.
 -Seek interrupt the sink stop issued at EOF, hence delay in EOS.
 -Do not skip the sink stop if renderer position is EOF and ignore
  seek if seek time is same as player position.

Change-Id: Ic313eabfb738201b6b516555051a7a65c2bf8de2
CRs-Fixed: 667151
libstagefright: Fix for ANR in streaming during seek

In seek, OMXCodec sets state to FLUSHING and if it
gets EOS during seek then the state will remain in
FLUSHING state. OMXCodec stop will happen only in
ERROR, PAUSING and EXECUTING states. Hence solution
is to set mState to EXECUTING after flushing completed

CRs-Fixed: 664381

Change-Id: Ie6f65175ce66ea6973465b68d31e4f82354ea9a9

Conflicts:
	media/libstagefright/OMXCodec.cpp
CameraService: Change order of client declaration and service lock.

Camera service lock has to be acquired after client declaration.
Otherwise, deadlock can occur when client destructor tries to
acquire service lock when its already acquired.

Change-Id: I21757325b3cbfdd5ca52c7becdfaa34ffa5bc768
libmediaplayerservice:Fix deadlock on gapless start failure

Issue:- Current gapless implementation starts the next clip when
MEDIA_PLAYBACK_COMPLETE event for the first clip is recieved
by MediaPlayerService.
-Even if start for next clip fails, application is notified with
MEDIA_INFO_STARTED_AS_NEXT.
- This causes the framework to trigger mediaplayer start which
again fails as it being for the same clip resulting in a deadlock
in the mediaplayer.
Fix:- Notify application with MEDIA_INFO_STARTED_AS_NEXT only when
start for the next clip is successful.

Change-Id: I77c570074c7c98c996122e275161ba88298e56fc
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
libstagefright: add timeout to avoid blocking readAt function call

- this patch is to fix the corner case in the patch "Fix ANR issue
  in HTTP Streaming". The related change Id is
  Ief280b7e23727606746e1ca2bf4caa4a3044b7bc. In this corner case,
  onFetch is blocked on fetching data from network, and onRead on
  the same thread has no chance to be called. As the result, readAt
  is always waiting for the notification in onRead. It caused to
  block the other related function calls in AwesomePlayer.
- add the timeout in readAt function
- add the generation ID for checking whether onRead runs by the
  outdated message

Change-Id: Idb8942c6cff245c63e826792fffb46586a401a70

Conflicts:
	media/libstagefright/NuCachedSource2.cpp
	media/libstagefright/include/NuCachedSource2.h
libstagefright: Keep LOOPING/AUTO_LOOPING flag during teardown

-LOOPING/AUTO_LOOPING flag is cleared during audio teardown process,
 then stream can only be played once which is not expected
-copy the previous looping flags and restore them after reset_l()
 is called

Change-Id: I4435d2b1d4d82efb235fc8099efa7d9f3d6af2d2
CRs-Fixed: 681711
DO NOT MERGE: Fix for SW video decoder OMX profile/level query

get the correct profile index from the input param and pass it to
profileLevel array to get the corresponding profile/level

Change-Id: I582961c0afb53c1781af7fb94226a23e5fdb96cf
Signed-off-by: Xiaosong Wei <xiaosong.wei@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Fix buffer allocation

b/15293123

Change-Id: Icb3ceabf02a55bc931baaf388ce125db6332de0e
Camera: Update MemoryHeapIon

* Update from ODROID-XU 04212014 BSP

Change-Id: Ie5b1ff89c2552b58d342b28ca0154c00bb150d39
libstagefright: Fix wrong ifdef

Change-Id: Ic99d95bd1d19036712f422a8c1f673bda15e2964