OSDN Git Service

android-x86/frameworks-av.git
10 years agoMerge "Enable lower latency audio capture on more devices" into lmp-dev
Glenn Kasten [Sun, 27 Jul 2014 22:39:40 +0000 (22:39 +0000)]
Merge "Enable lower latency audio capture on more devices" into lmp-dev

10 years agoEnable lower latency audio capture on more devices
Glenn Kasten [Sun, 27 Jul 2014 22:02:23 +0000 (15:02 -0700)]
Enable lower latency audio capture on more devices

Bug: 16601366
Change-Id: I573b98631f81b7768f7cc00aa09e560008dea587

10 years agoAudioPolicyManager: handle outputs for different addresses
Jean-Michel Trivi [Tue, 22 Jul 2014 23:19:14 +0000 (16:19 -0700)]
AudioPolicyManager: handle outputs for different addresses

Add the notion of device types that cause the device address
  to be taken into account, i.e. multiple devices of the
  same type but with a different address can be connected/
  disconnected.
AUDIO_DEVICE_OUT_REMOTE_SUBMIX is such a device type.
When making those devices available / unavailable, look for
  all outputs with a matching address.

Bug 16009464

Change-Id: I260f8248b7794c4932094e876afdf29fdea007a3

10 years agostagefright: add flexible YUV support
Lajos Molnar [Fri, 25 Jul 2014 14:53:14 +0000 (07:53 -0700)]
stagefright: add flexible YUV support

Bug: 10706245
Change-Id: Icd246f22edfc67ed5240d59f5a5bde3e5f749465

10 years agostagefright: add ABuffer.CreateAsCopy
Lajos Molnar [Fri, 25 Jul 2014 14:53:14 +0000 (07:53 -0700)]
stagefright: add ABuffer.CreateAsCopy

Bug: 10706245
Change-Id: I8c4e96a2581a039e9e8237c3e09e2c22226da055

10 years agoMerge "DNG: Clean up logging." into lmp-dev
Ruben Brunk [Sat, 26 Jul 2014 01:18:08 +0000 (01:18 +0000)]
Merge "DNG: Clean up logging." into lmp-dev

10 years agoDNG: Clean up logging.
Ruben Brunk [Sat, 26 Jul 2014 01:05:46 +0000 (18:05 -0700)]
DNG: Clean up logging.

Change-Id: Ie34d5a22c89a726215d740fef359d53e5a1a360b

10 years agoMerge "NuPlayer: timed text support" into lmp-dev
Robert Shih [Sat, 26 Jul 2014 01:04:22 +0000 (01:04 +0000)]
Merge "NuPlayer: timed text support" into lmp-dev

10 years agoNuPlayer: timed text support
Robert Shih [Wed, 23 Jul 2014 22:00:25 +0000 (15:00 -0700)]
NuPlayer: timed text support

Bug: 16385674
Change-Id: Ifa9fbc17a1276aa774d57b82cdce500876a0b543

10 years agoMerge "audio policy: compatible sample rates and channel masks" into lmp-dev
Glenn Kasten [Sun, 27 Jul 2014 22:05:14 +0000 (22:05 +0000)]
Merge "audio policy: compatible sample rates and channel masks" into lmp-dev

10 years agoaudiopolicy: fix output audio format selection
Eric Laurent [Sun, 27 Jul 2014 20:47:31 +0000 (13:47 -0700)]
audiopolicy: fix output audio format selection

Fix two problems in output stream audio format selection
added by commit 1e693b55:
- flags must be set before picking the format.
- fix logic error in best format selection.

Change-Id: I6458b32725f771da5a08108932d64e71964ae9f1

10 years agoaudio policy: compatible sample rates and channel masks
Glenn Kasten [Thu, 24 Jul 2014 20:46:44 +0000 (13:46 -0700)]
audio policy: compatible sample rates and channel masks

Change-Id: I50d068a968aa6bd9e53e5b3111a1b09a6c2d219c

10 years agoMerge "CamcorderProfiles: add high speed profile constants" into lmp-dev
Zhijun He [Sat, 26 Jul 2014 00:57:14 +0000 (00:57 +0000)]
Merge "CamcorderProfiles: add high speed profile constants" into lmp-dev

