376 Commits

Author SHA1 Message Date
Andreas Huber
c4e0b70a21 ALoopers can now be named (useful to distinguish threads).
Change-Id: Ieabaddb2e3a9e3a7a5bc36e55cd0721b60dbd50e
2010-08-27 15:21:07 -07:00
Eric Laurent
c14f9ca6e5 Merge "Added preset reverb." into gingerbread 2010-08-25 15:09:10 -07:00
Andreas Huber
efdd088a71 Allow sniffers to return a packet of opaque data that the corresponding extractor can take advantage of to not duplicate work already done sniffing. The mp3 extractor takes advantage of this now.
Change-Id: Icb77ae3ee95a69c7da25b4d3b8696c0a2d33028a
related-to-bug: 2948754
2010-08-25 13:08:38 -07:00
Eric Laurent
a7e5648d61 Added preset reverb.
Modified lvm reverb wrapper code to expose a preset reverb interface.
Also removed debug log from bundle and reverb wrapper.

Change-Id: If9b95d91e25a6ff834decdfdda34b17df9b46967
2010-08-24 17:32:48 -07:00
James Dong
3f51fa78ad Runtime dump support for MediaWriter
Change-Id: I10b2c474de612ee4cef4b7c9eae2ee1dd8c2e895
2010-08-23 10:34:05 -07:00
Chia-chi Yeh
b80e610b07 Merge "Visualizer: replace the FFT implementation with a faster one." into gingerbread 2010-08-22 18:31:15 -07:00
James Dong
cbd038fe20 Merge "Make MediaWriter stop and pause return errors if necessary" into gingerbread 2010-08-19 13:59:32 -07:00
James Dong
d036662470 Make MediaWriter stop and pause return errors if necessary
o Make the API consistent with SF framework, which the MediaSource
  provides a return status for stop

o Also, helps to convey errors that occurred right when a
  premature stop() is called, leading to a potentially
  mal-formed output file.

Change-Id: I52a932345f38570fdf8ea04d67d73dd94ccd30ef
2010-08-19 13:33:13 -07:00
Andreas Huber
eef3c33e56 In the absence of width/height information in the sdp, extract the dimensions from the avc codec specific data.
Change-Id: I98c4194593c7e6e24f6fc339c862245111800293
2010-08-19 10:39:47 -07:00
Chia-chi Yeh
58d3bd0810 Visualizer: replace the FFT implementation with a faster one.
This implementation uses fixed points instead of floating points. It
is slightly inaccurate compared to the old one but still perfect for
visualization purpose. It runs 40% faster on passion, 5 times faster
on sholes, and of course 14 times faster on sapphire.

Change-Id: I1e868417bcffda091becf106a7b941d02813faec
2010-08-19 16:05:32 +08:00
James Dong
b72081966d Use audio clock as the reference media clock
o Only do this for realtime applications
o Adjust other track clock based on audio clock
o Assume other track uses wall clock as the media clock
o Use some heuristics to reduce the size of stts box by 2/3.

- also
o Remove one unused key from MetaData.h

Change-Id: Ib9432842627b61795b533508158c25258a527332
2010-08-13 18:12:48 -07:00
James Dong
afe5305855 Handle large audio lost
Change-Id: I2687ad855aac758946954d0b3fe7aff9f7b5ae7c
2010-08-10 19:59:04 -07:00
Andreas Huber
520b2a7039 Support for extracting G.711 a-law and mu-law audio from WAV files and a corresponding software decoder.
Change-Id: I92685d09456c220b8c09842defb721bd55b0b9f6
related-to-bug: 2900021
2010-08-09 10:01:26 -07:00
James Dong
afd97e82cf Use the target color format from the camera source if possible
- If the target color format is unavailable, the default
  platform-dependent color format will be used.

- Also add some logic to prevent looping forever if the
  omx component is buggy supporting color format enumeration.

