808 Commits

Author SHA1 Message Date
Mathias Agopian
b957b9d63c first step at implementing the native sensor support
in this commit:
- implemented the C stub
- implemented the binder interfaces involved
- implemented most of the C++ client side

missing:
- SensorManager cannot connect to the SensorServer yet
(because there is no SensorServer yet)

Change-Id: I75010cbeef31c98d6fa62fd5d388dcef87c2636b
2010-07-13 22:21:56 -07:00
Dianne Hackborn
289b9b6237 Add ANativeWindow API for directly drawing to the surface bits.
Also other cleanup and fixes:

- We now properly set the default window format to 565.
- New APIs to set the window format and flags from native code.
- Tweaked glue for simpler handling of the "destroy" message.
- Um, other stuff.

Change-Id: Id7790a21a2fa9a19b91854d225324a7c1e7c6ade
2010-07-09 16:58:19 -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
Dianne Hackborn
85448bbecd Add new glue code for writing native apps.
This factors out the boiler-plate code from the sample
app to a common glue code that can be used for everyone
writing this style of app: a dedicated app thread that
takes care of waiting for events and processing them.

As part of doing this, ALooper has a new facility to allow
registration of fds that cause ALooper_pollOnce() to return
the fd that has data, allowing the app to drive the loop
without callbacks.  Hopefully this makes some people feel better. :)

Also do some other cleanup of the ALooper API, plus some
actual documentation.

Change-Id: Ic53bd56bdf627e3ba28a3c093faa06a92be522b8
2010-07-08 11:06:59 -07:00
Kenny Root
c9535de8e3 Merge "Add OBB file helper class" into gingerbread 2010-07-07 18:14:13 -07:00
Chris Tate
b17f4dcfb3 Merge "More native input dispatch work." into gingerbread 2010-07-07 17:43:12 -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
Kenny Root
7cee34a051 Add OBB file helper class
ObbFile is a binary blob that will be used in packaging large files
with smaller APKs.

Change-Id: Ib1594346cfa2f49113de6565af77c24efbd89d63
2010-07-07 09:57:50 -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
Jeff Brown
00fa7bdd69 More native input dispatch work.
Removed old input dispatch code.
Refactored the policy callbacks.
Pushed a tiny bit of the power manager state down to native.
Fixed long press on MENU.
Made the virtual key detection and cancelation a bit more precise.

Change-Id: I5d8c1062f7ea0ab3b54c6fadb058c4d5f5a9e02e
2010-07-03 19:23:01 -07:00
Dianne Hackborn
682674154e Add new native Looper API.
This allows us to avoid exposing the file descriptor of
the event queue; instead, you attach an event queue to
a looper.  This will also should allow native apps to be
written without the need for a separate thread, by attaching
the event queue to the main thread's looper and scheduling
their own messages there.

Change-Id: I38489282635895ae2cbfacb88599c1b1cad9b239
2010-07-02 18:57:02 -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
Andreas Huber
5460d126f0 Merge "Added AMessage::debugString() for debugging purposes." into gingerbread 2010-07-02 08:00:30 -07:00
Andreas Huber
03431d2fa6 Added AMessage::debugString() for debugging purposes.
Change-Id: Id43ffd2c56d659dc29f37e277f8c7b38f11c1591
2010-07-01 16:36:55 -07:00
Andreas Huber
45bac57aa0 Support for writing the extracted data to an .mp4 file in the stagefright commandline tool.
Change-Id: I972324a8fc9757e6e8116b0270ec0882106f8733
2010-07-01 09:08:38 -07:00
Chih-Chung Chang
09b9005769 Add multiple camera support for in MediaProfiles.
Change-Id: Ie89568a0f5f5fd08ede77e33f9a559215d6bed9a
2010-07-01 10:57:15 +08:00
Dianne Hackborn
c6e1d88022 Merge "Introduce official public NativeWindow type." into gingerbread 2010-06-30 16:05:30 -07:00
Dianne Hackborn
8b49bd1a2f Introduce official public NativeWindow type.
Not yet hooked up to anything in the NDK, but requires renaming
the existing android_native_window_t type everywhere.

Change-Id: Iffee6ea39c93b8b34e20fb69e4d2c7c837e5ea2e
2010-06-30 15:32:04 -07:00
Jeff Brown
d009787182 Fix injection of specially intercepted keys like HOME.
This change mainly unwinds a premature optimization in the
dispatch pipeline.
To test HOME injection, run 'adb shell input keyevent 3'.

