4100 Commits

Author SHA1 Message Date
Nicolas Catania
a5ccb22a3d Partial implementation of the parsing of Parcel into Metadata.
In this first cut, a raw parcel is parsed to check that the overall
format is correct.

At the same time, we record the metadata seen and their position in
the parcel for later retrieval using the get* methods.

This means that the 'has' method to check the existence of a metadata
should work.

Removed size and iterator methods. Instead, I added a new method
to give access to the set of keys. The user can make use of the set
to call size(), empty(), iterator() etc...
2009-07-15 13:27:49 -07:00
Android (Google) Code Review
1f872d4e86 Merge change 7067
* changes:
  add a ctor to Mutex to specify the type, which can be shared. This is used by sf and af an soon will allow some optimization in the kernel for non shared mutexes
2009-07-15 01:06:13 -07:00
Mathias Agopian
ac2dd4d82f first attempt to fix the sim 2009-07-13 22:58:25 -07:00
Mathias Agopian
fb4f266a1b add a ctor to Mutex to specify the type, which can be shared. This is used by sf and af an soon will allow some optimization in the kernel for non shared mutexes 2009-07-13 22:06:36 -07:00
Android (Google) Code Review
e41cc497f0 Merge change 6812
* changes:
  Implemented the tracking of the metadata updates.
2009-07-13 16:37:55 -07:00
Nicolas Catania
4df8b2c760 Implemented the tracking of the metadata updates.
Switched from Vector to SortedVector. Removed dead sorting code.
Added a type to represent MetadataType.

Minor fixes missed in the previous CL.
2009-07-10 14:15:49 -07:00
Marco Nelissen
0fc736f321 Don't pass references to temporary objects, and handle the case where we dont have a Surface. 2009-07-10 13:43:41 -07:00
Android (Google) Code Review
b88993f073 Merge change 6797
* changes:
  rename libsgl/libcorecg to libskia
2009-07-10 12:59:40 -07:00
Mike Reed
b5af325fb1 rename libsgl/libcorecg to libskia 2009-07-10 15:33:21 -04:00
Nicolas Catania
5d55c71198 Basic plumbing to retrieve metadata from the native player.
IMediaPlayer.h
Added a getMetadata method that mirrors the on in MediaPlayer.java.

MediaPlayer.java
Added a native method to get the metadata from the native player.
Parse the parcel into a Metadata object.

Metadata.java
Added a stub to parse the Parcel returned by the native player into
a set of metadata.

android_media_MediaPlayer.cpp
JNI call to forward the getMetadata call.

MediaPlayerService.cpp
MediaPlayerService::Client implements the new getMetadata method added in IMediaPlayer.h
2009-07-10 11:00:42 -07:00
Android (Google) Code Review
c494ba2544 Merge change 6636
* changes:
  Implemented the metadata changed notification filters.
2009-07-09 14:51:54 -07:00
Eric Laurent
cfe2c402d9 am 5964e737: Fix issue 1946033: dialer deadlocks and/or ANRs when using dialpad in-call
Merge commit '5964e73774b381748013b91d04dfb6fc60f533ee'

* commit '5964e73774b381748013b91d04dfb6fc60f533ee':
  Fix issue 1946033: dialer deadlocks and/or ANRs when using dialpad in-call
2009-07-09 12:49:38 -07:00
Android (Google) Code Review
5e7e8da04d am b799616d: Merge change 6208 into donut
Merge commit 'b799616d8f0f94e866767fa730f56d82543fb49b'

* commit 'b799616d8f0f94e866767fa730f56d82543fb49b':
  Move ExifInterface to android.media package so we can reference it from MediaScanner.
2009-07-09 12:49:18 -07:00
Nicolas Catania
b2c693919b Implemented the metadata changed notification filters.
IMediaPlayer:
new setMetadataFilter method so set a filter (2 lists of allowed and blocked metadata type)
serialized in a Parcel.

MediaPlayer.java/android_media_MediaPlayer.cpp/mediaplayer.cpp
new setMetadataFilter that passes the filter down to the MediaPlayerService's binder interface.

MediaPlayerService.cpp
The Client inner class holds the allowed and blocked metadata types.
These are in 2 vectors that get populated in the setMetadataFilter.

A new shourldDropMetadata method returns true if a type of metadata should be dropped according
to the filters.

The notify method in run the metadata update notifications thru the filter and possibly drop them.
2009-07-09 11:46:02 -07:00
Eric Laurent
5964e73774 Fix issue 1946033: dialer deadlocks and/or ANRs when using dialpad in-call
The cause is very likely that the WaveGenerator *lpWaveGen returned by lpToneGen->mWaveGens.valueFor(lFrequency) just before calling lpWaveGen->getSamples(lpOut, lGenSmp, lWaveCmd) is invalid. The frequency lFrequency is not part of the frequencies in mWaveGens.
This can happen if a different tone is started while the callback function is active: The state is changed to TONE_RESTARTING and the call to prepareWave() at line 1226 will change the tone descriptor pointed to by mpToneDesc as well as the content of mWaveGens. However, mpToneDesc was cached in a local variable lpToneDesc when entering the callback and is not reloaded when exiting prepareWave(). This causes a mismatch between the tone frequencies listed in lpToneDesc and the frequencies present in mWaveGens.
This regression was introduced in change 973 when mpToneDesc was cached in a local variable.
2009-07-09 01:56:20 -07:00
Android (Google) Code Review
b799616d8f Merge change 6208 into donut
* changes:
  Move ExifInterface to android.media package so we can reference it from MediaScanner. Also hide public constructor and wrap common use cases as atomic operation to avoid race condition in jhead native codes.