10 years agoMerge "Add multichannel capability to AudioFlinger" into lmp-dev
Andy Hung [Fri, 25 Jul 2014 17:42:54 +0000 (17:42 +0000)]
Merge "Add multichannel capability to AudioFlinger" into lmp-dev

10 years agoAdd multichannel capability to AudioFlinger
Andy Hung [Tue, 22 Jul 2014 04:56:01 +0000 (21:56 -0700)]
Add multichannel capability to AudioFlinger

But not enabled (kEnableExtendedChannels == false).

Change-Id: I62f7e31fbd29ad703a9a02f5d1a280b6972dd423

10 years agoAdd multichannel capability to AudioMixer
Andy Hung [Fri, 18 Jul 2014 04:30:53 +0000 (21:30 -0700)]
Add multichannel capability to AudioMixer

tests/test-mixer updated to handle multichannel.
New mixer path is still disabled (kUseNewMixer = false).
Subsequent CL will enable multichannel capability.

Change-Id: I71dafa94cc1d9af567c285e0ded7c5c94e3ff926

10 years agoMerge "Add multichannel capability to AudioMixer" into lmp-dev
Andy Hung [Fri, 25 Jul 2014 17:08:58 +0000 (17:08 +0000)]
Merge "Add multichannel capability to AudioMixer" into lmp-dev

10 years agoReset the value for Vector of pointers.
Wei Jia [Thu, 24 Jul 2014 17:28:47 +0000 (10:28 -0700)]
Reset the value for Vector of pointers.

Bug: 16467066
Change-Id: I3674e07779a59f4d4fa639d066ed1988df89b3f5

10 years agoMerge "audio policy: clean up checking for active input" into lmp-dev
Glenn Kasten [Fri, 25 Jul 2014 15:24:14 +0000 (15:24 +0000)]
Merge "audio policy: clean up checking for active input" into lmp-dev

10 years agoMerge "-Making sure mAudioCommands list is empty before going to sleep. -Wake_lock...
Ricardo Garcia [Fri, 25 Jul 2014 15:08:24 +0000 (15:08 +0000)]
Merge "-Making sure mAudioCommands list is empty before going to sleep. -Wake_lock release before sleeping or quitting threadLoop()." into lmp-dev

10 years ago-Making sure mAudioCommands list is empty before going to sleep.
Ricardo Garcia [Thu, 24 Jul 2014 22:48:24 +0000 (15:48 -0700)]
-Making sure mAudioCommands list is empty before going to sleep.
-Wake_lock release before sleeping or quitting threadLoop().

Change-Id: Icab53d7984a3ba3eaf13e514667b4d60f40cbcd6

10 years agoaudio policy: clean up checking for active input
Glenn Kasten [Thu, 24 Jul 2014 21:09:55 +0000 (14:09 -0700)]
audio policy: clean up checking for active input

Change-Id: I85cc089df32e6d469e8aef307599f1021ea5b835

10 years agoaudio policy: add audio_input_flags_t and mOpenRefCount
Glenn Kasten [Thu, 24 Jul 2014 21:08:35 +0000 (14:08 -0700)]
audio policy: add audio_input_flags_t and mOpenRefCount

Change-Id: I5f9c7b5ebf03b9bc94efe70d3677edfabb99c194

10 years agoMerge "audio policy: add audio_input_flags_t and mOpenRefCount" into lmp-dev
Glenn Kasten [Fri, 25 Jul 2014 14:49:53 +0000 (14:49 +0000)]
Merge "audio policy: add audio_input_flags_t and mOpenRefCount" into lmp-dev

10 years agoMerge "reset battery stats when media player service is started" into lmp-dev
Chong Zhang [Fri, 25 Jul 2014 00:51:51 +0000 (00:51 +0000)]
Merge "reset battery stats when media player service is started" into lmp-dev

10 years agoMerge "StagefrightRecorder: check for WEBM format instead of MP4" into lmp-dev
Robert Shih [Fri, 25 Jul 2014 00:45:20 +0000 (00:45 +0000)]
Merge "StagefrightRecorder: check for WEBM format instead of MP4" into lmp-dev

10 years agoStagefrightRecorder: check for WEBM format instead of MP4
Robert Shih [Thu, 24 Jul 2014 21:00:09 +0000 (14:00 -0700)]
StagefrightRecorder: check for WEBM format instead of MP4

