fix crash issue while playing certain streaming media

In the play response of certain streaming media, the url just contains part of the full url.
Change the url matching method to enable this case rather than crash as before.

Change-Id: Ide4a4a3f01120f9092193a765bda1cc9f12daf56
Author: Yi Wang <yi.a.wang@intel.com>
Signed-off-by: Yi Wang <yi.a.wang@intel.com>
Signed-off-by: Shuduo Sang <shuduo.sang@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:49305, 18533, 7540
strtok stores its values in thread local storage.
So it can not guarantee works well when multithread environment.
AudioFlinger has multithread.
so strtok_r is more safe.

Change-Id: I6d77ef9cc49a4478dd856dcdca14e4920ce955c6
Call player's setAudioStreamType for hardware output.

Change-Id: Id2d138fc016879b02e78144173c507e3ea27664d
Signed-off-by: Scott Fan <fancp2007@gmail.com>
Fix for rounding error during encoding

Rounding error in calculation lead to the stts atom's sum
values mismatch with "duration" of mdhd atom.

Change-Id: I426703160df60f0eadf38b564138ef923f6e23e4
libstagefright: check the RTCP socket valid before sending RR

make sure the rtcp socket is valid before sending RR to avoid assertion failure

Change-Id: Ied376107e2397bf5888af42ff76c7f82d465a216
Author: Yi Wang <yi.a.wang@intel.com>
Signed-off-by: Yi Wang <yi.a.wang@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: 49305, 18533, 16913
Extend MPEGExtractor to support "qt" type

1. Check if the major brand is 'qt ' in box 'ftyp' to support quicktime mp4 clips;
2. If there are some invaild data at the end of one box, skip them and keep parsing.

Change-Id: I2c95cd105df75329c6975851091843c891e0a268
Author: Weian Chen <weian.chen@intel.com>
Signed-off-by: Weian Chen <weian.chen@intel.com>
Signed-off-by: Dan Liang <dan.liang@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: 48862, 18544, 10568
The length of ogg file displayed in music player is wrong.

This patch contains changes in OggExtractor.cpp. The playback is stopped
at the displayed duration, instead of continuing beyond the shown duration.

Change-Id: I361e0e5c2bac6b21e4f312f58757ead5a9525275
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: 43382
Cached reading of stsz atom

The entire stsz atom needs to be checked, entry by entry, to
determine the maximum size of a sample so that the proper buffer
size can be allocated by the decoder. This change reads a block of
entries at a time, cutting down the number of file reads and thus
significantly increasing the performance of reading the entries.

Change-Id: Ida39c2fe59bccb4440faeab1e71d8cf58682bcc3