1169 Commits

Author SHA1 Message Date
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
Eric Laurent
98449546fa am b91881fd: am dacabf97: Merge "Added Visualizer effect." into gingerbread
Merge commit 'b91881fdd1608cc922f105ec552b5505da1fecb9'

* commit 'b91881fdd1608cc922f105ec552b5505da1fecb9':
  Added Visualizer effect.
2010-07-07 20:55:40 -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
0920b1cd7d am b3598832: am c4243342: Merge "Allow application to set two more encoding paramters: video profile and level" into gingerbread
Merge commit 'b35988329ac1a574898db9226039e37e352c57a8'

* commit 'b35988329ac1a574898db9226039e37e352c57a8':
  Allow application to set two more encoding paramters: video profile and level
2010-07-07 15:00:28 -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
c832baa107 am f5b4e342: am 2e6aff8e: Merge "ALooperRoster no longer holds strong references to handlers and loopers." into gingerbread
Merge commit 'f5b4e342b581a6e219b49141861b353fb139d00b'

* commit 'f5b4e342b581a6e219b49141861b353fb139d00b':
  ALooperRoster no longer holds strong references to handlers and loopers.
2010-07-07 09:45:38 -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
bce1f2ae9f am 877045aa: am 9406f626: Merge "An AHandler can now find its associated ALooper." into gingerbread
Merge commit '877045aa853aaf6e58ca3ac7bfa2bde9165b55ae'

* commit '877045aa853aaf6e58ca3ac7bfa2bde9165b55ae':
  An AHandler can now find its associated ALooper.
2010-07-07 09:15:08 -07:00
Dianne Hackborn
97250d5c4a am e24901d3: am 68267415: Add new native Looper API.
Merge commit 'e24901d3adb28fff72821d4e8e2ccc25b2184550'

* commit 'e24901d3adb28fff72821d4e8e2ccc25b2184550':
  Add new native Looper API.
2010-07-07 09:14:57 -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
5d17247673 am c4be155a: am 2cfd8198: Merge "Add an option to ALooper::start that allows it to call back into java or not." into gingerbread
Merge commit 'c4be155a540695c42bcd6589604f86d300f4548f'

* commit 'c4be155a540695c42bcd6589604f86d300f4548f':
  Add an option to ALooper::start that allows it to call back into java or not.
2010-07-02 10:06:12 -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
763c962278 am 9f8c490e: am 5460d126: Merge "Added AMessage::debugString() for debugging purposes." into gingerbread
Merge commit '9f8c490e05f86cca1d60d6b6f383a1a98d7985fb'

* commit '9f8c490e05f86cca1d60d6b6f383a1a98d7985fb':
  Added AMessage::debugString() for debugging purposes.
2010-07-02 08:05:36 -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
Nipun Kwatra
d26920ada0 Adding timelapse capture from videocamera.
Current implementation looks at the timestamps of all incoming frames in
CameraSource::dataCallbackTimestamp().
It drops all frames until enough time has elapsed to get the next time lapse frame.
When enough time has passed to capture the next time lapse frame, the frame is no longer dropped
and the timestamp of this frame is modified to be one frame time (1/framerate) ahead of the
last encoded frame's time stamp.

Change-Id: I82b9d5e96113dffa6901aac3b8a8ef999ffc1d0b
2010-07-01 14:54:36 -07:00
Andreas Huber
2d3dcac183 am d51c2cac: am 45bac57a: Support for writing the extracted data to an .mp4 file in the stagefright commandline tool.
Merge commit 'd51c2cacce4ad945bea4c00cea4326cf76b49cd2'

* commit 'd51c2cacce4ad945bea4c00cea4326cf76b49cd2':
  Support for writing the extracted data to an .mp4 file in the stagefright commandline tool.
2010-07-01 11:56:16 -07:00
Chih-Chung Chang
4024ddcf66 am bda93c4c: am 09b90057: Add multiple camera support for in MediaProfiles.
Merge commit 'bda93c4cb94b47c86251d22df16e46a514c191ef'