Bug: 16544665
Change-Id: Idc45bd4cafc65a11132d10fdf21f8439e186f35f

10 years agoMerge "signal mFrameAvailableCondition when AudioSource is stopped" into lmp-dev
Chong Zhang [Fri, 25 Jul 2014 00:02:40 +0000 (00:02 +0000)]
Merge "signal mFrameAvailableCondition when AudioSource is stopped" into lmp-dev

10 years agoMerge "Camera3: tear down Camera3 streams when they are deleted." into lmp-dev
Zhijun He [Thu, 24 Jul 2014 23:46:46 +0000 (23:46 +0000)]
Merge "Camera3: tear down Camera3 streams when they are deleted." into lmp-dev

10 years agoRemove last user of <cutils/tztime.h>.
Elliott Hughes [Thu, 24 Jul 2014 22:42:39 +0000 (15:42 -0700)]
Remove last user of <cutils/tztime.h>.

Bug: 15765976

(cherry picked from commit 56687f7cbf0a3d7909830fc1390a98c713a05e6f)

Change-Id: Iacb225584c3acdbb512f46b638a215b75b32cdcb

10 years agoCamera3: tear down Camera3 streams when they are deleted.
Zhijun He [Thu, 24 Jul 2014 20:45:15 +0000 (13:45 -0700)]
Camera3: tear down Camera3 streams when they are deleted.

Also override the disconnectLocked method in Camera3ZslStream to make sure the
Camera3ZslStream specific buffer queue is cleaned up properly.

Also revert 0be123df1897fd3fe1b7ba30f24d8ae4c91b4dc7, as it was not the right
fix.
Change-Id: I89bdcb2e206379ae1f2602421e7fdbcde9a31399

10 years agoaudio flinger: add patch connection between hw modules
Eric Laurent [Sat, 21 Jun 2014 01:31:16 +0000 (18:31 -0700)]
audio flinger: add patch connection between hw modules

Add support for audio device connections between different audio
hw modules.
The patch is performed by creating a bridge between the playback
thread connected to the sink device and the record thread connected
to the source device using a pair of specialized PlaybackTrack and
RecordTrack.
- Added PatchTrack and PatchRecord classes.
- Added TrackBase type to indicate more clearly the track behavior.
- A TrackBase can allocate the buffer or reuse an existing one.
- Factored some code in openOutput() and openInput() for internal use
by PatchPanel.

Bug: 14815883.

Change-Id: Ib9515fcda864610458a4bc81fa8f59096ff4d7db

10 years agosignal mFrameAvailableCondition when AudioSource is stopped
Chong Zhang [Thu, 24 Jul 2014 02:23:16 +0000 (19:23 -0700)]
signal mFrameAvailableCondition when AudioSource is stopped

This allows last read() to exit properly, otherwise it could get
stuck waiting for the condition forever.

Bug: 15849309
Change-Id: I79bba53630e59783a5fc041cfc5d3fdb2545cc2c

10 years agoCamcorderProfiles: add high speed profile constants
Zhijun He [Wed, 23 Jul 2014 22:17:26 +0000 (15:17 -0700)]
CamcorderProfiles: add high speed profile constants

Change-Id: I8f783466f8c2560820db14488acc1a309d27ab0f

10 years agoreset battery stats when media player service is started
Chong Zhang [Wed, 23 Jul 2014 21:46:05 +0000 (14:46 -0700)]
reset battery stats when media player service is started

Bug: 12979595
Change-Id: Ia800de3e65ed4dec8334c6fde566edab12d23c42

10 years agoaudio policy: remove redundant fixed volume management
Eric Laurent [Wed, 23 Jul 2014 02:48:16 +0000 (19:48 -0700)]
audio policy: remove redundant fixed volume management

Remove code handling fixed device volume in
AudioPolicyManager::computeVolume() as this is already
managed by AudioService.

Change-Id: Ib2be7578e40652c85a7d44c685ff9cc703d0c969

10 years agoHook up querying of VP8 temporal layering support.
Wei Jia [Wed, 23 Jul 2014 17:40:46 +0000 (10:40 -0700)]
Hook up querying of VP8 temporal layering support.

Bug: 14562236
Change-Id: I0ec5866173f7fb84dd3f79b588d1b35b523ca08a