Change-Id: I119a78f0d6201b4c3621235cca2f523ec14e24e3
2010-08-05 13:47:01 -07:00
Andreas Huber
57648e4eec Support for Gtalk video, includes AMR/H.263 assembler and packetization support, extensions to MediaRecorder to stream via RTP over a pair of UDP sockets as well as various fixes to the RTP implementation.
Change-Id: I95b8dd487061add9bade15749e563b01cd99d9a6
2010-08-04 11:49:24 -07:00
James Dong
3d84280ccc Merge "File writer has a designated writer thread now" into gingerbread 2010-08-03 10:35:55 -07:00
James Dong
23796e3b62 Merge "Add lost frame handling in AudioSource" into gingerbread 2010-08-02 18:13:54 -07:00
James Dong
da8073c68e File writer has a designated writer thread now
+ This reduces the file I/O block time for audio/video track processing
- Since the file writer is buffering some output samples, the memory
  usage would go up, depending on how many output samples are buffered.

Change-Id: I780cc5b26f4b53a5efbd643fcf9505dfc19cd4cd
2010-08-02 18:08:02 -07:00
James Dong
c3ae937a95 Add lost frame handling in AudioSource
- Also collect stats on lost audio frames instead of time spent on reading

Change-Id: I6380b143e4fbdcd894491aaae523331e90d0f04f
2010-07-30 14:35:37 -07:00
Jean-Baptiste Queru
154a320069 resolved conflicts for merge of 27eecb70 to gingerbread
Change-Id: If064f2f4950fc1a4ff38e6927fe2120af76b26f1
2010-07-30 12:08:31 -07:00
The Android Open Source Project
27eecb704a Merge branch 'froyo' of git://android.git.kernel.org/platform/frameworks/base into HEAD 2010-07-29 17:45:56 -07:00
Jean-Baptiste Queru
83407b993f fix inaccurate copyrights
Change-Id: I33b0f68f2da34ca4728211d83159cf32a127f6dd
2010-07-29 17:41:35 -07:00
Andreas Huber
16263d9f8c Squashed commit of the following:
commit 4abf16bb04dc9695fedf4007a84f903074312ccd
Author: Andreas Huber <andih@google.com>
Date:   Tue Jul 20 09:21:17 2010 -0700

    Support a single format change at the beginning of audio playback. This way the AAC+ decoder may change its output format from what is originally encoded in the audio stream and we'll still play it back correctly.

    Change-Id: Icc790122744745e9a88099788d4818ca1e265a82
    related-to-bug: 2826841

commit 09c74da63e6ad5cb5dafb70f62696d75d2978967
Author: James Dong <jdong@google.com>
Date:   Sun Jul 18 17:57:01 2010 -0700

    Fix MPEG4Extractor to extract sampling frequency correctly when SBR is enabled.

    Change-Id: I883c81dad3ea465e71cb5590e89d763671a90ff8

commit f672bf2a782dc7d5fb6325d611a7fe17045dfe9a
Author: James Dong <jdong@google.com>
Date:   Thu Jul 8 20:56:13 2010 -0700

    Enable the support for decoding audio with AAC+ and eAAC+ features

    bug - 282684

    Change-Id: I73c8377af3cc4edd3ee7cea86dc3b1c369fbd78b

Change-Id: I012f1179e933b6d1345d2368f357576c722485f7
2010-07-29 09:45:06 -07:00
Eric Laurent
a4c72acfbc Audio effects: modified command() parameter types.
The type of the cmd, cmdSize and *pReplySize parameters of the effect control interface command()
function have been modified from int to uint32_t. This is more consistent with their role.

Change-Id: I84d289fc262d6753747910f06f485597dfee6591
2010-07-28 05:49:21 -07:00
Eric Laurent
ca57d1cc89 Audio Effects: added methods to effects java classes to store and load current effect settings in
a single call.

Addional changes:
- Fixed simulator build
- Use effect interface UUIDs from OpenSL ES includes when available
- Added cleanspec rules to remove now obsolete test effect libraries
- Fixed bug in AudioEffect JNI setParameter function.

