OSDN Git Service

android-x86/frameworks-av.git
10 years agoIncreased recorded MP4 max file size to 4GB
Rachad [Tue, 11 Feb 2014 00:54:46 +0000 (16:54 -0800)]
Increased recorded MP4 max file size to 4GB
(more precisely 2^32-1 bytes -- FAT32 max file size)

bug: 11039801
Change-Id: I6169f798c59d123d02d5fd7afa3b9e645ebdb598
(cherry picked from commit 1f1f2b1678fd0d038dfc501252dd2b65ecf10cae)

10 years agoam 5be9c1da: am 01eed3c0: am 7a107b85: am 854aa061: am 42ba5806: am 72499628: am...
Marco Nelissen [Thu, 20 Mar 2014 20:48:52 +0000 (20:48 +0000)]
am 5be9c1da: am 01eed3c0: am 7a107b85: am 854aa061: am 42ba5806: am 72499628: am 25bab830: Fix build

* commit '5be9c1daf956c35d37585d21fff5d6b99f506560':
  Fix build

10 years agoam 01eed3c0: am 7a107b85: am 854aa061: am 42ba5806: am 72499628: am 25bab830: Fix...
Marco Nelissen [Thu, 20 Mar 2014 20:29:33 +0000 (13:29 -0700)]
am 01eed3c0: am 7a107b85: am 854aa061: am 42ba5806: am 72499628: am 25bab830: Fix build

* commit '01eed3c0fb951e349d68f4bce818bef22e7925b1':
  Fix build

10 years agoam 7a107b85: am 854aa061: am 42ba5806: am 72499628: am 25bab830: Fix build
Marco Nelissen [Thu, 20 Mar 2014 20:18:07 +0000 (13:18 -0700)]
am 7a107b85: am 854aa061: am 42ba5806: am 72499628: am 25bab830: Fix build

* commit '7a107b857e658ba11c0c1fd2325ac91a2c0569a2':
  Fix build

10 years agoam 854aa061: am 42ba5806: am 72499628: am 25bab830: Fix build
Marco Nelissen [Thu, 20 Mar 2014 20:13:35 +0000 (13:13 -0700)]
am 854aa061: am 42ba5806: am 72499628: am 25bab830: Fix build

* commit '854aa061b1e2d7eaaf8ffa2ead323c1478393c57':
  Fix build

10 years agoam 42ba5806: am 72499628: am 25bab830: Fix build
Marco Nelissen [Thu, 20 Mar 2014 20:08:17 +0000 (13:08 -0700)]
am 42ba5806: am 72499628: am 25bab830: Fix build

* commit '42ba5806c03753a39f85016265173819ac465745':
  Fix build

10 years agoam 72499628: am 25bab830: Fix build
Marco Nelissen [Thu, 20 Mar 2014 20:04:11 +0000 (13:04 -0700)]
am 72499628: am 25bab830: Fix build

* commit '72499628a24ccea0befe726de6e2b32176ddf208':
  Fix build

10 years agoam 25bab830: Fix build
Marco Nelissen [Thu, 20 Mar 2014 20:00:07 +0000 (13:00 -0700)]
am 25bab830: Fix build

* commit '25bab830af062dcaef6f75220066b221fd30957e':
  Fix build

10 years agoFix build
Marco Nelissen [Thu, 20 Mar 2014 19:32:48 +0000 (12:32 -0700)]
Fix build

As of jb-mr1, need to explicitly include library dependencies. The original
change in jb, which the automerger dutyfully merged, did not need this.

Change-Id: I429637e2d01b8084376bb97a02bb091a0ea9eaf7

10 years agoam 6f65db14: am 0e0891f8: am 6cdc90b5: am ebc9b473: am fb49b8ba: am dfd90c80: am...
Marco Nelissen [Thu, 20 Mar 2014 18:17:24 +0000 (18:17 +0000)]
am 6f65db14: am 0e0891f8: am 6cdc90b5: am ebc9b473: am fb49b8ba: am dfd90c80: am d434944b: am 3bc4f7ea: am 0c271b75: Verify certificates

* commit '6f65db14e310b513c8943b236a6e61cf27cef4c7':
  Verify certificates

10 years agoam 0e0891f8: am 6cdc90b5: am ebc9b473: am fb49b8ba: am dfd90c80: am d434944b: am...
Marco Nelissen [Thu, 20 Mar 2014 18:08:43 +0000 (11:08 -0700)]
am 0e0891f8: am 6cdc90b5: am ebc9b473: am fb49b8ba: am dfd90c80: am d434944b: am 3bc4f7ea: am 0c271b75: Verify certificates

* commit '0e0891f8b49f31e6a28b563f86aae537e66bb6e0':
  Verify certificates

10 years agoam 6cdc90b5: am ebc9b473: am fb49b8ba: am dfd90c80: am d434944b: am 3bc4f7ea: am...
Marco Nelissen [Thu, 20 Mar 2014 17:49:15 +0000 (10:49 -0700)]
am 6cdc90b5: am ebc9b473: am fb49b8ba: am dfd90c80: am d434944b: am 3bc4f7ea: am 0c271b75: Verify certificates

* commit '6cdc90b5e41374dd665df3ae7283ef0c1f532678':
  Verify certificates