10 years agoMerge "NuPlayer: save thread id in MediaPlayer::start" into lmp-dev
Chong Zhang [Wed, 23 Jul 2014 21:00:38 +0000 (21:00 +0000)]
Merge "NuPlayer: save thread id in MediaPlayer::start" into lmp-dev

10 years agoNuPlayer: save thread id in MediaPlayer::start
Chong Zhang [Wed, 23 Jul 2014 18:43:46 +0000 (11:43 -0700)]
NuPlayer: save thread id in MediaPlayer::start

so that when MediaPlayer::notify is called from within start,
it doesn't try to lock itself again.

Bug: 15323063
Change-Id: Idd77e892cd22538bbfe3e65c64c9dd2a216a0aee

10 years agoMerge "Fix multichannel integer resampling and add tests" into lmp-dev
Andy Hung [Wed, 23 Jul 2014 20:41:59 +0000 (20:41 +0000)]
Merge "Fix multichannel integer resampling and add tests" into lmp-dev

10 years agoGenericSource: support track (de)selection
Robert Shih [Wed, 16 Jul 2014 22:47:09 +0000 (15:47 -0700)]
GenericSource: support track (de)selection

Bug: 15153976
Change-Id: I522b1f9f0ffedf4edbea03a6654a6dbc0262860a

10 years agoCamera3: only append partial result to partial result collection
Zhijun He [Tue, 22 Jul 2014 23:08:13 +0000 (16:08 -0700)]
Camera3: only append partial result to partial result collection

Otherwise, the metadata entries will be duplicated.

Change-Id: If0cd96e09960fdf746a70913d380e9036745a944

10 years agoMerge "MediaRecorder: constants for webm recordering" into lmp-dev
Lajos Molnar [Wed, 23 Jul 2014 02:23:51 +0000 (02:23 +0000)]
Merge "MediaRecorder: constants for webm recordering" into lmp-dev

10 years agoMediaRecorder: constants for webm recordering
Robert Shih [Wed, 23 Jul 2014 02:00:02 +0000 (19:00 -0700)]
MediaRecorder: constants for webm recordering

Bug: 16329805
Change-Id: Idcd603545352e36a88589d3e23ccf1ee37704695

10 years agoStagefrightRecorder: webm (video only) support
Robert Shih [Thu, 10 Jul 2014 03:09:43 +0000 (20:09 -0700)]
StagefrightRecorder: webm (video only) support

Bug: 16329805
Change-Id: I8a0ecd100fca397add97a1416125bcc6aeb86364

10 years agoMerge "GenericSource: support track (de)selection" into lmp-dev
Robert Shih [Wed, 23 Jul 2014 01:41:41 +0000 (01:41 +0000)]
Merge "GenericSource: support track (de)selection" into lmp-dev

10 years agoMerge "StagefrightRecorder: webm (video only) support" into lmp-dev
Robert Shih [Wed, 23 Jul 2014 01:31:34 +0000 (01:31 +0000)]
Merge "StagefrightRecorder: webm (video only) support" into lmp-dev

10 years agoMerge "MediaWriter: make get/setStartTimeOffsetMs virtual" into lmp-dev
Robert Shih [Wed, 23 Jul 2014 01:31:12 +0000 (01:31 +0000)]
Merge "MediaWriter: make get/setStartTimeOffsetMs virtual" into lmp-dev

10 years agoFall back to s/w decoding when audio offloading fails.
Wei Jia [Tue, 22 Jul 2014 23:01:33 +0000 (16:01 -0700)]
Fall back to s/w decoding when audio offloading fails.

Change-Id: Icde3d65c964b2a13fb1c6636adcce52ae048a3fb

10 years agoMerge "update battery stats for video/audio" into lmp-dev
Chong Zhang [Wed, 23 Jul 2014 00:03:03 +0000 (00:03 +0000)]
Merge "update battery stats for video/audio" into lmp-dev

10 years agoupdate battery stats for video/audio
Chong Zhang [Tue, 22 Jul 2014 16:12:03 +0000 (09:12 -0700)]
update battery stats for video/audio

Bug: 12979595

Change-Id: Iafd93046a4fd9f22bcd66084deace746a7ca5d3c

10 years agoMerge "Camera3: only append partial result to partial result collection" into lmp-dev
Zhijun He [Tue, 22 Jul 2014 23:29:54 +0000 (23:29 +0000)]
Merge "Camera3: only append partial result to partial result collection" into lmp-dev