Change-Id: Ic25ddb135e2cec5a68c181d727321f5ac7a1ab6b
2010-07-27 00:41:31 -07:00
James Dong
53d4e0d58e Allows the authoring engine to skip frame.
This is 1st part of the work to allow audio and video resync if
we found out that audio and video are out of sync during authoring

- also fixed a problem in AACEncoder::read() where the buffer acquired
  from the buffer group does not release when error out at
  reading from source.

Change-Id: I8a2740097fcfdf85e6178869afeb9f3687a99118
2010-07-22 14:51:53 -07:00
Andreas Huber
4e4173b0af Various changes to improve rtsp networking, reduce packet loss and adapt to ALooper API changes.
Change-Id: I110e19d5ce33e597add3ffbd3e3ff3815862396d
2010-07-22 09:21:05 -07:00
Andreas Huber
8138e841a5 Merge "Support finer seek control on MediaSources." into gingerbread 2010-07-21 10:36:08 -07:00
Andreas Huber
6624c9fd0b Support finer seek control on MediaSources.
related-to-bug: 2858448

Change-Id: Ifb4b13b990fd5889113e47e2c62249ac43391fa1
2010-07-21 08:51:29 -07:00
Eric Laurent
7070b36549 Added support for auxiliary audio effects to AudioTrack and MediaPlayer.
Added methods to AudioTrack and MediaPlayer java classes to enable use of
auxiliary audio effects. The effect can be attached and detached by specifying its
ID and the send level controlled.

Change-Id: Ie74ff54a453096a742688476f612ce355543b6f3
2010-07-21 06:28:01 -07:00
James Dong
d7514ec6eb Merge "Progress status notification" into gingerbread 2010-07-20 14:29:39 -07:00
Eric Laurent
22a2d7186d Merge "Audio policy manager changes for audio effects" into gingerbread 2010-07-20 11:25:35 -07:00
Eric Laurent
8ed6ed0b62 Audio policy manager changes for audio effects
Added methods for audio effects management by audio policy manager.
- control of total CPU load and memory used by effect engines
- selection of output stream for global effects
- added audio session id in parameter list for startOutput() and stopOutput().
this is not used in default audio policy manager implementation.

Modifications of audio effect framework in AudioFlinger to allow moving and reconfiguring
effect engines from one output mixer thread to another when audio tracks in the same session
are moved or when requested by audio policy manager.
Also fixed mutex deadlock problem with effect chains locks.

Change-Id: Ida43484b06e9b890d6b9e53c13958d042720ebdb
2010-07-20 10:31:57 -07:00
Andreas Huber
cc14a8393b Support a single format change at the beginning of audio playback. This way the AAC+ decoder may change its output format from what is originally encoded in the audio stream and we'll still play it back correctly.
Change-Id: Icc790122744745e9a88099788d4818ca1e265a82
related-to-bug: 2826841
2010-07-20 09:25:38 -07:00
James Dong
85edea7958 Progress status notification
- Keep track of per-track progress

Change-Id: Ibd36f0e8c78581928c8aa2f5e23c5e7e0615c2cc
2010-07-20 08:39:57 -07:00
Eric Laurent
b0374a0e22 Merge "Several improvements in audio effects volume control." into gingerbread 2010-07-16 00:08:50 -07:00
Eric Laurent
76c40f74ce Several improvements in audio effects volume control.
- Fixed crash when deleting an effect chained before an effect having volume control
- Changed EFFECT_FLAG_VOLUME_CTRL to implicitely include EFFECT_FLAG_VOLUME_IND
(not need to set both in effect descriptor).
- Volume control changes from one effect to another if needed according to effect enable state
- EFFECT_CMD_SET_VOLUME is only sent when their is an actual change in volume

Change-Id: Ieebaf09157e2627366023569d95516646e03e26c
2010-07-15 12:50:15 -07:00
James Dong
52d13f01a6 Support user-supplied timescales for authoring
- also, change all the real time unit to microseconds in MPEG4Writer

