OSDN Git Service

android-x86/frameworks-av.git
9 years agoAdd AUtils::isInRange, and use it to detect malformed MPEG4 nal sizes
Lajos Molnar [Thu, 2 Apr 2015 02:32:25 +0000 (19:32 -0700)]
Add AUtils::isInRange, and use it to detect malformed MPEG4 nal sizes

Bug: 19641538
Change-Id: I5aae3f100846c125decc61eec7cd6563e3f33777

9 years agoam b919a3a3: am 64290793: Merge "Fix integer underflow in ESDS processing" into klp-dev
Nick Kralevich [Fri, 10 Apr 2015 23:44:36 +0000 (23:44 +0000)]
am b919a3a3: am 64290793: Merge "Fix integer underflow in ESDS processing" into klp-dev

* commit 'b919a3a3d38c4b1cbb378c38cc6154a81ebe01c7':
  Fix integer underflow in ESDS processing

9 years agoam 47759307: am 17b625b7: Merge "Fix integer overflow during MP4 atom processing...
Nick Kralevich [Fri, 10 Apr 2015 23:44:35 +0000 (23:44 +0000)]
am 47759307: am 17b625b7: Merge "Fix integer overflow during MP4 atom processing" into klp-dev

* commit '4775930799bd9a9fbad8efe5d338e890dd7444ed':
  Fix integer overflow during MP4 atom processing

9 years agoam 4a131250: am 030d8d0a: Fix several ineffective integer overflow checks
Joshua J. Drake [Fri, 10 Apr 2015 23:44:30 +0000 (23:44 +0000)]
am 4a131250: am 030d8d0a: Fix several ineffective integer overflow checks

* commit '4a13125033f2130cadb4c48b3e6e0085d8c98829':
  Fix several ineffective integer overflow checks

9 years agoam 64290793: Merge "Fix integer underflow in ESDS processing" into klp-dev
Nick Kralevich [Fri, 10 Apr 2015 23:34:59 +0000 (23:34 +0000)]
am 64290793: Merge "Fix integer underflow in ESDS processing" into klp-dev

* commit '6429079345404932c5be5956efc7154390d2ed0e':
  Fix integer underflow in ESDS processing

9 years agoam 17b625b7: Merge "Fix integer overflow during MP4 atom processing" into klp-dev
Nick Kralevich [Fri, 10 Apr 2015 23:34:57 +0000 (23:34 +0000)]
am 17b625b7: Merge "Fix integer overflow during MP4 atom processing" into klp-dev

* commit '17b625b7f51b75fde6640c737474b8b2c51412bf':
  Fix integer overflow during MP4 atom processing

9 years agoam 030d8d0a: Fix several ineffective integer overflow checks
Joshua J. Drake [Fri, 10 Apr 2015 23:34:56 +0000 (23:34 +0000)]
am 030d8d0a: Fix several ineffective integer overflow checks

* commit '030d8d0a557097b88d6ecbf6d04823213512b620':
  Fix several ineffective integer overflow checks

9 years agoMerge "Fix integer underflow in ESDS processing" into klp-dev
Nick Kralevich [Fri, 10 Apr 2015 23:16:02 +0000 (23:16 +0000)]
Merge "Fix integer underflow in ESDS processing" into klp-dev

9 years agoMerge "Fix integer overflow during MP4 atom processing" into klp-dev
Nick Kralevich [Fri, 10 Apr 2015 23:15:52 +0000 (23:15 +0000)]
Merge "Fix integer overflow during MP4 atom processing" into klp-dev

9 years agoFix integer underflow in ESDS processing
Joshua J. Drake [Thu, 9 Apr 2015 04:53:10 +0000 (23:53 -0500)]
Fix integer underflow in ESDS processing

Several arithmetic operations within parseESDescriptor could underflow, leading
to an out-of-bounds read operation. Ensure that subtractions from 'size' do not
cause it to wrap around.

Bug: 20139950

(cherry picked from commit 07c0f59d6c48874982d2b5c713487612e5af465a)

Change-Id: I377d21051e07ca654ea1f7037120429d3f71924a

9 years agoFix integer overflow during MP4 atom processing
Joshua J. Drake [Thu, 9 Apr 2015 04:44:57 +0000 (23:44 -0500)]
Fix integer overflow during MP4 atom processing

A few sample table related FourCC values are handled by the
setSampleToChunkParams function. An integer overflow exists within this
function. Validate that mNumSampleToChunkOffets will not cause an integer
overflow.

Bug: 20139950

(cherry picked from commit c24607c29c96f939aed9e33bfa702b1dd79da4b7)

Change-Id: I49086952451b09a234d8b82669251ab9f1ef58d9

9 years agoFix several ineffective integer overflow checks
Joshua J. Drake [Thu, 9 Apr 2015 04:23:55 +0000 (23:23 -0500)]
Fix several ineffective integer overflow checks

Commit edd4a76 (which addressed bugs 153287081534261515342751) added
several integer overflow checks. Unfortunately, those checks fail to take into
account integer promotion rules and are thus themselves subject to an integer
overflow. Cast the sizeof() operator to a uint64_t to force promotion while
multiplying.

Bug: 20139950

(cherry picked from commit e2e812e58e8d2716b00d7d82db99b08d3afb4b32)