10 years agoam ebc9b473: am fb49b8ba: am dfd90c80: am d434944b: am 3bc4f7ea: am 0c271b75: Verify...
Marco Nelissen [Thu, 20 Mar 2014 17:31:32 +0000 (10:31 -0700)]
am ebc9b473: am fb49b8ba: am dfd90c80: am d434944b: am 3bc4f7ea: am 0c271b75: Verify certificates

* commit 'ebc9b47330ab8565f7bdd9b3973a8f75e3206e77':
  Verify certificates

10 years agoam fb49b8ba: am dfd90c80: am d434944b: am 3bc4f7ea: am 0c271b75: Verify certificates
Marco Nelissen [Thu, 20 Mar 2014 17:27:04 +0000 (10:27 -0700)]
am fb49b8ba: am dfd90c80: am d434944b: am 3bc4f7ea: am 0c271b75: Verify certificates

* commit 'fb49b8bad468db591f55a7064181372f02ad94a2':
  Verify certificates

10 years agoam dfd90c80: am d434944b: am 3bc4f7ea: am 0c271b75: Verify certificates
Marco Nelissen [Thu, 20 Mar 2014 17:21:14 +0000 (10:21 -0700)]
am dfd90c80: am d434944b: am 3bc4f7ea: am 0c271b75: Verify certificates

* commit 'dfd90c8052a913ed2bbbea1873ee51838d40bfe1':
  Verify certificates

10 years agoam d434944b: am 3bc4f7ea: am 0c271b75: Verify certificates
Marco Nelissen [Thu, 20 Mar 2014 17:16:53 +0000 (10:16 -0700)]
am d434944b: am 3bc4f7ea: am 0c271b75: Verify certificates

* commit 'd434944b00cf83a38019047e0d7db155a15d77f4':
  Verify certificates

10 years agoam 3bc4f7ea: am 0c271b75: Verify certificates
Marco Nelissen [Thu, 20 Mar 2014 17:11:20 +0000 (10:11 -0700)]
am 3bc4f7ea: am 0c271b75: Verify certificates

* commit '3bc4f7eaf063201dc85ecc2f7c2bf2b70ab564ed':
  Verify certificates

10 years agoam 0c271b75: Verify certificates
Marco Nelissen [Thu, 20 Mar 2014 17:04:18 +0000 (10:04 -0700)]
am 0c271b75: Verify certificates

* commit '0c271b750f7314e187f8479f478ad9382d9a9045':
  Verify certificates

10 years agostagefright: allow for minUndequeuedBufs to be one less
Lajos Molnar [Wed, 19 Mar 2014 19:22:01 +0000 (12:22 -0700)]
stagefright: allow for minUndequeuedBufs to be one less

Bug: 13533477
Change-Id: I909324e3e24f65d8051e0d5474267620efcfc729

10 years agoVerify certificates
Marco Nelissen [Thu, 13 Mar 2014 21:18:25 +0000 (14:18 -0700)]
Verify certificates

b/13418320

Cherrypicked from 8a57d24c733b08da846b54d1adf029e606b5a5f3
https://googleplex-android-review.git.corp.google.com/#/c/433309/

Change-Id: I3052dd5f9ec057e700784cd713f6a7dab9ecfe7b

10 years agomediaplayer: keep more buffers with the BufferQueue
Lajos Molnar [Thu, 13 Feb 2014 23:29:49 +0000 (15:29 -0800)]
mediaplayer: keep more buffers with the BufferQueue

Change OMX buffer allocation policy to allocate
nBufferCountMin + what is required for the BQ.

For the BQ, try to allocate 2 additional buffers than
the minimum undequeued count.

Also account for the fact that BQ may return one less
than the actual minimum undequeued count.

In most cases the resulting number of buffers ends up
being the same as with the previous policy, but we
keep more buffers with the BQ.

Change-Id: I826db8bf7dd333b620299dba60bf1b81b228275d
Bug: 13170236

10 years agohttplive: block-by-block fetch, decrypt, and parse ts files.
Robert Shih [Thu, 27 Feb 2014 20:33:24 +0000 (12:33 -0800)]
httplive: block-by-block fetch, decrypt, and parse ts files.

Bug: 12060952
Change-Id: I695345081fe23961b9d0ef6db264885f914703ec

10 years agocamera2: Fix segfault when using null availability listener
Igor Murashkin [Mon, 17 Mar 2014 20:01:41 +0000 (13:01 -0700)]
camera2: Fix segfault when using null availability listener

ICameraService::addListener / removeListener will now return BAD_VALUE
if a null listener is used.

Bug: 12891434
Change-Id: I9764110094d8fd42e22fcc8df3ef0e73c1b070e7

10 years agoMerge "Verify certificates" into klp-dev
Marco Nelissen [Fri, 14 Mar 2014 22:27:17 +0000 (22:27 +0000)]
Merge "Verify certificates" into klp-dev

10 years agoVerify certificates
Marco Nelissen [Thu, 13 Mar 2014 21:18:25 +0000 (14:18 -0700)]
Verify certificates

b/13418320

Change-Id: I3052dd5f9ec057e700784cd713f6a7dab9ecfe7b