2009-07-08 23:04:34 -07:00
Nicolas Catania
9193e08dc1 New Metadata API for the MediaPlayer.
MediaPlayer.java
New method getMetadata to fetch metadata from the player.
New method setMetadataFilter to filter metadata notification and fetches.

Metadata.java
Added basic interface. Implementation incomplete.
2009-07-08 09:47:29 -07:00
Android (Google) Code Review
f751c8c2ca am e9ac96f7: Merge change 6454 into donut
Merge commit 'e9ac96f76d513d2cee50dfea7d70b14669643ba9'

* commit 'e9ac96f76d513d2cee50dfea7d70b14669643ba9':
  Fix issue 1967295: Add a method to request reloading of audio settings by AudioService.
2009-07-08 09:25:12 -07:00
Eric Laurent
4050c93601 Fix issue 1967295: Add a method to request reloading of audio settings by AudioService. 2009-07-08 06:59:50 -07:00
repo sync
20b03ea70b Move ExifInterface to android.media package so we can reference it from MediaScanner.
Also hide public constructor and wrap common use cases as atomic operation to avoid
race condition in jhead native codes.
2009-07-08 17:59:47 +08:00
Eric Laurent
fcc5be99e0 am 88e209dc: Fix issue 1743700: AudioTrack: setPlaybackRate can not set the playback rate to twice of the ouputSR
Merge commit '88e209dcf8c2ebddda5c272f46d1bd5478bc639c'

* commit '88e209dcf8c2ebddda5c272f46d1bd5478bc639c':
  Fix issue 1743700: AudioTrack: setPlaybackRate can not set the playback rate to twice of the ouputSR
2009-07-07 09:36:14 -07:00
Eric Laurent
88e209dcf8 Fix issue 1743700: AudioTrack: setPlaybackRate can not set the playback rate to twice of the ouputSR
Store sample rate on 32 bits instead of 16 bits in audio_track_cblk_t.
Removed sampleRate() methods from AudioTrack and AudioRecord: replaced by getSampleRate().
AudioTrack::setSampleRate() no returns a status.
2009-07-07 07:10:45 -07:00
Mathias Agopian
03a9a3449a Merge commit 'goog/master' into merge_master 2009-07-06 14:16:55 -07:00
Android (Google) Code Review
6231e3a778 am ef1f21b3: Merge change 6231 into donut
Merge commit 'ef1f21b34f5624adb7436d3da927660ed16c97c7'

* commit 'ef1f21b34f5624adb7436d3da927660ed16c97c7':
  Don't trim() in the mediascanner, as that would remove the special "sort first" character.
2009-07-06 12:00:12 -07:00
Marco Nelissen
513d8068b4 am 899725b0: Make sure ringtones are sorted correctly.
Merge commit '899725b05dd5c8c51f9f802d4f0a7190532ce0a5'

* commit '899725b05dd5c8c51f9f802d4f0a7190532ce0a5':
  Make sure ringtones are sorted correctly.
2009-07-06 12:00:02 -07:00
Marco Nelissen
73bb511ade Don't trim() in the mediascanner, as that would remove the special "sort first" character. 2009-07-06 11:07:27 -07:00
Marco Nelissen
899725b05d Make sure ringtones are sorted correctly. 2009-07-06 10:57:01 -07:00
Shin-ichiro KAWASAKI
56cfd6681a Modified libdrm to support SuperH platform
Added USTL_ANDROID_SH defination while build on SuperH platform
2009-07-03 16:37:46 +09:00
Mathias Agopian
dfe983bd79 Merge commit 'goog/master' into merge_master 2009-07-01 18:33:18 -07:00
Android (Google) Code Review
8529fc3a15 am 2f8d58b7: Merge change 5420 into donut
Merge commit '2f8d58b7ae2b9dc60eed83e5dddc8c28223e1ede'

* commit '2f8d58b7ae2b9dc60eed83e5dddc8c28223e1ede':
  Added two test cases to trace the failure in closing the hw decoder and the current playtime is greater than the duration.
2009-07-01 14:18:45 -07:00
Android (Google) Code Review
2f8d58b7ae Merge change 5420 into donut
* changes:
  Added two test cases to trace the failure in closing the hw decoder and the current playtime is greater than the duration.