Change-Id: I080eb3fa147601f18cedab86e0360406c3963d7b

9 years agoDO NOT MERGE - audio policy service: fix possible memory overflow
Eric Laurent [Fri, 6 Feb 2015 18:44:24 +0000 (10:44 -0800)]
DO NOT MERGE - audio policy service: fix possible memory overflow

Add limit on number of audio ports and patches requested by
listaudioPorts() and listAudioPatches().

Bug: 19261727.
Change-Id: I21dfdf11cf805734cc3b7b2a85762c5598f60580
(cherry picked from commit 1d670b11313250442455a22f1056ad649d607fb2)

9 years agoam ae6965ae: am 3aef3560: am e360f0f6: IAudioPolicyService: bound array size in query...
Eric Laurent [Tue, 11 Nov 2014 01:34:39 +0000 (01:34 +0000)]
am ae6965ae: am 3aef3560: am e360f0f6: IAudioPolicyService: bound array size in queryDefaultPreProcessing automerge: 99370d2
automerge: cb5c8c0

* commit 'cb5c8c0de3f796f6a2499d4467abe59e11ffa8f5':

9 years agoam ae6965ae: am 3aef3560: am e360f0f6: IAudioPolicyService: bound array size in query...
Eric Laurent [Tue, 11 Nov 2014 00:22:26 +0000 (00:22 +0000)]
am ae6965ae: am 3aef3560: am e360f0f6: IAudioPolicyService: bound array size in queryDefaultPreProcessing
automerge: 99370d2

* commit '99370d2da54d7537ffda7fef1f6ef36f8b690321':
  IAudioPolicyService: bound array size in queryDefaultPreProcessing

9 years agoam 99370d2d: am ae6965ae: am 3aef3560: am e360f0f6: IAudioPolicyService: bound array...
Eric Laurent [Mon, 10 Nov 2014 23:31:32 +0000 (23:31 +0000)]
am 99370d2d: am ae6965ae: am 3aef3560: am e360f0f6: IAudioPolicyService: bound array size in queryDefaultPreProcessing

* commit '99370d2da54d7537ffda7fef1f6ef36f8b690321':
  IAudioPolicyService: bound array size in queryDefaultPreProcessing

9 years agoam ae6965ae: am 3aef3560: am e360f0f6: IAudioPolicyService: bound array size in query...
Eric Laurent [Mon, 10 Nov 2014 23:28:27 +0000 (23:28 +0000)]
am ae6965ae: am 3aef3560: am e360f0f6: IAudioPolicyService: bound array size in queryDefaultPreProcessing

* commit 'ae6965ae7664aaea489a8d58358035610075c9af':
  IAudioPolicyService: bound array size in queryDefaultPreProcessing

9 years agoam 3aef3560: am e360f0f6: IAudioPolicyService: bound array size in queryDefaultPrePro...
Eric Laurent [Mon, 10 Nov 2014 23:20:25 +0000 (23:20 +0000)]
am 3aef3560: am e360f0f6: IAudioPolicyService: bound array size in queryDefaultPreProcessing

* commit '3aef35600523eb6b4ccc8086a8913e80701a031a':
  IAudioPolicyService: bound array size in queryDefaultPreProcessing

9 years agoam e360f0f6: IAudioPolicyService: bound array size in queryDefaultPreProcessing
Eric Laurent [Mon, 10 Nov 2014 23:16:22 +0000 (23:16 +0000)]
am e360f0f6: IAudioPolicyService: bound array size in queryDefaultPreProcessing

* commit 'e360f0f6cad290f69e07fd3a20dcf11a1dbc4160':
  IAudioPolicyService: bound array size in queryDefaultPreProcessing

9 years agoIAudioPolicyService: bound array size in queryDefaultPreProcessing
Eric Laurent [Wed, 5 Nov 2014 20:15:36 +0000 (12:15 -0800)]
IAudioPolicyService: bound array size in queryDefaultPreProcessing

Bug: 18226810.
Change-Id: Ib8e2bfe835a8681aac50bf23161db14e50c9a124
(cherry picked from commit 74adca9ad30b7f8a70d40c5237bade0d16c4ea58)

9 years agoaudioflinger: fix duplicating thread output buffers clear
Eric Laurent [Sat, 8 Nov 2014 01:28:28 +0000 (17:28 -0800)]
audioflinger: fix duplicating thread output buffers clear

Also clear mix buffer in DuplicatingThread::threadLoop_mix()
instead of just sink buffer when output threads are not
ready.

Bug: 18262127.
Change-Id: I4c22bbeaccdcc8d7c10c5882dde3439eb73d6ede
(cherry picked from commit 02b5708776ba2a9b4ff8c09008483aef7dbe38c7)

9 years agoam 42f785c5: am 4fbe49a8: am 96016c2d: am 9944ff09: am 70c3507d: am 450b10c9: am...
Eric Laurent [Mon, 3 Nov 2014 21:18:07 +0000 (21:18 +0000)]
am 42f785c5: am 4fbe49a8: am 96016c2d: am 9944ff09: am 70c3507d: am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls. automerge: ca83dd2
automerge: ba30b45

* commit 'ba30b4547c6b7ca949ef74e760ccc6157f435690':

