AwesomePlayer: Fixed average fps calculation

 - first statistic frame was taken at first frame rendered, causing
   short videos to have inaccurate average fps reading
 - removes the first statistics frame from the total number of stat
   frames

Change-Id: I0d359fa418ca86ba4ca798f2c1e41dc770662d63
CRs-Fixed: 325195
libstagefright: Send flush on both i/p and o/p ports together

- ANR occurs in music due to race condition in OMX component if
  flush is issued separately for i/p and o/p ports as DSP only
  handles simultaneous flush on i/p and o/p ports.
- Sending flush on input and output port together for AAC, WMA and
  MP3 audio formats.

Change-Id: I8dcc1e5fdfda0d93a7b3f208664c9ae3091d7349
CRs-Fixed: 327474
framework/base: Pass proper input buffer size

- Incorrect input buffer size is being sent while
  creating AudioRecord. Made correction to pass
  proper input buffer size.

Change-Id: I4af50463a19265a7e7085e754fa17c443e09aa84
frameworks/base : Fix to play a specific Mp4 clip.

-Unable to play a Specific Mp4 clip.
-Mp3 playback is stopped if the Decoder errors out with SYNCH_LOST_ERROR.
-Ignore the frame with SYNCH_LOST_ERROR and play silence instead.

Change-Id: Ib7bb0a062ffdfe4b886531e38a1fb7f612333b92
CRs-Fixed: 327828
Revert "framework/base: Pass proper input buffer size"

This reverts commit 7c9cb11fd1295c7923bbffec5abc17eac6e6b020.

Revert the patch to fix b2b camcorder recording.
CRs-fixed: 328322

Change-Id: Id65389dcf99f58bcff1b5dd1867652d47b5b3985
libstagefright: A particular MP3 clip does not play completely

  -- MP3 frame gives a side info error.
  -- Modified decoder to recover even after side info error.
  -- The error frame is skipped and rest of the file is played.

Change-Id: Id9c54969ee02ffd61b101250eae085b912b4256f
CRs-Fixed: 327840

Conflicts:

	media/libstagefright/codecs/mp3dec/SoftMP3.cpp
httplive: Fix in handling seek & update logging

- Dont download next segment until seek is complete
- Enable BW related LOGI messsages, also print URL that
  is currently downloaded.

Change-Id: I77f68ebbe220f358db00b3928d00eca5c74fa107

Conflicts:

	media/libstagefright/httplive/LiveSession.cpp
frameworks/base: Fix for video playback failure in browser

- Issue: After camping the Signal to 3G network, open the browser
  and go to www.youtube.com and play any video. Video playback is
  failing after trying to load the video for few seconds. Browser is
  coming back to video's list.

- Cause: At the beginning of playback, as there was a seek request
  pending, seek is done before starting the AudioPlayer. After
  AudioSource seeking, AudioPlayer start is called with OMX in PAUSED
  state, causing assert check fail for OMX state.

- Fix: Call AudioSource start before calling AudioPlayer start, so that
  OMX moves to EXECUTING state.

Change-Id: I4e746bf0b5167d4998fd900bbce3966a2dc1273d
CRs-Fixed: 327929
libstagefright: Use proper mangled name for color convert API

- Use proper mangled name for color convertor API
CRs-Fixed: 329591

Change-Id: I06d9c54faf072f5beadb25d2234206bb2803626b
libstagefright: Add support for High Frame Rate Encoding

Based on kkeyhfr key value from meta data, add support in OMXCodec and
MPEG4Writer for HFR mode

Change-Id: I2fe0780865bd01451bf8e77acf028b498c1c9f28
libstagefright: return proper color format on target basis.

 Video preferred Color format is different for different targets.
Add a method to choose the preferred format for each target.

Change-Id: Iba28d5d6e2917792492b3b2e9d38396d468f3202
libstagefright: Add support for Ittiam SW codecs

Change-Id: I70b36c361af97279288a5a81111b4b0919421d5a

Conflicts:

	media/libstagefright/OMXCodec.cpp
libstagefright: Use 64 bit types for variables

- Change data type of a variable from off_t to off64_t
- This is needed to allow playback of clips with size > 2GB.

Change-Id: Id3af4c6590802346f5f2328b1bfe09f196b8e273
CRs-Fixed: 329320
libstagefright: Fix HFR crash in MPEG4Writer

From ICS, for video kkeyframerate is used instead of kkeysamplerate. This
needed correction in MPEG4Writer.
kkeydecoding timestamp is used for sending the decoding timestamp. The
decoding timestamp had to updated for HFR.

Change-Id: I194a218b00ffcd41b1646a0c29c26a7a8f87e819
libstagefright: Set AAC Input buffer size for httplive streaming

-High bitrate URLs for httplive have large aac input frame sizes.
-Set httplive specific input buffer size for AAC format.
-Also,reverting an earlier similar change in sw acc decoder

CRs-Fixed: 330211
Change-Id: I6bc8d95cf71b835cf2db4aec9bd5ae2fb6b2032e

Conflicts:

	media/libstagefright/mpeg2ts/ESQueue.cpp
libstagefright:/MPEG4Extractor: Support for multiple avcc atoms

Change-Id: If7aeaf26a25628166376c9dc1e277a21782afe2d
libstagefright: Ignore sub atom of sawb

Data corruption of sawb subatom causes the clip to not play. Since the
damr atom is not being processed, ignoring rest of the sawb atom and
moving to the next atom.

Change-Id: I38e312c07b1702c8c1b10b391801e2d1388b3597
frameworks/base: increase accuracy of statistics collection

statistics collection was once per every 250 ms and due to
fisrt & last statistics, precision is going wrong because
of large(250 ms) gap. hence reducing the gap to 50 msec
to get the proper & near accurate framerate statistics.

Change-Id: I9e73b1d1696a5be592833f2fc26a02320c570220
CRs-fixed: 325100
libstagefright: Fix crash during 3D Video playback

The crash was observed while handling extra data in FTB.
This was due to improper assignment of buffer handle to
pBuffer. This assignement is corrected in OMX component
and hence CHECK_EQ for buffer handle in OMX nodeInstance
is removed.

Change-Id: Ib1eb206a201f2e23aec2137b64b93bcb0fc2d221
CRs-Fixed: 328535
libstagefright: Change allocation buffer count for VideoEditor

- OMXCodec: AllocateBuffersOnPort: Add a check to allocated
  minmum buffer count for encoder, min + 1 for decoder input
  and min + 2 for decoder output

Change-Id: I483cbe0587b76b0c029e11054eda666e548c2b63