camera: set video snapshot to false on legacy qcom camera param devices
Movie studio: fix a memory leak issue in the AOSP code

It's an android defect, connect()/disconnect() of OMXClient need be called in a pair,
if miss calling disconnect() while connect() is called, a memory leak will happen.

Change-Id: I9acc19242faa5c981bb77caba52170e0f96dbf96
Orig-Change-Id: I0fa40422aa54dc97dadd850e8a4cb5a9697cb685
Signed-off-by: Gu, Wangyi <wangyi.gu@intel.com>
Signed-off-by: Dan Liang <dan.liang@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 80150
strtok which is not MT-safe will be replaced by strtok_r

strtok is not MT-safe because it uses static variable to store last string.
it causes unexpected behavior when the scheduling is happened before
excuting strtok with 'NULL' argument. the static variable 'last' in the
strtok can not be guaranteed when the scheduled thread call the strtok,
also. instead, strtok_r should be used with the stack variable to store
last string.

Change-Id: Ia60835c2431d88098508b5c41f9e0edfa9710059
Media: Enable time lapse recording.

Change-Id: I8b5f32ee3a32a8c1e0db21a4c357518ec6d86bee
Author: Zhao Liang <leo.zhao@intel.com>
Signed-off-by: Zhao Liang <leo.zhao@intel.com>
Signed-off-by: Tong, Bo <box.tong@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: 47858 23657
libmediaplayerservice:delay codec EOS or error message during NuPlayer flushing decoder.

During NuPlayer flush decoder, codec reached EOS or error, and message it to NuPlayer.
If NuPlayerRender has already flushed its video and audio queue, and NuPlayer
still push EOS entry to NuPlayerRender queue, then crash happend because
queue is not empty when finish flush checking queue.

Change-Id: I9079ce282f91d149b4b773b533cf248b833e6e14
Author: Yi Wang <yi.a.wang@intel.com>
Signed-off-by: Yi Wang <yi.a.wang@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: 48710 43878
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
Revert "strtok stores its values in thread local storage."

This reverts commit 73c07c2c233a90e8319b5477faf61e3440caecbb.
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
libcameraservice: Fix build in ISO C++11 mode

Change log macro define so it can't be confused for a C++11 string
literal

Change-Id: Idcc8085735177aa3313fdea66dc0736cca749f9b
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Modification of setPlaybackStatus events

The seekTo function in AwesomePlayer can be called both when playing
content but also when the content is paused. In the old solution
the events to the DRM FW were the same for both these cases.
This causes too many DRM rights to be consumed in the case where the
song is paused and you seek to the beginning.

Change-Id: I19d8926745595d55962f27ae2bad2c00d42a15eb
Use RTSP Sender Reports for timestamping

The timestamps calculated in MyHandler using RTSP Sender Reports were
overwritten at a later stage in RTSPSource which made it impossible
for servers to adjust synchronization using RTSP Sender Reports.

Change-Id: I5984621caa67140d7f3e318cb4975622c9dc9af3
To fix the green bar problem in video editor

This is an Android code defect. Should use video stride to
clear the video data buffer instead of the video width.

Change-Id: I77140ceab00936ea048f18ab68056911becc13f0
Author: Wei Feng <wei.feng@intel.com>
Signed-off-by: Wei Feng <wei.feng@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: 34031