9 years agoRevert "audio: prevent larger than required sleeps - DO NOT MERGE" automerge: b6dcdbf...
Chris Elliott [Mon, 3 Nov 2014 21:14:34 +0000 (21:14 +0000)]
Revert "audio: prevent larger than required sleeps - DO NOT MERGE" automerge: b6dcdbf  -s ours
automerge: ed394bc  -s ours

* commit 'ed394bcfa79da3dd25cd24d485aa0d063818a977':

9 years agoaudio: prevent larger than required sleeps - DO NOT MERGE automerge: 620208d -s...
Chris Elliott [Mon, 3 Nov 2014 21:14:28 +0000 (21:14 +0000)]
audio: prevent larger than required sleeps - DO NOT MERGE automerge: 620208d  -s ours
automerge: b2c3ad1  -s ours

* commit 'b2c3ad13cb248159910bef6ac51f7e6023e133b9':

9 years agoRevert "audio: prevent larger than required sleeps - DO NOT MERGE" automerge: 2feb18d...
Chris Elliott [Mon, 3 Nov 2014 21:13:02 +0000 (21:13 +0000)]
Revert "audio: prevent larger than required sleeps - DO NOT MERGE" automerge: 2feb18d  -s ours
automerge: bb92112  -s ours

* commit 'bb9211236cf6104d16fc09b58550ce692d9af4e9':

9 years agoaudio: prevent larger than required sleeps - DO NOT MERGE automerge: 8c0417c -s...
Haynes Mathew George [Mon, 3 Nov 2014 21:12:35 +0000 (21:12 +0000)]
audio: prevent larger than required sleeps - DO NOT MERGE automerge: 8c0417c  -s ours
automerge: 52ea677  -s ours

* commit '52ea677828b23b216484dd34f84da2699ed850e3':

9 years agoam 42f785c5: am 4fbe49a8: am 96016c2d: am 9944ff09: am 70c3507d: am 450b10c9: am...
Eric Laurent [Fri, 31 Oct 2014 01:33:21 +0000 (01:33 +0000)]
am 42f785c5: am 4fbe49a8: am 96016c2d: am 9944ff09: am 70c3507d: am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.
automerge: ca83dd2

* commit 'ca83dd27f6c662bcbb0cea204c4df7ca77a479fd':
  audio policy: validate stream type received from binder calls.

9 years agoam ca83dd27: (-s ours) am 42f785c5: am 4fbe49a8: am 96016c2d: am 9944ff09: am 70c3507...
Eric Laurent [Fri, 31 Oct 2014 00:50:17 +0000 (00:50 +0000)]
am ca83dd27: (-s ours) am 42f785c5: am 4fbe49a8: am 96016c2d: am 9944ff09: am 70c3507d: am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit 'ca83dd27f6c662bcbb0cea204c4df7ca77a479fd':
  audio policy: validate stream type received from binder calls.

9 years agoam 42f785c5: am 4fbe49a8: am 96016c2d: am 9944ff09: am 70c3507d: am 450b10c9: am...
Eric Laurent [Fri, 31 Oct 2014 00:26:23 +0000 (00:26 +0000)]
am 42f785c5: am 4fbe49a8: am 96016c2d: am 9944ff09: am 70c3507d: am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit '42f785c5d5ae596d781171327c98c541f0517feb':
  audio policy: validate stream type received from binder calls.

9 years agoam 4fbe49a8: am 96016c2d: am 9944ff09: am 70c3507d: am 450b10c9: am d0f9dc71: am...
Eric Laurent [Fri, 31 Oct 2014 00:17:14 +0000 (00:17 +0000)]
am 4fbe49a8: am 96016c2d: am 9944ff09: am 70c3507d: am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit '4fbe49a83d41a64d44e363ccd691e7bfc41bb6af':
  audio policy: validate stream type received from binder calls.

9 years agoam 96016c2d: am 9944ff09: am 70c3507d: am 450b10c9: am d0f9dc71: am e0a65f30: am...
Eric Laurent [Fri, 31 Oct 2014 00:11:15 +0000 (00:11 +0000)]
am 96016c2d: am 9944ff09: am 70c3507d: am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit '96016c2d583ccca9fffd6974cb9473f7effd6cf5':
  audio policy: validate stream type received from binder calls.

9 years agoam 9944ff09: am 70c3507d: am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am...
Eric Laurent [Thu, 30 Oct 2014 23:55:43 +0000 (23:55 +0000)]
am 9944ff09: am 70c3507d: am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit '9944ff09ac4eb076cab994ef245b0103f60836ba':
  audio policy: validate stream type received from binder calls.

9 years agoam 70c3507d: am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio...
Eric Laurent [Thu, 30 Oct 2014 23:48:47 +0000 (23:48 +0000)]
am 70c3507d: am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit '70c3507d915baaa5a0ab163eeb0a445030f4f492':
  audio policy: validate stream type received from binder calls.

9 years agoam 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: valida...
Eric Laurent [Thu, 30 Oct 2014 23:41:08 +0000 (23:41 +0000)]
am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit '450b10c97514411ef1d0d887d4e18851fd286f0b':
  audio policy: validate stream type received from binder calls.