10 years agoaudio policy: fix hotword capture
Eric Laurent [Tue, 22 Jul 2014 22:36:10 +0000 (15:36 -0700)]
audio policy: fix hotword capture

commit 1c333e2 introduced a regression causing the
wrong input source type to be communicated to
the audio HAL when starting hotword (background) capture.

Change-Id: Iec6b3c58cbc15b9988793077232ff3e7e72a4d6d

10 years agocamera: clear ZSLQueue when switching modes
Ruchit Sharma [Tue, 22 Jul 2014 16:35:30 +0000 (12:35 -0400)]
camera: clear ZSLQueue when switching modes

not clearing the queue here will eat up unnecessary memory every time
we switch from video to still mode.

Change-Id: I279ec709b485ca0dab672464e5b829be849bcaa5

10 years agoMerge "cameraservice: remove record stream in stopPreview" into lmp-dev
Yin-Chia Yeh [Tue, 22 Jul 2014 16:57:30 +0000 (16:57 +0000)]
Merge "cameraservice: remove record stream in stopPreview" into lmp-dev

10 years agoFix multichannel integer resampling and add tests
Andy Hung [Sun, 20 Jul 2014 21:04:19 +0000 (14:04 -0700)]
Fix multichannel integer resampling and add tests

Change-Id: I384bf8317d4f03616bf9f2b458a8700965d5cf56

10 years agostagefright: handle seeking to before first cue-point.
Lajos Molnar [Mon, 21 Jul 2014 20:47:21 +0000 (13:47 -0700)]
stagefright: handle seeking to before first cue-point.

Bug: 16446994
Change-Id: Id3f9d6780a7c4f62171cbfa8675a67334e8dfa10

10 years agoMerge "Remove execute bit" into lmp-dev
Glenn Kasten [Mon, 21 Jul 2014 19:14:22 +0000 (19:14 +0000)]
Merge "Remove execute bit" into lmp-dev

10 years agoRemove execute bit
Glenn Kasten [Mon, 21 Jul 2014 18:49:08 +0000 (11:49 -0700)]
Remove execute bit

Change-Id: I1cf0c0d9375779b3074af12f4cbf9c1ec07bf4ff

10 years agoMerge "audio policy: add missing formats to audio_policy.conf parser." into lmp-dev
Eric Laurent [Tue, 22 Jul 2014 02:11:17 +0000 (02:11 +0000)]
Merge "audio policy: add missing formats to audio_policy.conf parser." into lmp-dev

10 years agoaudio policy: add missing formats to audio_policy.conf parser.
Eric Laurent [Tue, 22 Jul 2014 00:49:25 +0000 (17:49 -0700)]
audio policy: add missing formats to audio_policy.conf parser.

Change-Id: I872c11d080c505abe3025e7bbb554ca9711de9af

10 years agoaudio_attributes_t for SoundPool
Jean-Michel Trivi [Mon, 21 Jul 2014 00:58:33 +0000 (17:58 -0700)]
audio_attributes_t for SoundPool

Add support for the audio_attributes_t structure in the
 SoundPoool constructor.
Remove SRC quality which was never implemented.
Remove stream types.

Add file to contain audio helper functions related to policy.

Change-Id: I1720ff15e7b23ea7b713a4395fdfac26dc3fd4da

10 years agocameraservice: remove record stream in stopPreview
Yin-Chia Yeh [Thu, 17 Jul 2014 23:05:23 +0000 (16:05 -0700)]
cameraservice: remove record stream in stopPreview

Remove recording stream every time stopPreview is called.

Change-Id: Iabb783a75418aa41ddc2693cfdfd5a2131109070

10 years agoFix initial audio glitch on startup
Andy Hung [Thu, 17 Jul 2014 21:00:07 +0000 (14:00 -0700)]
Fix initial audio glitch on startup

Also happens when restarting AudioFlinger.

Bug: 16322824
Change-Id: I382b20174cb0639e04316130141f2094d7dd0cb3

10 years agoMediaWriter: make get/setStartTimeOffsetMs virtual
Robert Shih [Thu, 17 Jul 2014 18:46:13 +0000 (11:46 -0700)]
MediaWriter: make get/setStartTimeOffsetMs virtual