Change-Id: I260f512f2eb670ade7b8858a56335a5d639de756
2010-07-14 17:29:17 -07:00
Jean-Michel Trivi
97eb728aef Use the OpenSL ES definition of SL_IID_EQUALIZER for the EQ
effect UUID instead of defining it locally.

Change-Id: Id6018fef20d286899cf7503fec3521dcd56db7e0
2010-07-14 10:09:31 -07:00
Eric Laurent
7d850f23c8 Modifications in audio effect engine state management.
- Separate the updating of effect engine state from the process call in EffectModule so that the state
of all effects in the same effect chain is updated simultaneusly before all process functions are called.
- Added a mechanism for the effect engine to continue being called for processing after receiving the disable
commands untils it considers that the framework can stop calling the process function without causing
a glitch or loosing some effect tail.
- Updated test reverb and equalizer to support this new feature

Change-Id: Icb56ae2c84c076d4dbad6cf733b1a62f823febe7
2010-07-13 12:27:18 -07:00
James Dong
929642ee00 Add runtime dumpsys support for media recorder client
Change-Id: I4c8a81720f3be2db54678a7e84fe12849255046b
2010-07-08 21:25:55 -07:00
Eric Laurent
fd84f97af4 Added JAVA classes to control bass boost, equalizer, reverberation and virtualizer Effects.
Defined the following JAVA classes on top of AudioEffect class to facilitate control
off built-in audio effects with APIs aligned with interfaces defined in OpenSL ES
specification:
- BastBoot.java
- Equalizer.java
- PresetReverb.java
- EnvironmentalReverb.java
- Virtualizer.java

Split reverb API header file in two, one for preset reverb and one for environmental reverb.
Some changes in test reverb to support preset reverb.

Change-Id: Ie0a5ba06002e63dfd6da22cace5568c1e0b76ea1
2010-07-08 15:32:51 -07:00
Eric Laurent
dacabf97c6 Merge "Added Visualizer effect." into gingerbread 2010-07-07 16:23:30 -07:00
James Dong
81c929a684 Allow application to set two more encoding paramters: video profile and level
Change-Id: I673e681cefe184d5c556c612c54600a24a2143e5
2010-07-07 12:11:53 -07:00
Eric Laurent
df9b81ced4 Added Visualizer effect.
The visualizer enables application to retrieve part of the currently playing audio for visualization purpose.
It is not an audio recording interface and only returns partial and low quality audio content as a waveform or
a frequency representation (FFT).

Removed temporary hack made in MediaPlayer for animated wall papers based on audio visualization (snoop() method.

This commit also includes a change in AudioEffect class:
 - the enable()/disable() methods have been replaced bya more standard setEnabled() method.
 - some fixes in javadoc

Change-Id: Id092a1340e9e38dae68646ade7be054e3a36980e
2010-07-07 11:00:28 -07:00
Andreas Huber
57576c1cae ALooperRoster no longer holds strong references to handlers and loopers.
Change-Id: I038d69b0a34eda1bfc5216d92c837a5ddf4fb802
2010-07-07 09:27:31 -07:00
Andreas Huber
9406f626b2 Merge "An AHandler can now find its associated ALooper." into gingerbread 2010-07-07 06:57:27 -07:00
Andreas Huber
058319eb73 An AHandler can now find its associated ALooper.
Change-Id: Ic7087b8dcbc0d9abda272df0cb01b04b006f82ad
2010-07-02 15:16:13 -07:00
Andreas Huber
2cfd8198cc Merge "Add an option to ALooper::start that allows it to call back into java or not." into gingerbread 2010-07-02 10:02:17 -07:00
Andreas Huber
4f104d99d8 Add an option to ALooper::start that allows it to call back into java or not.
Change-Id: Iec172901a04a575d8d350bd162565f04677c3f26
2010-07-02 08:00:52 -07:00