* commit 'bda93c4cb94b47c86251d22df16e46a514c191ef':
  Add multiple camera support for in MediaProfiles.
2010-07-01 11:55:27 -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
efcd77407b am 177c405a: am c6e1d880: Merge "Introduce official public NativeWindow type." into gingerbread
Merge commit '177c405a242e811b1010bd8382b5807ab8df31a8'

* commit '177c405a242e811b1010bd8382b5807ab8df31a8':
  Introduce official public NativeWindow type.
2010-06-30 16:11:21 -07:00
Dianne Hackborn
c6e1d88022 Merge "Introduce official public NativeWindow type." into gingerbread 2010-06-30 16:05:30 -07:00
Jeff Brown
5840b7c119 am 0c2df984: am d8ae2885: Merge "Fix injection of specially intercepted keys like HOME." into gingerbread
Merge commit '0c2df98425c8fa4ce092eebea80ae197547f6a86'

* commit '0c2df98425c8fa4ce092eebea80ae197547f6a86':
  Fix injection of specially intercepted keys like HOME.
2010-06-30 15:48:50 -07:00
Andreas Huber
7f35403a7a am 86405cbd: am caad0a5c: Merge "Support for vanilla YUV420sp => RGB565 color conversion." into gingerbread
Merge commit '86405cbd53f43529898000112bc9346c21569d26'

* commit '86405cbd53f43529898000112bc9346c21569d26':
  Support for vanilla YUV420sp => RGB565 color conversion.
2010-06-30 15:48:37 -07:00
Dianne Hackborn
25a98b8e21 resolved conflicts for merge of 7f6c6e8f to master
Change-Id: Id9dddb78c51f16ff8c4b60339421c94fde506db2
2010-06-30 15:44:58 -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
Mike Lockwood
81ea83d108 Move MTP JNI code from libandroid_runtime to libmedia_jni
Signed-off-by: Mike Lockwood <lockwood@android.com>

Change-Id: I0c54bbe4e6146beba7d22e782e02ded420f50dbd
2010-06-30 17:54:10 -04: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
bd800f40ac am 42dd9908: am f7679a04: Merge "Added encoding parameters set up for H263 video encoder" into gingerbread
Merge commit '42dd99084d0069ccd90f0305ce374fd943a09de7'

* commit '42dd99084d0069ccd90f0305ce374fd943a09de7':
  Added encoding parameters set up for H263 video encoder
2010-06-29 17:30:42 -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
Chris Tate
41254a8ddd am af4a2d1f: am ddcb543a: Merge "Fix native input dispatch in the emulator." into gingerbread
Merge commit 'af4a2d1f52c7d54408db341781399d2886de72c1'

* commit 'af4a2d1f52c7d54408db341781399d2886de72c1':
  Fix native input dispatch in the emulator.
2010-06-29 17:06:31 -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
639061d9c2 am b5f05d00: am 0934fbb6: Merge "Update native activity & event APIs to follow correct conventions." into gingerbread
Merge commit 'b5f05d0018d72531e40c2afadfee90e9bc0c8893'

* commit 'b5f05d0018d72531e40c2afadfee90e9bc0c8893':
  Update native activity & event APIs to follow correct conventions.
2010-06-29 12:21:16 -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
f40e4928b9 am 96725326: am 31e0ffe8: Merge "Native input event dispatching." into gingerbread
Merge commit '96725326149687168937cf62f75364cf9cc3e96b'

* commit '96725326149687168937cf62f75364cf9cc3e96b':
  Native input event dispatching.
2010-06-28 19:16:42 -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
68d42e3887 am c2c59f69: am 2a76b316: Merge "Separate MediaRecorderClient with MediaPlayerClient" into gingerbread
Merge commit 'c2c59f690deafe34c7701b01b612fd777cee8d4b'

* commit 'c2c59f690deafe34c7701b01b612fd777cee8d4b':
  Separate MediaRecorderClient with MediaPlayerClient
2010-06-28 16:28:11 -07:00