10 years agoMerge changes Ic46e3069,Idc92716b into klp-dev
Lajos Molnar [Wed, 12 Mar 2014 20:58:37 +0000 (20:58 +0000)]
Merge changes Ic46e3069,Idc92716b into klp-dev

* changes:
  LiveSession: fix incorrect stream key (subtitle"s")
  M3UParser: trim spaces when parsing comma separated codecs.

10 years agoMerge "httplive: clear access units before returning from seekTo." into klp-dev
Lajos Molnar [Wed, 12 Mar 2014 20:58:14 +0000 (20:58 +0000)]
Merge "httplive: clear access units before returning from seekTo." into klp-dev

10 years agofix codec buffer leak in error handling when timestamp goes backward
Chong Zhang [Fri, 14 Feb 2014 23:26:00 +0000 (15:26 -0800)]
fix codec buffer leak in error handling when timestamp goes backward

don't touch codec buffer if we decided to drop a frame with bad pts

Bug: 11971963
Change-Id: I9b4c56210f64258f1be257b14184381a1133e0d6
(cherry picked from commit b63d2433350d56bda9f3477549086c90bb6d535e)

10 years agoMerge "Cap pts gap between adjacent frames to specified value" into klp-dev
Chong Zhang [Tue, 11 Mar 2014 22:09:39 +0000 (22:09 +0000)]
Merge "Cap pts gap between adjacent frames to specified value" into klp-dev

10 years agoLiveSession: fix incorrect stream key (subtitle"s")
Robert Shih [Tue, 11 Mar 2014 00:27:15 +0000 (17:27 -0700)]
LiveSession: fix incorrect stream key (subtitle"s")

Bug: 13402087
Change-Id: Ic46e3069c6e41f90ead47cae84cbe0123d11002a

10 years agoM3UParser: trim spaces when parsing comma separated codecs.
Robert Shih [Tue, 11 Mar 2014 00:05:01 +0000 (17:05 -0700)]
M3UParser: trim spaces when parsing comma separated codecs.

Bug: 13402087
Change-Id: Idc92716bfefd6d1b0cb371d0d97d990d53288090

10 years agohttplive: clear access units before returning from seekTo.
Robert Shih [Mon, 3 Mar 2014 23:08:27 +0000 (15:08 -0800)]
httplive: clear access units before returning from seekTo.

Bug: 12060952
Change-Id: I6a69a718c082501003ee9b78a948a2f8bbfbb14e

10 years agoCap pts gap between adjacent frames to specified value
Chong Zhang [Sat, 11 Jan 2014 01:36:57 +0000 (17:36 -0800)]
Cap pts gap between adjacent frames to specified value

- In the scenario of cast mirroring, encoding could be suspended
  for prolonged periods. Limiting the pts gap to workaround the
  problem where encoder's rate control logic produces huge frames
  after a long period of suspension.

- Repeat last frame a couple more times to get better quality
  on static scenes.

- Fix the timestamp on repeat frames (it was not set)

Bug: 11971963
Change-Id: I1d68ab3d269874bf3921aa429a985c5f63e428c7
(cherry picked from commit 94ee4b708acfa941581160b267afb79192b1d816)

10 years agosave mGraphicBuffer pointer even when we're suspended
Chong Zhang [Sat, 18 Jan 2014 00:29:59 +0000 (16:29 -0800)]
save mGraphicBuffer pointer even when we're suspended

Bug: 12609966
Change-Id: Ifd41fd973876da69039113fcaeacdccf39472b37
(cherry picked from commit 49270665e7a20cd120724fc388da8b166ff0b4f1)

10 years agoDO NOT MERGE: Camera: delete preview callback when preview size is changed
Zhijun He [Tue, 21 Jan 2014 20:15:56 +0000 (12:15 -0800)]
DO NOT MERGE: Camera: delete preview callback when preview size is changed

Preview callback stream is left configured even the preview size is changed.
This makes the callback stream unnecessarily configured even in recording mode,
which could cause distorted preview for some devices.

Bug: 12210027
Bug: 12591410
Change-Id: If50cddfe5562e91aec1feb1760eccb82ddb21730

10 years agoMerge "AudioTrack: When paused, return cached playback position" into klp-dev
Eric Laurent [Sat, 8 Mar 2014 00:29:56 +0000 (00:29 +0000)]
Merge "AudioTrack: When paused, return cached playback position" into klp-dev

10 years agoMerge "Simplify AudioTrack stream end and fix race" into klp-dev
Glenn Kasten [Fri, 7 Mar 2014 20:22:38 +0000 (20:22 +0000)]
Merge "Simplify AudioTrack stream end and fix race" into klp-dev

10 years agoSimplify AudioTrack stream end and fix race
Glenn Kasten [Fri, 20 Sep 2013 16:28:56 +0000 (09:28 -0700)]
Simplify AudioTrack stream end and fix race

Bug: 10994052
Change-Id: Ib2e38e7a600bcffef8cbc68c1722e40fbbc7ea67

10 years agoAllow for larger codec private data
Marco Nelissen [Mon, 3 Feb 2014 22:33:16 +0000 (14:33 -0800)]
Allow for larger codec private data

This change adds support for multibyte sizes in the ESDS. Previously the
Matroska extractor only supported single byte sizes, so codec private data
had to be less than 108 bytes, and would crash if it was bigger.
b/12584090