9 years agoam d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream...
Eric Laurent [Thu, 30 Oct 2014 23:25:15 +0000 (23:25 +0000)]
am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit 'd0f9dc7156e531d5cd0615f6e682d2449e08e9a7':
  audio policy: validate stream type received from binder calls.

9 years agoam e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received...
Eric Laurent [Thu, 30 Oct 2014 23:01:01 +0000 (23:01 +0000)]
am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit 'e0a65f3008ac5874106b21d03e19296c8015da41':
  audio policy: validate stream type received from binder calls.

9 years agoam f5af3a72: am 6d80b687: audio policy: validate stream type received from binder...
Eric Laurent [Thu, 30 Oct 2014 22:52:48 +0000 (22:52 +0000)]
am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit 'f5af3a72f308cd4dff7859e62922ee5a13bd4c15':
  audio policy: validate stream type received from binder calls.

9 years agoam 6d80b687: audio policy: validate stream type received from binder calls.
Eric Laurent [Thu, 30 Oct 2014 22:44:00 +0000 (22:44 +0000)]
am 6d80b687: audio policy: validate stream type received from binder calls.

* commit '6d80b687c3b8d9c8da7cdad7d9813aa51c1cf15e':
  audio policy: validate stream type received from binder calls.

9 years agoaudio policy: validate stream type received from binder calls.
Eric Laurent [Thu, 30 Oct 2014 21:46:18 +0000 (14:46 -0700)]
audio policy: validate stream type received from binder calls.

Bug: 18001784.
Bug: 18002005.
Change-Id: If08866a3c21bcbfd8cdbbf8336bcf1faad66f321

9 years agoRevert "audio: prevent larger than required sleeps - DO NOT MERGE"
Chris Elliott [Tue, 28 Oct 2014 23:27:54 +0000 (23:27 +0000)]
Revert "audio: prevent larger than required sleeps - DO NOT MERGE"
automerge: b6dcdbf  -s ours

* commit 'b6dcdbf436ffacb52a41ac8ef9b07f99fd64779f':
  Revert "audio: prevent larger than required sleeps - DO NOT MERGE"

9 years agoaudio: prevent larger than required sleeps - DO NOT MERGE
Chris Elliott [Tue, 28 Oct 2014 23:27:51 +0000 (23:27 +0000)]
audio: prevent larger than required sleeps - DO NOT MERGE
automerge: 620208d  -s ours

* commit '620208dc0bbd7a0792702df3ab08800fdad60cec':
  audio: prevent larger than required sleeps - DO NOT MERGE

9 years agoRevert "audio: prevent larger than required sleeps - DO NOT MERGE"
Chris Elliott [Tue, 28 Oct 2014 23:26:28 +0000 (23:26 +0000)]
Revert "audio: prevent larger than required sleeps - DO NOT MERGE"
automerge: 2feb18d  -s ours

* commit '2feb18ddfdbd20941ebcc3314780a582da5608e4':
  Revert "audio: prevent larger than required sleeps - DO NOT MERGE"

9 years agoaudio: prevent larger than required sleeps - DO NOT MERGE
Haynes Mathew George [Tue, 28 Oct 2014 23:25:57 +0000 (23:25 +0000)]
audio: prevent larger than required sleeps - DO NOT MERGE
automerge: 8c0417c  -s ours

* commit '8c0417c173d1fd618ae54e2d721b0ec360ea70cc':
  audio: prevent larger than required sleeps - DO NOT MERGE

9 years agoMerge "64 bit fixes for NdkMediaExtractor" into lmp-dev
Marco Nelissen [Thu, 23 Oct 2014 21:30:57 +0000 (21:30 +0000)]
Merge "64 bit fixes for NdkMediaExtractor" into lmp-dev

9 years ago64 bit fixes for NdkMediaExtractor
Marco Nelissen [Thu, 23 Oct 2014 18:36:38 +0000 (11:36 -0700)]
64 bit fixes for NdkMediaExtractor

Bug: 18094443
Change-Id: Iae049012966707f5c187c61ed68407f22c662b25

9 years agoCameraService: Disconnect: Release mutex while waiting for joins.
Eino-Ville Talvala [Wed, 22 Oct 2014 21:21:12 +0000 (14:21 -0700)]
CameraService: Disconnect: Release mutex while waiting for joins.

The threads shutting down may have callpaths that require taking the
binder interface mutex, so waiting to join them with that mutex held
can lead to deadlocks.

A specific instance is StreamingProcessor calling dataCallbackTimestamp,
which can immediately lead to a Camera2Client::releaseRecordingFrame call,
which requires the binder interface mutex. If this call happens right when
shutdown is occurring, and Camera2Client::disconnect is holding the mutex,
deadlock ensues.

Bug: 17997578
Change-Id: I71253cd5542b5920ad205976d315110ca0043d94

9 years agoMerge "release camera without holding CameraSource mutex" into lmp-dev
Chong Zhang [Wed, 22 Oct 2014 00:56:56 +0000 (00:56 +0000)]
Merge "release camera without holding CameraSource mutex" into lmp-dev

9 years agoMerge "stagefright: try to free codec instance if MediaCodec.release hangs" into...
Lajos Molnar [Wed, 22 Oct 2014 00:29:43 +0000 (00:29 +0000)]
Merge "stagefright: try to free codec instance if MediaCodec.release hangs" into lmp-dev