Bug: 16329805
Change-Id: Ib971dd95b54829438c8af97528f9e00b87ab3f1e

10 years agoMerge "Camera HAL3: migrate from partial quirks to partial result" into lmp-dev
Zhijun He [Thu, 17 Jul 2014 20:36:14 +0000 (20:36 +0000)]
Merge "Camera HAL3: migrate from partial quirks to partial result" into lmp-dev

10 years agoMerge "Add RemixBufferProvider to AudioMixer" into lmp-dev
Andy Hung [Sun, 20 Jul 2014 20:53:44 +0000 (20:53 +0000)]
Merge "Add RemixBufferProvider to AudioMixer" into lmp-dev

10 years agoFix: Add MediaCodecList capabilities
Lajos Molnar [Sat, 19 Jul 2014 09:27:41 +0000 (02:27 -0700)]
Fix: Add MediaCodecList capabilities

fix getting capability index from type

 Bug: 12065651

Change-Id: Id2bc60410a92e17c841a5dd072257bc40ad6236f

10 years agoAdd RemixBufferProvider to AudioMixer
Andy Hung [Thu, 17 Jul 2014 04:53:43 +0000 (21:53 -0700)]
Add RemixBufferProvider to AudioMixer

This is used to convert between channel masks for input AudioTrack
data.

Change-Id: Iedffaeccb99c7053992152e7b1cb6b2d33b12eef

10 years agoUpdate DownmixerBufferProvider to use CopyBufferProvider
Andy Hung [Thu, 17 Jul 2014 04:41:35 +0000 (21:41 -0700)]
Update DownmixerBufferProvider to use CopyBufferProvider

Change-Id: I6b1a8755a1e6c29b916662fd376e9509cda5df55

10 years agoAdd CopyBufferProvider class for AudioMixer
Andy Hung [Thu, 17 Jul 2014 00:44:34 +0000 (17:44 -0700)]
Add CopyBufferProvider class for AudioMixer

AudioMixer::ReformatBufferProvider now uses it as a base class.

Fix ReformatBufferProvider object leak.

Change-Id: If196f844eaaa124a173ffa27afe88098023c2ff9

10 years agoMerge "Add MediaCodecList capabilities" into lmp-dev
Lajos Molnar [Sat, 19 Jul 2014 08:45:27 +0000 (08:45 +0000)]
Merge "Add MediaCodecList capabilities" into lmp-dev

10 years agoAdd MediaCodecList capabilities
Lajos Molnar [Tue, 15 Jul 2014 14:57:52 +0000 (07:57 -0700)]
Add MediaCodecList capabilities

Bug: 12065651
Change-Id: Icfb73c0009621cd747e113d8a0cd84c966bf055d

10 years agoFix copy/paste bug
Glenn Kasten [Fri, 18 Jul 2014 22:31:02 +0000 (15:31 -0700)]
Fix copy/paste bug

introduced by Change-Id: I4e9b7fa99858b488ac98a441fa70e31dbba1b865

Change-Id: I9a0c8800f5cf3767cc259776f95c96cad972e392

10 years agoMerge "Update DownmixerBufferProvider to use CopyBufferProvider" into lmp-dev
Andy Hung [Sat, 19 Jul 2014 03:39:26 +0000 (03:39 +0000)]
Merge "Update DownmixerBufferProvider to use CopyBufferProvider" into lmp-dev

10 years agoMerge "stagefright: Fix seeking in MPEG4 container" into lmp-dev
Lajos Molnar [Fri, 18 Jul 2014 18:27:12 +0000 (18:27 +0000)]
Merge "stagefright: Fix seeking in MPEG4 container" into lmp-dev

10 years agostagefright: Fix seeking in MPEG4 container
Lajos Molnar [Thu, 17 Jul 2014 17:52:36 +0000 (10:52 -0700)]
stagefright: Fix seeking in MPEG4 container

- seek based on user-visible timestamp
- seek to previous, next and closest exactly

Bug: 12786906
Change-Id: I2d5e1fbff6469b6f081a284be2222a4cb50aa754

10 years agonuplayer: support widevine sources
Lajos Molnar [Thu, 17 Jul 2014 21:29:51 +0000 (14:29 -0700)]
nuplayer: support widevine sources