Change-Id: I9edfc2f687187d1e98bcfd2fe56576312435df3e

10 years agoMerge "Fix SIGABRT when playing mp4 file" into klp-dev
Marco Nelissen [Fri, 7 Mar 2014 18:22:53 +0000 (18:22 +0000)]
Merge "Fix SIGABRT when playing mp4 file" into klp-dev

10 years agoMerge changes I787e1c05,I72d3a5e1,I0a5cc65f,I75fc2a25,I2c2be08d, ... into klp-dev
Lajos Molnar [Fri, 7 Mar 2014 02:35:50 +0000 (02:35 +0000)]
Merge changes I787e1c05,I72d3a5e1,I0a5cc65f,I75fc2a25,I2c2be08d, ... into klp-dev

* changes:
  LiveSession: Use the actual, possibly redirected url as base in the M3U
  M3UParser: Skip query strings when looking for the last slash in a URL
  ChromiumHTTPDataSource: Keep track of the redirected URL
  Initial HLS seamless switch implementation.
  NuPlayer side support for seamless format switch.
  LiveSession refactor
  PlaylistFetcher: Add support for block-by-block decryption.
  LiveSession: Add support for block-by-block fetchFile.

10 years agoMerge "AnotherPacketSource support to get latest buffered MetaData." into klp-dev
Lajos Molnar [Fri, 7 Mar 2014 02:33:32 +0000 (02:33 +0000)]
Merge "AnotherPacketSource support to get latest buffered MetaData." into klp-dev

10 years agoMerge "Added support to query ACodec whether adaptive playback is enabled." into...
Lajos Molnar [Fri, 7 Mar 2014 02:33:08 +0000 (02:33 +0000)]
Merge "Added support to query ACodec whether adaptive playback is enabled." into klp-dev

10 years agoMerge "stagefright: use CODECS field in EXT-X_STREAM-INF as fallback" into klp-dev
Lajos Molnar [Fri, 7 Mar 2014 02:32:34 +0000 (02:32 +0000)]
Merge "stagefright: use CODECS field in EXT-X_STREAM-INF as fallback" into klp-dev

10 years agoMerge "Fixed misplaced bracket for switch-case block." into klp-dev
Lajos Molnar [Fri, 7 Mar 2014 02:32:25 +0000 (02:32 +0000)]
Merge "Fixed misplaced bracket for switch-case block." into klp-dev

10 years agoMerge "stagefright: Fix issue with tracking media format in packet source" into klp-dev
Lajos Molnar [Fri, 7 Mar 2014 02:32:09 +0000 (02:32 +0000)]
Merge "stagefright: Fix issue with tracking media format in packet source" into klp-dev

10 years agoMerge "stagefright: Fix bugs in playlist fetcher logic" into klp-dev
Lajos Molnar [Fri, 7 Mar 2014 02:31:50 +0000 (02:31 +0000)]
Merge "stagefright: Fix bugs in playlist fetcher logic" into klp-dev

10 years agoLiveSession: Use the actual, possibly redirected url as base in the M3U
Martin Storsjo [Fri, 22 Nov 2013 15:57:31 +0000 (17:57 +0200)]
LiveSession: Use the actual, possibly redirected url as base in the M3U

This fixes playback of HLS streams where the M3U playlists use
relative paths and the main playlist is opened via a redirect.

Bug: 13174301
Change-Id: I787e1c050daddc566be4c8e3f84803d3f91eec46

10 years agoM3UParser: Skip query strings when looking for the last slash in a URL
Martin Storsjo [Fri, 22 Nov 2013 15:05:05 +0000 (17:05 +0200)]
M3UParser: Skip query strings when looking for the last slash in a URL

Bug: 13174301
Change-Id: I72d3a5e11fef9bbd75b291bc490c9cab1dce58da

10 years agoAudioTrack: When paused, return cached playback position
Haynes Mathew George [Wed, 8 Jan 2014 21:59:53 +0000 (13:59 -0800)]
AudioTrack: When paused, return cached playback position

An offload output can be re-used between two audio tracks having
the same configuration. A timestamp query for a paused track
while the other is running would return an incorrect time.
To fix this, cache the playback position on a pause() and return
this time when requested until the track is resumed.

Bug: 12826612.
Change-Id: Ia42b8b8fd2ba8993dfcc9abca72da48d71d78d74

10 years agoFix SIGABRT when playing mp4 file
Marco Nelissen [Mon, 25 Nov 2013 16:39:56 +0000 (08:39 -0800)]
Fix SIGABRT when playing mp4 file

If the track duration was shorter than the segment duration, the calculated
encoder padding would be negative, resulting in a crash.
b/11823061
https://code.google.com/p/android/issues/detail?id=62610

Change-Id: I3989ad88caea38d212b61355c15aec13382c6116

10 years agoMerge changes Id28b35fd,Ie4e64977,I2950f31e into klp-dev
Eino-Ville Talvala [Fri, 7 Mar 2014 01:40:59 +0000 (01:40 +0000)]
Merge changes Id28b35fd,Ie4e64977,I2950f31e into klp-dev

* changes:
  DO NOT MERGE: Camera: fix focusArea wrong indexing issue
  DO NOT MERGE: camera2: Fix race with stream deletion during disconnect.
  DO NOT MERGE: camera2/3: Add protection for still capture path