9 years agoMerge "Stagefright: MediaCodec: shutdown allocated codec on error" into lmp-dev
Lajos Molnar [Wed, 22 Oct 2014 00:29:29 +0000 (00:29 +0000)]
Merge "Stagefright: MediaCodec: shutdown allocated codec on error" into lmp-dev

9 years agorelease camera without holding CameraSource mutex
Chong Zhang [Tue, 21 Oct 2014 21:12:25 +0000 (14:12 -0700)]
release camera without holding CameraSource mutex

Bug: 17997578
Change-Id: Iba93848ad10ba84d2d836573da7ce242c761582f

9 years agostagefright: try to free codec instance if MediaCodec.release hangs
Lajos Molnar [Tue, 21 Oct 2014 23:07:52 +0000 (16:07 -0700)]
stagefright: try to free codec instance if MediaCodec.release hangs

Bug: 18033275
Change-Id: If86cd26566d7b75941976f37829bbec619800778

9 years agomediaplayer: don't report position past last queued position
Lajos Molnar [Tue, 21 Oct 2014 16:36:43 +0000 (09:36 -0700)]
mediaplayer: don't report position past last queued position

also reanchor offloaded audio track correctly

Bug: 17653702
Change-Id: If05394d3b119be8d80b7764847496246d34a2133

9 years agoStagefright: MediaCodec: shutdown allocated codec on error
Praveen Chavan [Wed, 15 Oct 2014 09:24:34 +0000 (02:24 -0700)]
Stagefright: MediaCodec: shutdown allocated codec on error

If MediaCodec sees a fatal error and transitions to
UNINITIALIZED state, The codec may still be alive (with an
exception of 'mediaserver-died' error).
Handle Shutdown of the codec during release().

Bug: 17784012
Bug: 18033275

Change-Id: I891e036499d9b440a57f77fb735a5ba4da9a6e43

9 years agoaudio policy: fix effect handle leak
Eric Laurent [Tue, 21 Oct 2014 16:07:11 +0000 (09:07 -0700)]
audio policy: fix effect handle leak

Fix ref counting error in AudioPolicyEffect::addInputEffects()
and addOutputSessionEffects()

Bug: 17675112.
Change-Id: I5267d1024a585919f66ead83662e57b78ba53540

9 years agomediaplayer: limit scheduling video frames into the future
Lajos Molnar [Tue, 21 Oct 2014 00:47:54 +0000 (17:47 -0700)]
mediaplayer: limit scheduling video frames into the future

This addresses when video timestamps jumps before an audio timestamp,
but still works on slideshow video clips (<=1fps).

This, however, will not skip time-changes on video-only live video
streams, as we cannot distinguish live slideshow video clips from
non-slideshow ones.

Bug: 18032127
Change-Id: I959a714edfe1c8cf3b84704c693dcd1b3e5b7855

9 years agoNuPlayer: set anchor time for each audio buffer.
Ronghua Wu [Mon, 20 Oct 2014 06:12:50 +0000 (23:12 -0700)]
NuPlayer: set anchor time for each audio buffer.

And use anchor time to compute current position

Bug: 17999949
Bug: 18008307
Bug: 18032127
Change-Id: Ie493c9a1d45d7b788aef65d863f710da6326fcc1

9 years agoFix the fix
Marco Nelissen [Mon, 20 Oct 2014 20:15:38 +0000 (13:15 -0700)]
Fix the fix

We need to clear the buffer a little more often.

Bug: 18023017
Change-Id: If8a522b9133a4269e2435af8958f6ced322e71e9

9 years agoMerge "Clear effect buffer before sending to chain" into lmp-dev
Marco Nelissen [Mon, 20 Oct 2014 14:44:58 +0000 (14:44 +0000)]
Merge "Clear effect buffer before sending to chain" into lmp-dev

9 years agomerge in lmp-release history after reset to e9234f17dfbb192c96b122b9e0ce8cd9015d1589
The Android Automerger [Mon, 20 Oct 2014 00:10:22 +0000 (17:10 -0700)]
merge in lmp-release history after reset to e9234f17dfbb192c96b122b9e0ce8cd9015d1589

9 years agoClear effect buffer before sending to chain
Marco Nelissen [Fri, 17 Oct 2014 23:39:39 +0000 (16:39 -0700)]
Clear effect buffer before sending to chain

otherwise the effect might get a buffer with previous data instead
of silence.

Bug: 18023017
Change-Id: Ic6be5ce0e74552aac2a0cce9c660893f9ad27f5c

9 years agoMerge "Fix AudioTrack retrograde getPosition when restoring tracks" into lmp-dev
Andy Hung [Fri, 17 Oct 2014 20:38:10 +0000 (20:38 +0000)]
Merge "Fix AudioTrack retrograde getPosition when restoring tracks" into lmp-dev

9 years agoFix AudioTrack retrograde getPosition when restoring tracks
Andy Hung [Fri, 17 Oct 2014 00:54:34 +0000 (17:54 -0700)]
Fix AudioTrack retrograde getPosition when restoring tracks

mReleased represents the number of frames written to the
track, but was cleared on start() causing a mismatch if the
client wrote to the track before starting.  Moved the clearing
to entering the STATE_STOPPED or STATE_FLUSHED state.

