FLAC coded file does not play (single metadata block files)

FLAC files which has the last metadata block flag set in
STREAMINFO were not playing. Sniff of FLAC is modified to
accomodate this set flag.

Change-Id: Ia40e3753e8c40e82d5545d52a88ed239eed9c416
Author: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Signed-off-by: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Singed-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: 32421
Short noise occurs when seeking FLAC music contents.

The pcm data returned by the FLAC Decoder after seek operation is
causing noise. The pcm data/buffer is omitted from being sent back
to AudioPlayer.

Change-Id: I0aff170b0495c1559cdf740fa4174225f6e460c5
Author: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Signed-off-by: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Singed-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: 25416
Fix crash when seek after disconnect from server in RTSPSource

  if seek after log 'stream ended? abort' is printed out,
  client already disconnect from server.
  it shall crash at performSeek as mHandler is cleared in onDisconnect.

  this patch redefine RTSPSource LOG_TAG, avoid being overrided by MyHandler.

Change-Id: I78e6c1bb063666b068a6974920343631aa2c72e1
Signed-off-by: Yajun Zeng <beanz@marvell.com>
NuPlayerRender: fix a/v sync issue when playback only video track clip

If only video track exists, mAnchorTimeMediaUs retrieve system time asa/v sync time base.
If playing is paused, we should clear mAnchorTimeMediaUsand reset it when resume playing

Change-Id: Ia517079e0ed1b196c78e08eb2d8c132561beec86
Author: Yi Wang <yi.a.wang@intel.com>
Signed-off-by: Yi Wang <yi.a.wang@intel.com>
Signed-off-by: Feng Xiao <fengx.xiao@intel.com>
Singed-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, 30011
libstagefright: adjust audio seek for mkv container

The original seeking method can only deal with the case
that the SimpleBlocks of both audio and video are packed
in the head of a cluster. The testing clip is quite
special, as the key frame for video is located at the end
of a cluster, at 10000ms, while the first SimpleBlock of
audio in this cluster starts at 5013ms. So video is stopped
untill audio catches up.

After modification, audio will advance to the nearest point
as video has seeked to.

Change-Id: Ic03abea1ebb8ef630ae9000dd904c2ce3986d5af
Author: Dan Liang <dan.liang@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: 57484
[PreProc]accoustics effects process

The purpose of this patch is to propagate the errors of WebRTC to upper layers

Change-Id: I87c6812b621768f04b4ad80a38fa5604ce97c7ed
Origin-Change-Id: I32781aad02c55a9077241b8ada0bb6c28ace737f
Signed-off-by: Andrei V. FOMITCHEV <andreix.fomitchev@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: 31726
Fixed data offset at parsing IPMP Descriptors

MPEG4Extractor::parseDrmSINF() miscalculated data offset in parsing
IPMP Descriptors. This commit makes it to take in 2 bytes which is
the size of IPMPS_Type field.

Change-Id: I42cbb6793af9d9b2f14dbfdd7a616096002793f9
AudioPolicyService: malloc/delete pair

Change-Id: I75cd44ac0caccda9148faaa052c9e7a0c06d46d1
Signed-off-by: You Kim <you.kim72@gmail.com>
libstagefright: Optimize h263/mpeg4 assambler to reduce frame dropping in the assambler layer.

If current rtp packet lost, when submitting the last access unit to construct a
video frame it will set the last access unit to be damaged and will drop it. It
is the google orignal design. But if the last access unit is a whole frame it will
cause an additional frame dropping. So use "M" marker to detect the frame boundary,
if the last accecc unit "M" is set, we don't drop it, this can improve streaming
video quality when rtp packet dropping too much.

Change-Id: I895ef7fd86fbdc391ba5e84e6dd68ee2fc87e3b8
Author: Feng Xiao<fengx.xiao@intel.com>
Signed-off-by: Feng Xiao<fengx.xiao@intel.com>
Signed-off-by: Yi Wang<yi.a.wang@intel.com>
Singed-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: 49120, 23827, 26068
Audio: Irregular timing shown at the last few seconds of the local playback.

Trying to get the "mPositionTimeMediaUs" when buffer size is zero resulted in unexpected time value.
Fix: Check to get the mediatime in fillbuffer only when there is non zero buffer, (When the input buffer is available).

Change-Id: Ifa12e761e3585a7d377d4aba2a2eb5674bcacf64
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: 24538
Patches related to Matroska Extractor.

Video Frame drops seen during playback of certain mkv files
and mediaserver crash issue (mka extractor fatal error) have
been fixed with these patches.

Change-Id: Ida6f03fa855679e632917a7d4359906face31262
Author: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Signed-off-by: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Singed-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: 48377, 24170, 27388
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