10 years agoMerge "stagefright: do not offload LD-AAC decoding" into klp-dev
Eric Laurent [Fri, 7 Mar 2014 01:09:33 +0000 (01:09 +0000)]
Merge "stagefright: do not offload LD-AAC decoding" into klp-dev

10 years agoChromiumHTTPDataSource: Keep track of the redirected URL
Martin Storsjo [Fri, 22 Nov 2013 16:11:58 +0000 (18:11 +0200)]
ChromiumHTTPDataSource: Keep track of the redirected URL

This makes the code actually match an existing comment in
DrmInitialization, which claimed that mURI was the redirected
URL and not the original one.

Bug: 13174301
Change-Id: I0a5cc65f520f1482ff91320ae78af84a8a681ee3

10 years agoInitial HLS seamless switch implementation.
Robert Shih [Thu, 20 Feb 2014 21:07:26 +0000 (13:07 -0800)]
Initial HLS seamless switch implementation.

Bug: 11854054
Change-Id: I75fc2a258111295039ac13cc37e407df25891dd2

10 years agoNuPlayer side support for seamless format switch.
Robert Shih [Fri, 24 Jan 2014 00:18:22 +0000 (16:18 -0800)]
NuPlayer side support for seamless format switch.

Avoid reinstantiating decoder if seamless format switch is supported.

Bug: 11854054
Change-Id: I2c2be08d6da90cc835ec747d04a76db2313dfc7c

10 years agoLiveSession refactor
Robert Shih [Fri, 14 Feb 2014 20:21:50 +0000 (12:21 -0800)]
LiveSession refactor

Bug: 11854054
Change-Id: Ia91dce109835e042f72934376d4838b4cc72cb10

10 years agoPlaylistFetcher: Add support for block-by-block decryption.
Robert Shih [Thu, 6 Feb 2014 22:25:25 +0000 (14:25 -0800)]
PlaylistFetcher: Add support for block-by-block decryption.

Bug: 11854054
Change-Id: Ifd3f3369275889e716b360087b5b60d01635b578

10 years agoLiveSession: Add support for block-by-block fetchFile.
Robert Shih [Thu, 6 Feb 2014 22:01:30 +0000 (14:01 -0800)]
LiveSession: Add support for block-by-block fetchFile.

Bug: 11854054
Change-Id: I4025ba7fab8fab2e0c720f73894e908fd98a43d8

10 years agoAnotherPacketSource support to get latest buffered MetaData.
Robert Shih [Thu, 23 Jan 2014 22:25:32 +0000 (14:25 -0800)]
AnotherPacketSource support to get latest buffered MetaData.

Bug: 11854054
Change-Id: Ib3b6e0984036082bf3c4eb7901a2b29be52fdd29

10 years agoAdded support to query ACodec whether adaptive playback is enabled.
Robert Shih [Thu, 23 Jan 2014 23:26:43 +0000 (15:26 -0800)]
Added support to query ACodec whether adaptive playback is enabled.

Bug: 11854054
Change-Id: I6b0308aa8550c643706959277e46dad586c37297

10 years agostagefright: use CODECS field in EXT-X_STREAM-INF as fallback
Robert Shih [Thu, 23 Jan 2014 23:00:53 +0000 (15:00 -0800)]
stagefright: use CODECS field in EXT-X_STREAM-INF as fallback

Use the CODECS field in EXT-X-STREAM-INF as a viable fallback for identifying
available streams in a variant playlist.

Bug: 11854054
Change-Id: I5011809dc7c56220b023eb1a16f2d6a392ddd6f1

10 years agoFixed misplaced bracket for switch-case block.
Robert Shih [Thu, 23 Jan 2014 22:16:32 +0000 (14:16 -0800)]
Fixed misplaced bracket for switch-case block.

Bug: 11854054
Change-Id: I66b410e1e19601ad65d8357bda4c0c58e2dc15dc

10 years agostagefright: Fix issue with tracking media format in packet source
Lajos Molnar [Tue, 17 Dec 2013 22:10:46 +0000 (14:10 -0800)]
stagefright: Fix issue with tracking media format in packet source

Media format in AnotherPacketSource is now tracked across discontinuities.
This fixes a bug where format was set on queueAccessUnit and cleared on
dequeueAccessUnit, thereby allowing it to remain cleared.

Change-Id: I20975a630443f4a223a2b4344e8244f34b9560b9
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 12060952

10 years agostagefright: Fix bugs in playlist fetcher logic
Lajos Molnar [Mon, 16 Dec 2013 18:16:32 +0000 (10:16 -0800)]
stagefright: Fix bugs in playlist fetcher logic

1. Improve start time: start playback as soon as the target duration
or 10s was buffered.
2. Select playlist monitor time based on target duration to avoid
continuously missing the boat.
3. If "we miss the boat" we still must request a safe sequence
number (last - 3)

Change-Id: Ie99c360ac67b152ad9af19e9c6e520016f67e4e3
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 12060952

10 years agoMerge "stagefright: fix offloading HE-AAC sampling rate." into klp-dev
Eric Laurent [Thu, 6 Mar 2014 19:21:49 +0000 (19:21 +0000)]
Merge "stagefright: fix offloading HE-AAC sampling rate." into klp-dev