2009-06-30 11:41:05 -07:00
Yu Shan Emily Lau
f47b8e991f Added two test cases to trace the failure in closing the hw decoder and the current playtime is greater than the duration. 2009-06-30 11:13:06 -07:00
Android (Google) Code Review
548b9920a8 am 2d9f3169: Merge change 5595 into donut
Merge commit '2d9f31697fb5ece89c80cc66bdd3bd9caa9df9c3'

* commit '2d9f31697fb5ece89c80cc66bdd3bd9caa9df9c3':
  We might try to close the Vorbis file twice under certain
2009-06-29 20:20:04 -07:00
Dave Sparks
978811960a We might try to close the Vorbis file twice under certain
circumstances. This fix nulls the mFile member so we don't
try to close it twice. Bug 1904783.
2009-06-26 17:24:22 -07:00
Mathias Agopian
f31868e59f merge master in master_gl 2009-06-24 18:31:21 -07:00
Android (Google) Code Review
2387208c9e am 3d7b8d1a: Merge change 5158 into donut
Merge commit '3d7b8d1aa6a362292f56defbe8fb2d5653f79282'

* commit '3d7b8d1aa6a362292f56defbe8fb2d5653f79282':
  Use a ref-counted callback interface for Camera.
2009-06-24 13:54:09 -07:00
Android (Google) Code Review
567c2e22aa am 9efba9d2: Merge change 5176 into donut
Merge commit '9efba9d29f32daf1b6ee6485bae6764ab24f04e9'

* commit '9efba9d29f32daf1b6ee6485bae6764ab24f04e9':
  Export the output to a text file and save to sdcard
2009-06-24 13:12:37 -07:00
Nicolas Catania
20cb94eeb5 Direct api to the native media player.
MediaPlayer.java has 3 new methods:
* newRequest creates a Parcel that can be used to send data to the
  native player using invoke.
* invoke issues synchronous calls to the native player using opaque
  parcels for the request and reply.

IMediaPlayer.h has 1 new abstract method:
* invoke

The Midi and Vorbis players have a stub for these. So far only PV
makes use of that new feature.

To avoid any copy overhead, the JNI interface uses Parcel as a java
object (no serialization/copy happens at the JNI layer).

The remote interface token is inserted when the Parcel is constructed
in java. That way the parcel is already routable when it reaches
 IMediaPlayer.cpp (proxy). No extra copy is needed there.
2009-06-24 08:22:52 -07:00
Dave Sparks
5e27115995 Use a ref-counted callback interface for Camera.
This allows the camera service to hang onto the callback interface
until all callbacks have been processed. This prevents problems
where pending callbacks in binder worker threads are processed
after the Java camera object and its associated native resources
have been released.
Bug 1884362
2009-06-24 07:58:27 -07:00
Android (Google) Code Review
9efba9d29f Merge change 5176 into donut
* changes:
  Export the output to a text file and save to sdcard
2009-06-23 19:51:00 -07:00
Yu Shan Emily Lau
f16da13585 Export the output to a text file and save to sdcard 2009-06-23 19:36:43 -07:00
Android (Google) Code Review
cf01aa3cff am 1bee98af: Merge change 5100 into donut
Merge commit '1bee98af6532eba3c6cda636eee890530c95a2a7'

* commit '1bee98af6532eba3c6cda636eee890530c95a2a7':
  Fill in CDMA gaps and clean up ToneGenerator code
2009-06-23 13:42:41 -07:00
Android (Google) Code Review
1bee98af65 Merge change 5100 into donut
* changes:
  Fill in CDMA gaps and clean up ToneGenerator code
2009-06-23 13:38:34 -07:00
Android (Google) Code Review
6922f19d30 am 843f5eb3: Merge change 5054 into donut
Merge commit '843f5eb36a67367ae76800f74e184f00af50ef54'

* commit '843f5eb36a67367ae76800f74e184f00af50ef54':
  Rollback the number of loop in the memory stress test
2009-06-23 13:08:18 -07:00
David Krause
b6d90ca129 Fill in CDMA gaps and clean up ToneGenerator code 2009-06-23 12:32:12 -07:00
Yu Shan Emily Lau
327420252c Rollback the number of loop in the memory stress test 2009-06-22 21:19:53 -07:00
Android (Google) Code Review
949070dd74 am 11348cff: Merge change 4885 into donut
Merge commit '11348cffef46585027ba3035357370177a554826'

* commit '11348cffef46585027ba3035357370177a554826':
  Merge the output file into one.
2009-06-22 19:47:35 -07:00
Yu Shan Emily Lau
a74603052b Merge the output file into one. 2009-06-22 14:50:25 -07:00
niko
dcd810d013 Renamed all android.hardware.IMedia* strings to android.media.IMedia*
The android.hardware.ICamera string have not been changed (but is looks
like the camera service and client one should undergo the same procedure)

The implementation of the interface must provide a unique string for
it's interface name. Currently all these strings in the media framework
start with 'android.hardware' when it should really be 'android.media',
the interface token has nothing to do with hardware.
2009-06-22 09:08:19 -07:00
Mathias Agopian
69f066c8fc Merge commit 'goog/master' into merge_master 2009-06-16 12:38:55 -07:00