Bug: 18017947
Bug: 18022276
Change-Id: I3788c98c4c3c4d9cc004378432797b3f3138e22e

9 years agomove audio sink open/close to NuPlayerRenderer
Chong Zhang [Thu, 16 Oct 2014 00:05:08 +0000 (17:05 -0700)]
move audio sink open/close to NuPlayerRenderer

Bug: 17675112
Change-Id: I7eb3d02380658f848baedafe2aea287586ccf016

9 years agoMerge "move audio sink open/close to NuPlayerRenderer" into lmp-dev
Chong Zhang [Fri, 17 Oct 2014 01:10:23 +0000 (01:10 +0000)]
Merge "move audio sink open/close to NuPlayerRenderer" into lmp-dev

9 years agomove audio sink open/close to NuPlayerRenderer
Chong Zhang [Thu, 16 Oct 2014 00:05:08 +0000 (17:05 -0700)]
move audio sink open/close to NuPlayerRenderer

Bug: 17675112
Change-Id: I7eb3d02380658f848baedafe2aea287586ccf016

9 years agoFix freed memory references
Marco Nelissen [Thu, 16 Oct 2014 17:51:23 +0000 (10:51 -0700)]
Fix freed memory references

MPEG4Source references memory owned by MPEG4Extractor, and therefore an
MPEG4Extractor needs to be kept around as long as the MPEG4Sources obtained
from it exist.

Bug: 17890354
Change-Id: I399e18ec78517559ccc0914ffc7e099687c0ba51

9 years agoMerge "Fix freed memory references" into lmp-dev
Lajos Molnar [Thu, 16 Oct 2014 18:59:22 +0000 (18:59 +0000)]
Merge "Fix freed memory references" into lmp-dev

9 years agoam b6dcdbf4: (-s ours) Revert "audio: prevent larger than required sleeps - DO NOT...
Chris Elliott [Thu, 16 Oct 2014 18:23:13 +0000 (18:23 +0000)]
am b6dcdbf4: (-s ours) Revert "audio: prevent larger than required sleeps - DO NOT MERGE"

* commit 'b6dcdbf436ffacb52a41ac8ef9b07f99fd64779f':
  Revert "audio: prevent larger than required sleeps - DO NOT MERGE"

9 years agoFix freed memory references
Marco Nelissen [Thu, 16 Oct 2014 17:51:23 +0000 (10:51 -0700)]
Fix freed memory references

MPEG4Source references memory owned by MPEG4Extractor, and therefore an
MPEG4Extractor needs to be kept around as long as the MPEG4Sources obtained
from it exist.

Bug: 17890354
Change-Id: I399e18ec78517559ccc0914ffc7e099687c0ba51

9 years agomerge in lmp-release history after reset to a2d4a6dac432f0c4f543d79b9a63c55ae91f81d6
The Android Automerger [Thu, 16 Oct 2014 13:11:49 +0000 (06:11 -0700)]
merge in lmp-release history after reset to a2d4a6dac432f0c4f543d79b9a63c55ae91f81d6

9 years agoRevert "audio: prevent larger than required sleeps - DO NOT MERGE"
Chris Elliott [Thu, 16 Oct 2014 02:17:27 +0000 (02:17 +0000)]
Revert "audio: prevent larger than required sleeps - DO NOT MERGE"

Revert change if we require a build beyond P

This reverts commit 620208dc0bbd7a0792702df3ab08800fdad60cec.

Change-Id: I07f65e35dbd9f814725f50f7bb346f7b285f41aa

9 years agoaudio policy: Fix for voice call audio loss
Haynes Mathew George [Mon, 13 Oct 2014 20:05:22 +0000 (13:05 -0700)]
audio policy: Fix for voice call audio loss

Audio Policy service filters out one of the create patch
commands when it finds two pending commands with the same
patch handles. Due to this routing command is not received
to audio HAL and the voice call set up fails.
Fix this by filtering create patch commands only when
they are issued on the same output.

authored-by: Karthik Reddy Katta <a_katta@codeaurora.org>

Bug: 17787282
Change-Id: If36f0ab71e9b72d6a8eb61d31f762bc5e1683b89

9 years agoam 620208dc: (-s ours) audio: prevent larger than required sleeps - DO NOT MERGE
Chris Elliott [Wed, 15 Oct 2014 22:10:42 +0000 (22:10 +0000)]
am 620208dc: (-s ours) audio: prevent larger than required sleeps - DO NOT MERGE

* commit '620208dc0bbd7a0792702df3ab08800fdad60cec':
  audio: prevent larger than required sleeps - DO NOT MERGE

9 years agoaudio: prevent larger than required sleeps - DO NOT MERGE
Chris Elliott [Wed, 15 Oct 2014 20:46:15 +0000 (20:46 +0000)]
audio: prevent larger than required sleeps - DO NOT MERGE

This will be cherry picked into P build after O completes for other devices.

This reverts the revert from commit 2feb18ddfdbd20941ebcc3314780a582da5608e4.

b/17962037

From: Haynes Mathew George <hgeorge@codeaurora.org>
Date: Wed, 26 Mar 2014 16:18:42 -0700
Subject: [PATCH] AudioTrack: prevent larger than required sleeps

