libstagefright: mpeg2ts: Ignore continuity_counter discontinuity

The continuity counter is incremented for each ts packet. Any lost
packet results in a discontinuity, and the stock parser flushes the
current frame data leading to corruption if an I-frame is lost.
Avoid flushing on discontinuity to prevent some of this corruption.

CRs-Fixed: 663391

Change-Id: I683269dcb36a1424f6d9a6e543cf9e1ead0103a7
stagefright: Correct timescale in MvHd for HFR

Either timescale or duration must be modified to show the correct
HFR clip duration. Since duration is also queried by the record
timer, modify timescale instead.

CRs-Fixed: 662909
Change-Id: I6b744b4048b7a2d0bb70e2e3a102385a312bf81b
NuPlyer:RTSP: Fix some issues while seeking RTSP source

- Clear the obsolete packets after sending the seek request
- Stop rendering any obsolete frames while seeking
- Stop queueing any obsolete units to source while seeking
- Without this patch, the process-bar will return to
  the previous playback position, and stay at this position
  until the seek operation finish.
  Then, the process-bar will go to the seek position, and go
  forward according the playback of the clips.
- Without this patch, in some platform (based on Q6), seek
  operation will cause several green frame.

CRs-Fixed: 623269
Change-Id: I432de355d8e601a4d434cb78c699043dea2c6b55
NuPlayer: Add RTSP Server Timeout Setting to Meta Data

- Operator requires MoviePlayer to prompt dialog when the activity has been
  paused for longer than server timeout. This patch adds server timeout
  to meta data, so app can get the timeout value.

CRs-Fixed: 638087
Change-Id: I08f98e965497047c420d9d6ecc0b2898abe56369
libstagefright: Customize AV sync behavior

Based on the property, whenever video decoder takes more time
for decoding and causing few consecutive frame drops to maintain
the AV sync, then disable AV sync till it recovers.

This change will avoid freeze whenever any video clips out side
of the supported spec are being played though audio and video
are out of sync.
This improves user experience

Change-Id: Ia4ee899ff2515684259b88f66af216871a7bd38c
stagefright: Add a prefetching source

Add a prefetching source which pre-fetches buffers from
upstream source in a low priority context.
This decouples the caller of read() from the underlying source,
effectively making read() non-blocking as long as there are
already prefetched buffers available.

Change-Id: Ie5338c825dbdab9d88989059204594dc66bb2ac7
libstagefright: Render video frames on vsync

Render video frames on vsync, which helps to
synchronize display and decoder activity, and
reduces power consumption

CRs-Fixed: 649540
Change-Id: I0981d7723621de963d22f7fd7ca0eed48f016090
frameworks/av: Enhance logging for audio usecases

Add/Enable msg logging
-Start and End of playback
-To print file name
-Mode of playback and component used

Change-Id: I2c92d535ab76c9078af39b50fcfde4613f50a581
libstagefright: Print playback stats in suspend call

Print playback statistics in suspend call in AwesomePlayer,
as the video decoder is reset in this call, and playback
statistics are not printed in reset.

Change-Id: If3f74aba1b59cf001c6efa9f6175a6daec0d03d7
CRs-Fixed: 500977
ExtendedCodec: update amrwb+ format parameters

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

CRs-Fixed: 631469

Change-Id: I46d2f219a13f3edf49ac0e7a8d098ca96bcd22a2