- handle widevine:// scheme
- add separate looper for renderer (as it can block initial buffer
  handling if all buffers are used)
- initiate secure codecs before source is started
- don't read secure buffers
- share ACodec's input buffers with Widevine source

on the decoder side

- keep track of mediabuffers released by widevine source
- keep track of dequeued input buffers (for safety)
- release mediabuffer when buffer is subsequently dequeued.  (This
  was hardcoded into OMXCodec to do this when buffer-empties message
  was handled, but MediaCodec does not support such functionality.)

Bug: 15699665
Change-Id: I4a369443294e45c644be8b0257010e52db1d7c9b

10 years agonuplayer: add widevine support to GenericSource
Lajos Molnar [Thu, 17 Jul 2014 22:33:06 +0000 (15:33 -0700)]
nuplayer: add widevine support to GenericSource

Bug: 15699665
Change-Id: Ided823bd0b1118bbabb288cf62d6389518f820a9

10 years agostagefright: use all input buffers in ACodec
Lajos Molnar [Thu, 17 Jul 2014 21:23:58 +0000 (14:23 -0700)]
stagefright: use all input buffers in ACodec

Bug: 15699665
Change-Id: If37e5c70e56821375ede911e781b5d4b8d41f8ad

10 years agostagefright: add nonblocking MediaBufferGroup.acquire_buffer method
Lajos Molnar [Thu, 17 Jul 2014 21:23:16 +0000 (14:23 -0700)]
stagefright: add nonblocking MediaBufferGroup.acquire_buffer method

Bug: 15699665
Change-Id: I31c1ab4413c62ff3dd4e0d5b06a398064b4aaddd

10 years agoMerge "stagefright: add nonblocking read option to MediaBuffer" into lmp-dev
Lajos Molnar [Fri, 18 Jul 2014 01:58:00 +0000 (01:58 +0000)]
Merge "stagefright: add nonblocking read option to MediaBuffer" into lmp-dev

10 years agostagefright: add nonblocking read option to MediaBuffer
Lajos Molnar [Thu, 17 Jul 2014 21:17:09 +0000 (14:17 -0700)]
stagefright: add nonblocking read option to MediaBuffer

Bug: 15699665
Change-Id: I2aaddc4c937cf5c1e36386bafd7d396d5781bf6d

10 years agoMerge "Add CopyBufferProvider class for AudioMixer" into lmp-dev
Andy Hung [Sat, 19 Jul 2014 03:23:02 +0000 (03:23 +0000)]
Merge "Add CopyBufferProvider class for AudioMixer" into lmp-dev

10 years agoMerge "Free MediaBuffer when ABuffer is discarded." into lmp-dev
Wei Jia [Sat, 19 Jul 2014 00:44:25 +0000 (00:44 +0000)]
Merge "Free MediaBuffer when ABuffer is discarded." into lmp-dev

10 years agoFree MediaBuffer when ABuffer is discarded.
Wei Jia [Fri, 18 Jul 2014 21:27:25 +0000 (14:27 -0700)]
Free MediaBuffer when ABuffer is discarded.

BUG: 15699665
Change-Id: Ie7da017cf32ccc08094fe4b01a2b07d2739770d2

10 years agoMerge "Move AudioRecord frame count calculations to server" into lmp-dev
Glenn Kasten [Thu, 17 Jul 2014 21:56:55 +0000 (21:56 +0000)]
Merge "Move AudioRecord frame count calculations to server" into lmp-dev

10 years agoMerge "Add audio_input_flags_t to IAudioPolicyService::getInput" into lmp-dev
Glenn Kasten [Thu, 17 Jul 2014 21:39:27 +0000 (21:39 +0000)]
Merge "Add audio_input_flags_t to IAudioPolicyService::getInput" into lmp-dev

10 years agoMerge "Fix initial audio glitch on startup" into lmp-dev
Andy Hung [Thu, 17 Jul 2014 21:23:26 +0000 (21:23 +0000)]
Merge "Fix initial audio glitch on startup" into lmp-dev

10 years agoMerge "Add audio_input_flags_t to IAudioFlinger::openInput" into lmp-dev
Glenn Kasten [Thu, 17 Jul 2014 21:12:07 +0000 (21:12 +0000)]
Merge "Add audio_input_flags_t to IAudioFlinger::openInput" into lmp-dev