10 years agostagefright: do not offload LD-AAC decoding
Eric Laurent [Fri, 6 Dec 2013 19:51:42 +0000 (11:51 -0800)]
stagefright: do not offload LD-AAC decoding

For now, do not offload LD and ELD AAC decoding because there
is no way to know if it is supported by the audio DSP implementation.
The longer term fix will be to have mapMimeToAudioFormat() use the
audio object type in track metadata to refine the AAC format and the
audio HAL list supported AAC profiles.

Bug: 11697128.

Change-Id: Iaa88ecf3f4ae42ad48c1b42a9b007dd80eb88147

10 years agoset AAC MPEG version to MPEG-2
Chong Zhang [Fri, 7 Feb 2014 20:05:34 +0000 (12:05 -0800)]
set AAC MPEG version to MPEG-2

wifi display play spec only allows MPEG-2 AAC.

Bug: 12747927
Change-Id: Ic96d27ce57f5c8e7da55e43b38f629b5c7333817

10 years agostagefright: fix offloading HE-AAC sampling rate.
Eric Laurent [Fri, 6 Dec 2013 19:16:54 +0000 (11:16 -0800)]
stagefright: fix offloading HE-AAC sampling rate.

Fix HE AAC SBR sampling rate reading for explicit
signaling.

Bug: 11697128.
Change-Id: Ifec0ab9d48d9293f6774ec1efd9da9445994cb7c

10 years agoDO NOT MERGE: Camera: fix focusArea wrong indexing issue
Zhijun He [Wed, 29 Jan 2014 16:52:01 +0000 (08:52 -0800)]
DO NOT MERGE: Camera: fix focusArea wrong indexing issue

Bug: 12304559
Change-Id: Id28b35fdd9697c1ec3365f617996801965de8bd0

10 years agoDO NOT MERGE: camera2: Fix race with stream deletion during disconnect.
Ruben Brunk [Thu, 5 Dec 2013 19:00:37 +0000 (11:00 -0800)]
DO NOT MERGE: camera2: Fix race with stream deletion during disconnect.

Bug: 11856804

- Shutdown order in Camera2Client allows a stream to be
  deleted before the corresponding processing thread has
  quit.  This can result in updates being called on the
  processor thread without a valid stream.

Change-Id: Ie4e649771f4321498659211f2a37ed89a6d956c4

10 years agoDO NOT MERGE: camera2/3: Add protection for still capture path
Zhijun He [Tue, 26 Nov 2013 23:11:05 +0000 (15:11 -0800)]
DO NOT MERGE: camera2/3: Add protection for still capture path

Jpeg stream in JpegProcessor could be deleted while process new capture is
ongoing, which unsafe to access a dead consumer endpoint.
Bug: 9316454
Change-Id: I2950f31ea28d0ba01f08502e2e3ba452bf8bb818

10 years agoIncrease kFastTrackMultiplier from 1 to 2
Glenn Kasten [Tue, 3 Dec 2013 17:06:43 +0000 (09:06 -0800)]
Increase kFastTrackMultiplier from 1 to 2

Bug: 11967381
Change-Id: Iedec06280aa745d9df5d661f4916940cede9c191

10 years agoAudioTrack: fix obtainBuffer timeout calculation
Eric Laurent [Tue, 28 Jan 2014 02:13:39 +0000 (18:13 -0800)]
AudioTrack: fix obtainBuffer timeout calculation

AudioTrack::obtainBuffer() passes a pointer to a timeout
variable that has gone out of scope when calling
ClientProxy::obtainBuffer().

Same fix for AudioRecord.

Bug: 11968591.
Change-Id: I5b3d0d86ed2bd8c0412eb2432b1ab519d70efce9

10 years agolibstagefright: Delay release of wakelock in TimedEventQueue
Haynes Mathew George [Fri, 6 Dec 2013 19:31:57 +0000 (11:31 -0800)]
libstagefright: Delay release of wakelock in TimedEventQueue

Delay release of wakelock in the TimedEventQueue to
after an event has been processed.
This ensures AP shutdown does not happen while an event
is ready but hasn't been processed yet.

Bug: 11976087.
Change-Id: I9bce83b9ff0f2b4d174a53c95e5b0f135b5ccc70

10 years agoaudioflinger: fix static track end detection
Eric Laurent [Sat, 21 Dec 2013 01:36:01 +0000 (17:36 -0800)]
audioflinger: fix static track end detection

If a static track is not a fast track,
prepareTracks_l() must rely on framesReady() to
detect end of buffer and remove the track from the active
track list.
Failing to do so results in the track staying active but
not processed by the mixer because in underrun. This leaves the
mix buffer content uninitialized and causes the effect process
function to accumulate its output onto undefined data.

Bug: 12013676.
Change-Id: I4b0819a9d93141ac3307b8786fc6a451dd585220

10 years agoAudioMixer: Remove tracks from enabledTracks after reseting outTemp
Gaurav Kumar [Mon, 6 Jan 2014 05:27:18 +0000 (10:57 +0530)]
AudioMixer: Remove tracks from enabledTracks after reseting outTemp

If any track goes through AudioMixer::process__genericNoResampling, and
its getnextbuffer returns NULL, Then that track is removed by AudioMixer
from enabledTracks.