Change-Id: I1c4b7377c205da7c898014b8b07fc6dc1d46e4dd
2010-06-30 14:41:59 -07:00
Andreas Huber
caad0a5c63 Merge "Support for vanilla YUV420sp => RGB565 color conversion." into gingerbread 2010-06-30 11:32:31 -07:00
Dianne Hackborn
3c80a4a044 Implement default key handling for native code.
The native code now maintains a list of all keys that may use
default handling.  If the app finishes one of these keys
without handling it, the key will be passed back off to Java
for default treatment.

Change-Id: I6a842a0d728eeafa4de7142fae573f8c11099e18
2010-06-30 10:49:40 -07:00
Andreas Huber
c543a21a40 Support for vanilla YUV420sp => RGB565 color conversion.
Change-Id: I22e5b554909e169eaf153d1f25b636f6f04a1871
2010-06-30 10:32:39 -07:00
James Dong
f7679a0493 Merge "Added encoding parameters set up for H263 video encoder" into gingerbread 2010-06-29 17:24:10 -07:00
Jeff Brown
0b72e82c5f Fix native input dispatch in the emulator.
Set a default orientation of ROTATION_0.
Added some more careful checks based on whether we have valid
absolute axis information from the driver.
Reset key repeating during configuration changes since the keyboard
device may have been removed.

Change-Id: I685960828acffcb17595fc5683309e8064a76714
2010-06-29 16:52:21 -07:00
James Dong
c0ab2a6458 Added encoding parameters set up for H263 video encoder
Also:
- Allowed start() call when encoder already starts and stop() call when encoder has not started yet
- Handled default value for audio/video sources/encoders and file output format

Change-Id: I03b2f7d3cf570baa0fd011a8c0ad200f2f2a5da1
2010-06-29 16:44:19 -07:00
Dianne Hackborn
2e9f93e8db Update native activity & event APIs to follow correct conventions.
Change-Id: Ie64fb3a9c68bc9c117fa5621b75d1f609e304e0e
2010-06-29 10:43:54 -07:00
Chris Tate
31e0ffe844 Merge "Native input event dispatching." into gingerbread 2010-06-28 19:12:55 -07:00
Jeff Brown
349703effc Native input event dispatching.
Target identification is now fully native.
Fixed a couple of minor issues related to input injection.
Native input enabled by default, can be disabled by setting
WindowManagerPolicy.ENABLE_NATIVE_INPUT_DISPATCH to false.

Change-Id: I7edf66ed3e987cc9306ad4743ac57a116af452ff
2010-06-28 19:10:54 -07:00
James Dong
fe1bafecde Separate MediaRecorderClient with MediaPlayerClient
- An alternative would be to define a common base class that
  both MediaRecorderClient and MediaPlayerClient can derive.
  But since the common code, onTransact() and notify() uses
  some Binder code, having a common base class may not gain
  us too much in terms of code reuse.

Change-Id: Ibc06720278ad173fceacff3d267b7060856c6316
2010-06-28 15:32:26 -07:00
James Dong
09936ed192 Provide progress status report during authoring
- Track either the number of A/V frames authored, or the time elapsed
- Track the completion of the authoring
- Add multiple camera support for authoring by accepting a camera id parameter
- Set file type based on the OUTPUT_FORMAT requested

Change-Id: I0f9d31b3b7a8fa43eb53f572410fb0ebd4fa0bb7
2010-06-25 16:20:42 -07:00
Mathias Agopian
1cb3fdc91e Merge "Fix a bug in sp<> and wp<> which could cause memory corruptions" into gingerbread 2010-06-25 13:28:06 -07:00
Eric Laurent
8e103da1f1 Merge "Various fixes and improvements in audio effects implementation" into gingerbread 2010-06-25 12:35:30 -07:00
Eric Laurent
53334cdb81 Various fixes and improvements in audio effects implementation
Effect API:
- Use different definitions for audio device, channels, formats... in AudioSystem and EffectApi:
  Removed media/AudioCommon.h file created for initial version of EffectApi
- Indicate audio session and output ID to effect library when calling EffectCreate(). Session ID can be useful to optimize
the implementation of effect chains in the same audio session. Output ID can be used for effects implemented in audio hardware.
- Renamed EffectQueryNext() function to EffectQueryEffect() and changed operating mode:
  now an index is passed for the queried effect instead of implicitly querying the next one.