10 years agoMerge "Revert "Revert "Enable extended precision PCM output in AudioFlinger""" into...
Andy Hung [Thu, 17 Jul 2014 21:23:09 +0000 (21:23 +0000)]
Merge "Revert "Revert "Enable extended precision PCM output in AudioFlinger""" into lmp-dev

10 years agoRevert "Revert "Enable extended precision PCM output in AudioFlinger""
Andy Hung [Thu, 17 Jul 2014 21:20:57 +0000 (21:20 +0000)]
Revert "Revert "Enable extended precision PCM output in AudioFlinger""

This reverts commit ce83432a922e55d68625aad854f8f6520db395bc.

Change-Id: I2d005bfe091beef810c9ddfb53e308fa0e47b355

10 years agoFix initial audio glitch on startup
Andy Hung [Thu, 17 Jul 2014 21:00:07 +0000 (14:00 -0700)]
Fix initial audio glitch on startup

Also happens when restarting AudioFlinger.

Bug: 16322824
Change-Id: I382b20174cb0639e04316130141f2094d7dd0cb3

10 years agoMove AudioRecord frame count calculations to server
Glenn Kasten [Thu, 3 Jul 2014 19:28:53 +0000 (12:28 -0700)]
Move AudioRecord frame count calculations to server

Buffer frame count and notification frame count
are now calculated by server instead of by client.
The server has more information and can do a better job.

Also fix a few bugs:

 - If a fast track was re-created, even with same pipe depth, it would fail.
   Now it can correctly re-create a fast track provided the pipe depth is same.

 - Notification frame count for fast tracks was calculated by client
   as 1/2 of the total frame count, which is a large value due to the pipe.
   Now the notification frame count is set by server to the HAL frame count.
   This should reduce latency for fast tracks.

 - EVENT_OVERRUN were happening frequently when there was sample rate conversion,
   because the client didn't know about the sample rate conversion,
   and under-estimated the necessary buffer size.  Now since server
   calculates the buffer sizes, EVENT_OVERRUN is unlikely.

 - RecordThread::createRecordTrack_l was checking for mono and stereo
   for fast tracks.  This is not necessary, and now we can handle a
   multi-channel fast track.

Bug: 7498763
Change-Id: I0c581618e8db33084d5ff9ed50a592990c9749e8

10 years agoAdd audio_input_flags_t to IAudioPolicyService::getInput
Glenn Kasten [Wed, 16 Jul 2014 15:36:31 +0000 (08:36 -0700)]
Add audio_input_flags_t to IAudioPolicyService::getInput

Change-Id: I9f37be05f8dc7b85a8827a94e76ca0f45453e170

10 years agoAdd audio_input_flags_t to IAudioFlinger::openInput
Glenn Kasten [Tue, 15 Jul 2014 22:31:26 +0000 (15:31 -0700)]
Add audio_input_flags_t to IAudioFlinger::openInput

For backward compatibility, until flags are correctly calculated,
we will assume that the request is for a low latency input stream.

Change-Id: I76746834e870df00833dc77cbdaa2edd2ffeec95

10 years agoImprove dumpsys for capture threads
Glenn Kasten [Thu, 3 Jul 2014 17:20:00 +0000 (10:20 -0700)]
Improve dumpsys for capture threads

Show per-track sample rate, and whether there is a fast capture thread

Change-Id: If6a08a40d1eeba0690aa8da3c541f845ec101b7f

10 years agoMerge "stagefright: add error log when create omx component failed" into lmp-dev
Zhijun He [Thu, 17 Jul 2014 23:59:40 +0000 (23:59 +0000)]
Merge "stagefright: add error log when create omx component failed" into lmp-dev

10 years agostagefright: add error log when create omx component failed
Zhijun He [Thu, 17 Jul 2014 23:20:13 +0000 (16:20 -0700)]
stagefright: add error log when create omx component failed

Bug: 16343447
Change-Id: I6854b9b837a141a77ab318953dc002ec5ad5d31d

10 years agoRevert "Enable extended precision PCM output in AudioFlinger"
Andy Hung [Thu, 17 Jul 2014 17:26:50 +0000 (10:26 -0700)]
Revert "Enable extended precision PCM output in AudioFlinger"

This reverts commit a494e82c3c73508b4d3cfe89e9134de94e12fd31.