Thus if all tracks getnextbuffer return NULL, Then this function doesn't
reset outTemp and last buffer in AudioFlinger's mMixBuffer will be
repeated and noise is observed.

Remove tracks from enabledTracks after reseting outTemp to zero, so that
process__genericNoResampling will reset outTemp and noise won't appear.

Bug: 12450065

Change-Id: I28996d425838728955f01eb1a00acf6e6dc2dea1
Signed-off-by: Gaurav Kumar <gaurav.kumar@broadcom.com>
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
10 years agoupdate offloaded audio track sampling rate
Eric Laurent [Sat, 27 Jul 2013 00:16:50 +0000 (17:16 -0700)]
update offloaded audio track sampling rate

AudioPlayer must read the sampling rate from offloaded audio sinks
whenever a new time position is computed as the decoder can update
the sampling rate on the fly.

Bug: 12823955.

Change-Id: I997e5248cfd4017aeceb4e11689324ded2a5bc88

10 years agoaudioflinger: fix offload write buffer offset
Eric Laurent [Fri, 22 Nov 2013 17:29:56 +0000 (09:29 -0800)]
audioflinger: fix offload write buffer offset

Fix current audio HAL write buffer offset calculation
which assumes that the frame size is a multiple of 2.
'
Bug: 12823725.

Change-Id: I0195ed5cfef225a6f114e7dd405a02680bb7254e

10 years agofix deadlock issues that arise when there are simultaneous
jpadmana [Thu, 14 Nov 2013 11:50:52 +0000 (17:20 +0530)]
fix deadlock issues that arise when there are simultaneous
effect control interface calls to proxy and to
non sub-effect wrappers(eg., bundlewrapper) from audioflinger
Also, return NO_ERROR when CMD_OFFLOAD succeeds

Whenever there are parallel calls to proxy and non sub-effects wrappers,
some of the calls are not completed. This is due to deadlock arsing out
of Proxy waiting for the subeffect call to return and subeffect waiting
for proxy to release lock.
The call flow is changed to a cleaner and simple one - Proxy gets the
aeli(effect library info) of subeffects during the EffectGetSubEffects()
call. Therby, proxy will manage the sub effects by itself rather than
going through effects factory.

Change-Id: If4b259da5776f151c1e81a78a0239d342046d923
Signed-off-by: jpadmana <jayashree.r.padmanaban@intel.com>
Bug: 12424044

10 years agoaudioflinger: check for condition before waiting
Haynes Mathew George [Wed, 4 Dec 2013 05:26:02 +0000 (21:26 -0800)]
audioflinger: check for condition before waiting

AsyncCallbackThread must check for any condition that
was already been satisfied before waiting.

Bug: 11824817
Change-Id: I04683a1f355de4f440106cab47fd916aa39d5e35

10 years agoaudioflinger: update track ready condition
Haynes Mathew George [Sat, 28 Dec 2013 00:09:28 +0000 (16:09 -0800)]
audioflinger: update track ready condition

Signal track ready if the track isStopping().

Bug: 12423190
Change-Id: I95e14905df10ebf301e398263478c8ca25d7e2ce

10 years agoaudioflinger: Fix for a deadlock in track creation
Haynes Mathew George [Fri, 13 Dec 2013 23:40:13 +0000 (15:40 -0800)]
audioflinger: Fix for a deadlock in track creation

AudioFlinger enters a deadlock (with itself) on trying to free a
RecordTrack or Track object that failed initialization. Clear this
bad object from the caller instead.

Bug: 12423233
Change-Id: I926f2beb922a70f6924e593e2bbf1a5b5df85b16

10 years agoAudioTrack: fix position callback after restore
Eric Laurent [Wed, 27 Nov 2013 22:29:13 +0000 (14:29 -0800)]
AudioTrack: fix position callback after restore

When restoring an AudioTrack, the next position callback point
should not be modified and set ahead of current buffer head.
Otherwise, as frames are dropped, the new position is never reached
and an application relying on position callbacks to reload the buffer
would be stalled.

Bug: 11868603.
Change-Id: I93b2a311642a0c89944b78bcc0482d4ceed98ae4

10 years agoMerge "WA: Queue extra buffers on output port during reconfig if input EOS-ed" into...
Lajos Molnar [Tue, 19 Nov 2013 01:28:28 +0000 (01:28 +0000)]
Merge "WA: Queue extra buffers on output port during reconfig if input EOS-ed" into klp-dev

10 years agoMerge "Fix metadata access" into klp-dev
Marco Nelissen [Fri, 15 Nov 2013 21:58:45 +0000 (21:58 +0000)]
Merge "Fix metadata access" into klp-dev

10 years agoFix metadata access
Marco Nelissen [Fri, 15 Nov 2013 21:49:58 +0000 (13:49 -0800)]
Fix metadata access

Metadata string pointers become invalid after setting more metadata,
so don't cache them.
b/11692062

Change-Id: Iaf1afb24cf53f7fa36f49ce759355693494076e5

10 years agoaudioflinger: do not use raw pointer for tracks
Eric Laurent [Fri, 15 Nov 2013 20:02:28 +0000 (12:02 -0800)]
audioflinger: do not use raw pointer for tracks

Commit 9da3d95 surfaced a problem caused by the use of a raw
pointer to a track in offload thread implementation.