AudioTrackThread can end up waiting for larger than necessary
time for free space to be available in the cblk. Fix this by
waiting on the cblk futex instead of the (internal) condition variable.

Change-Id: Iba5b266f9b4082b3833f4abd52ebc6601c8e3034

9 years agoam 2feb18dd: (-s ours) Revert "audio: prevent larger than required sleeps - DO NOT...
Chris Elliott [Wed, 15 Oct 2014 19:11:37 +0000 (19:11 +0000)]
am 2feb18dd: (-s ours) Revert "audio: prevent larger than required sleeps - DO NOT MERGE"

* commit '2feb18ddfdbd20941ebcc3314780a582da5608e4':
  Revert "audio: prevent larger than required sleeps - DO NOT MERGE"

9 years agomerge in lmp-release history after reset to 9d2189ffcf1142b2948ce3065c32521ed7d966c4
The Android Automerger [Wed, 15 Oct 2014 13:11:39 +0000 (06:11 -0700)]
merge in lmp-release history after reset to 9d2189ffcf1142b2948ce3065c32521ed7d966c4

9 years agoRevert "audio: prevent larger than required sleeps - DO NOT MERGE"
Chris Elliott [Wed, 15 Oct 2014 00:49:17 +0000 (00:49 +0000)]
Revert "audio: prevent larger than required sleeps - DO NOT MERGE"

This reverts commit 8c0417c173d1fd618ae54e2d721b0ec360ea70cc.

Reverting as we only wanted to include this CL the KNX01M build

Change-Id: Ib53292de658078285a38710915168e1746486fea

9 years agoMerge "Camera2Client: avoid two consecutive sets of configure_streams calls" into...
Zhijun He [Tue, 14 Oct 2014 23:31:50 +0000 (23:31 +0000)]
Merge "Camera2Client: avoid two consecutive sets of configure_streams calls" into lmp-dev

9 years agoam 8c0417c1: (-s ours) audio: prevent larger than required sleeps - DO NOT MERGE
Haynes Mathew George [Tue, 14 Oct 2014 22:03:36 +0000 (22:03 +0000)]
am 8c0417c1: (-s ours) audio: prevent larger than required sleeps - DO NOT MERGE

* commit '8c0417c173d1fd618ae54e2d721b0ec360ea70cc':
  audio: prevent larger than required sleeps - DO NOT MERGE

9 years agoCamera2Client: avoid two consecutive sets of configure_streams calls
Zhijun He [Tue, 14 Oct 2014 05:20:37 +0000 (22:20 -0700)]
Camera2Client: avoid two consecutive sets of configure_streams calls

When mediaRecorder starts without an active preview stream, Camera2Client
starts preview then immediately start recording, which could cause the second
configure_streams to call into HAL before any preview request is sent. This
could cause HAL to run into bad state. This change work around this issue
by making sure the first preview request is submitted to the HAL before
start recording.

Bug: 17915062
Change-Id: I94ae64ee76487603695a469240da601ddcb29a66

9 years agoaudio: prevent larger than required sleeps - DO NOT MERGE
Haynes Mathew George [Thu, 9 Oct 2014 12:06:00 +0000 (20:06 +0800)]
audio: prevent larger than required sleeps - DO NOT MERGE

b/17962037

From: Haynes Mathew George <hgeorge@codeaurora.org>
Date: Wed, 26 Mar 2014 16:18:42 -0700
Subject: [PATCH] AudioTrack: prevent larger than required sleeps

AudioTrackThread can end up waiting for larger than necessary
time for free space to be available in the cblk. Fix this by
waiting on the cblk futex instead of the (internal) condition variable.

Change-Id: I75bd14cd46f3b75afe0ea8bd9b48d7a2f95f654a

9 years agomerge in lmp-release history after reset to 447898bca790fae2fdae304073162e980d816b79
The Android Automerger [Tue, 14 Oct 2014 13:11:19 +0000 (06:11 -0700)]
merge in lmp-release history after reset to 447898bca790fae2fdae304073162e980d816b79

9 years agoMerge "ACodec: only check crop rect on output port" into lmp-dev
Lajos Molnar [Tue, 14 Oct 2014 08:31:20 +0000 (08:31 +0000)]
Merge "ACodec: only check crop rect on output port" into lmp-dev

9 years agoMerge "NuPlayer: query current position from NuPlayerRenderer." into lmp-dev
Lajos Molnar [Tue, 14 Oct 2014 08:00:15 +0000 (08:00 +0000)]
Merge "NuPlayer: query current position from NuPlayerRenderer." into lmp-dev

9 years agostagefright: fix surface input handling of software encoders
Lajos Molnar [Sat, 11 Oct 2014 00:15:17 +0000 (17:15 -0700)]
stagefright: fix surface input handling of software encoders

- added SoftVideoEncoder for common color conversion and
  extension handling logic
- fix YUV420 SemiPlanar handling that should be NV12 not NV21

Bug: 17935149
Change-Id: I9b8d05678b1862dd37bf349ea83d67bdf1bb5560

9 years agostagefright: support passing GraphicBuffer in metadata buffer
Lajos Molnar [Sat, 11 Oct 2014 00:14:17 +0000 (17:14 -0700)]
stagefright: support passing GraphicBuffer in metadata buffer