- Added CPU load and memory usage indication in effects descriptor
- Added flags and commands to indicate changes in audio mode (ring tone, in call...) to effect engine
- Added flag to indicate hardware accelerated effect implementation.
- Renamed EffectFactoryApi.h to EffectsFactoryApi.h for consistency with EffectsFactory.c/h

Effect libraries:
- Reflected changes in Effect API
- Several fixes in reverb implementation
- Added build option TEST_EFFECT_LIBRARIES in makefile to prepare integration of actual effect library.
- Replaced pointer by integer identifier for library handle returned by effects factory

Audio effect framework:
- Added support for audio session -1 in preparation of output stage effects configuration.
- Reflected changes in Effect API
- Removed volume ramp up/down when effect is inserted/removed: this has to be taken care of by effect engines.
- Added some overflow verification on indexes used for deferred parameter updates via shared memory
- Added hardcoded CPU and memory limit check when creating a new effect instance

Change-Id: I43fee5182ee201384ea3479af6d0acb95092901d
2010-06-25 11:59:35 -07:00
James Dong
6feaa46496 Enable passing parameters to the MediaWriter at runtime (at start() call).
- estimate the moov box size for mp4 file writer based on the file
  size/duration limit and target bit rate.
- can switch to use 64 bit file offset at runtime

rebased

Change-Id: Ibbe1f57e91ab2605820d5d96e8048d11e5559c53
2010-06-25 10:24:35 -07:00
James Dong
57e7f83c03 Track maximum amplitude and fix getMaxAmplitude()
- only start to track the max amplitude after the first call to getMaxAmplitude()

Change-Id: I64d3d9ca0542202a8535a211425e8bccceca50fc
2010-06-24 21:59:25 -07:00
Mathias Agopian
51a6aef53c Fix a bug in sp<> and wp<> which could cause memory corruptions
when assigning a smart pointer to another one, we need to make
sure to read all the data we need from the right-hand-side
reference (the assignee) before we decRef the assigned.

This bug would cause linked-list of smart-pointers to fail
miserably.

Change-Id: Ibb554c15fddf909f7737c632b7c80322e80ea93f
2010-06-24 21:49:02 -07:00
Andreas Huber
a2549bb644 Merge "Remove most stagefright property overrides, remove VorbisPlayer and VorbisMetadataRetriever as this functionality is now provided by stagefright." into gingerbread 2010-06-24 09:05:08 -07:00
Andreas Huber
8d65dd2653 Remove most stagefright property overrides, remove VorbisPlayer and VorbisMetadataRetriever as this functionality is now provided by stagefright.
Change-Id: Ieafe75a4550c273ad59b4518d7cd4c0fce0f7cce
related-to-bug: 2370115
2010-06-23 16:40:57 -07:00
James Dong
39a0b21c65 Fixed some meta data issues in the recorded mp4 file
- Mainly correcting the location of stbl box which should be a child of minf box.
  This resolved the issue where the mis-muxed encoded file could not be played by QT/VLC.

- Enabled the the recorded tracks by setting the flags to 0x07 by default

- Allows for encoding either 32-bit or 64-bit offsets. By default encoding
  32-bit offsets to reduce the metadata overhead

- Fixed a edts box issue where an empty elst box was used at the end

Change-Id: I570621a26714a81dc9400271aa5d3a07b483172f
2010-06-23 14:09:18 -07:00
Eric Laurent
2c2ce8e53f Merge "Added support for audio sessions in MediaPlayer and AudioTrack." into gingerbread 2010-06-22 18:29:57 -07:00
Chia-chi Yeh
3238302b18 Merge "media: add AudioRecord::getMinFrameCount()." into gingerbread 2010-06-22 17:20:44 -07:00
Eric Laurent
619346f902 Added support for audio sessions in MediaPlayer and AudioTrack.
Audio sessions are used to associate audio effects to particular instances (or groups) of MediaPlayers or AudioTracks.

Change-Id: Ib94eec43241cfcb416590f435ddce7ab39a07640
2010-06-22 17:14:04 -07:00
Chia-chi Yeh
97d61f7518 media: add AudioRecord::getMinFrameCount().
Change-Id: I952071ab10aa49aa96b727d157b68470d69fff3d
2010-06-23 08:01:04 +08:00
James Dong
750600a187 Merge "Single track optimization" into gingerbread 2010-06-22 14:28:15 -07:00