Pointers to tracks should always be weak or strong pointers.

Bug: 11708529.
Change-Id: Ic48632532d186c9be8261f73cefdf824b9fbbd2b

10 years agoMerge "AwesomePlayer: correct stream type for offload" into klp-dev
Eric Laurent [Fri, 15 Nov 2013 15:34:11 +0000 (15:34 +0000)]
Merge "AwesomePlayer: correct stream type for offload" into klp-dev

10 years agoAwesomePlayer: correct stream type for offload
Eric Laurent [Fri, 15 Nov 2013 01:28:47 +0000 (17:28 -0800)]
AwesomePlayer: correct stream type for offload

canOffloadStream() function in stagefright utils forces the
stream type to AUDIO_STREAM_MUSIC when querying the audio policy
manager if a particular track is offloadable or not.
This causes MP3 ringtones to be offloaded which is not a validated use case.

The fix consists in using the actual stream type read from the AudioSink.

Bug: 11410937.
Change-Id: I44b8e033a8e785a79cdc291b142f80b5580bdc4d

10 years agoWA: Queue extra buffers on output port during reconfig if input EOS-ed
Lajos Molnar [Thu, 7 Nov 2013 05:04:34 +0000 (21:04 -0800)]
WA: Queue extra buffers on output port during reconfig if input EOS-ed

Some codecs may return input buffers before having them processed.
This causes a halt if we already signaled an EOS on the input
port.  For now keep submitting output meta buffers one at a time if
the input EOS-ed, but the output not yet.

Normally, we submit an output buffer for each input buffer that is
with the component (waiting to be processed).

Change-Id: I8a1251bfb504f40f1e4085a1e220bf9a4d0b05d9
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 11433909

10 years agoCamera2: Rework the FPS range vs. FPS single setting detection
Eino-Ville Talvala [Thu, 14 Nov 2013 18:32:13 +0000 (10:32 -0800)]
Camera2: Rework the FPS range vs. FPS single setting detection

Give up on current approach of writing out consistent FPS values
into parameters that will be read back by the app.

- Preserve app's latest set parameters exactly, and compare against
  them when detecting if a new FPS range or single FPS value has been
  selected.

- Since get() returns exactly what was set(), it doesn't matter if the
  app calls getParameters() before its next setParameters(), in terms
  of retriggering FPS selection logic. Before, the behavior varied
  depending on whether the app re-read the parameters.

- As before, if app changes both range and single FPS in a single set
  call, the range set wins. Otherwise, the value that has changed more
  recently is used.

Bug: 11570973
Change-Id: I72b5e60c3f60e88d55127dd1bda87e26eaf929c6

10 years agoMerge "audioflinger: fix offload track transition" into klp-dev
Eric Laurent [Thu, 14 Nov 2013 16:43:19 +0000 (16:43 +0000)]
Merge "audioflinger: fix offload track transition" into klp-dev

10 years agoMerge "audioflinger: fix offload resume after drain" into klp-dev
Eric Laurent [Thu, 14 Nov 2013 16:42:30 +0000 (16:42 +0000)]
Merge "audioflinger: fix offload resume after drain" into klp-dev

10 years agoMerge "stagefright: limit default max-input-size for AVC" into klp-dev
Lajos Molnar [Wed, 13 Nov 2013 23:53:42 +0000 (23:53 +0000)]
Merge "stagefright: limit default max-input-size for AVC" into klp-dev

10 years agoMerge "AwesomePlayer: Improve performance on high-fps clips" into klp-dev
Lajos Molnar [Wed, 13 Nov 2013 23:52:37 +0000 (23:52 +0000)]
Merge "AwesomePlayer: Improve performance on high-fps clips" into klp-dev

10 years agostagefright: limit default max-input-size for AVC
Lajos Molnar [Wed, 13 Nov 2013 22:11:41 +0000 (14:11 -0800)]
stagefright: limit default max-input-size for AVC

AVC has a compression ratio of at least 2.  Account for this, as
some codecs refuse exorbitant max-input-size requests.

Change-Id: Ib68b485879ba33a12a486f2ce18fe100be977699
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 11599364

10 years agoMerge "Only initialize sniffers once, don't hold mutex while sniffing" into klp-dev
Marco Nelissen [Wed, 13 Nov 2013 18:11:54 +0000 (18:11 +0000)]
Merge "Only initialize sniffers once, don't hold mutex while sniffing" into klp-dev

10 years agoMerge "Ignore transport stream packets with the "transport_error_indicator" bit set...
Andreas Huber [Wed, 13 Nov 2013 18:06:01 +0000 (18:06 +0000)]
Merge "Ignore transport stream packets with the "transport_error_indicator" bit set" into klp-dev

10 years agoam 27ae268a: am 00cb884f: Merge "StageFright: Removes hacks for Nvidia MPEG2 decoder...
Adam Hampson [Wed, 13 Nov 2013 17:25:33 +0000 (09:25 -0800)]
am 27ae268a: am 00cb884f: Merge "StageFright: Removes hacks for Nvidia MPEG2 decoder" into jb-mr2-dev

* commit '27ae268af29b25d85f83aa34e92ac8b7f6c87c6f':
  StageFright: Removes hacks for Nvidia MPEG2 decoder