Bug: 17935149
Change-Id: I6bb5dd654e498a7153410afc052c2c8f7f35e44d

9 years agoNuPlayer: query current position from NuPlayerRenderer.
Ronghua Wu [Wed, 8 Oct 2014 22:13:29 +0000 (15:13 -0700)]
NuPlayer: query current position from NuPlayerRenderer.

Bug: 17653702
Change-Id: Ie0b1f92420b071a0cfcd389f5e7917a54d332541

9 years agoMerge "NuPlayerDriver: request seek notification when prepare*() is called in STOPPED...
Wei Jia [Mon, 13 Oct 2014 20:27:43 +0000 (20:27 +0000)]
Merge "NuPlayerDriver: request seek notification when prepare*() is called in STOPPED state." into lmp-dev

9 years agoNuPlayerDriver: request seek notification when prepare*() is called in STOPPED state.
Wei Jia [Sat, 11 Oct 2014 22:33:00 +0000 (15:33 -0700)]
NuPlayerDriver: request seek notification when prepare*() is called in STOPPED state.

Bug: 17596535
Change-Id: Ib43f91f9b0d0a52112aa1fa8352adac15aaf80f8

9 years agoMerge "handle case OMX_AUDIO_CodingG711 in ACodec::getPortFormat" into lmp-dev
Chong Zhang [Mon, 13 Oct 2014 19:48:51 +0000 (19:48 +0000)]
Merge "handle case OMX_AUDIO_CodingG711 in ACodec::getPortFormat" into lmp-dev

9 years agoMerge "ACodec: process deferred messages when entering Loaded state." into lmp-dev
Wei Jia [Mon, 13 Oct 2014 18:41:03 +0000 (18:41 +0000)]
Merge "ACodec: process deferred messages when entering Loaded state." into lmp-dev

9 years agohandle case OMX_AUDIO_CodingG711 in ACodec::getPortFormat
Chong Zhang [Mon, 13 Oct 2014 05:28:11 +0000 (22:28 -0700)]
handle case OMX_AUDIO_CodingG711 in ACodec::getPortFormat

Bug: 17935293
Change-Id: Id09190ae813aa9e00a3c1ef6fb8a1bd3021deb6e

9 years agomerge in lmp-release history after reset to 380757ba5c927015d403e3b97cc418413330453e
The Android Automerger [Mon, 13 Oct 2014 13:11:02 +0000 (06:11 -0700)]
merge in lmp-release history after reset to 380757ba5c927015d403e3b97cc418413330453e

9 years agoMerge "Revert "handle case OMX_AUDIO_CodingG711 in ACodec::getPortFormat"" into lmp-dev
Guang Zhu [Mon, 13 Oct 2014 00:02:36 +0000 (00:02 +0000)]
Merge "Revert "handle case OMX_AUDIO_CodingG711 in ACodec::getPortFormat"" into lmp-dev

9 years agoRevert "handle case OMX_AUDIO_CodingG711 in ACodec::getPortFormat"
Guang Zhu [Mon, 13 Oct 2014 00:02:20 +0000 (00:02 +0000)]
Revert "handle case OMX_AUDIO_CodingG711 in ACodec::getPortFormat"

Bug: 17935293

fix 64-bit builds

This reverts commit 9c78328f4dfd2c8a1dd5d31010f10ffcd762f04b.

Change-Id: Ifbc499342fb47fd67cae02a79cb900e701caed68

9 years agomerge in lmp-release history after reset to 9286354c0a864ce2348cc7dfc6ca81e84a15f8e2
The Android Automerger [Sun, 12 Oct 2014 13:11:26 +0000 (06:11 -0700)]
merge in lmp-release history after reset to 9286354c0a864ce2348cc7dfc6ca81e84a15f8e2

9 years agoMerge "Revert "audio policy: add support for ro.audio.media_deep_buffer"" into lmp-dev
Dave Burke [Sun, 12 Oct 2014 05:30:16 +0000 (05:30 +0000)]
Merge "Revert "audio policy: add support for ro.audio.media_deep_buffer"" into lmp-dev

9 years agoRevert "audio policy: add support for ro.audio.media_deep_buffer"
Vineeta Srivastava [Sat, 11 Oct 2014 21:59:36 +0000 (21:59 +0000)]
Revert "audio policy: add support for ro.audio.media_deep_buffer"

This reverts commit 95511add8ad4d440c67272503559f5042c4e6f1f.

Change-Id: I76a8b86790b06b08d8ca0f8d374e585f964ffba8

9 years agoACodec: process deferred messages when entering Loaded state.
Wei Jia [Sat, 11 Oct 2014 01:13:00 +0000 (18:13 -0700)]
ACodec: process deferred messages when entering Loaded state.

Bug: 17792260
Change-Id: Ie8154cf41be5672fc8a9f3a2a82b7ede0a8b828f

9 years agoMerge "audio policy: add support for ro.audio.media_deep_buffer" into lmp-dev
Eric Laurent [Fri, 10 Oct 2014 23:39:36 +0000 (23:39 +0000)]
Merge "audio policy: add support for ro.audio.media_deep_buffer" into lmp-dev