74 Commits

Author SHA1 Message Date
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
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
David Krause
b6d90ca129 Fill in CDMA gaps and clean up ToneGenerator code 2009-06-23 12:32:12 -07:00
Android (Google) Code Review
a877427e2f am 0e3d77af: Merge change 4324 into donut
Merge commit '0e3d77af4ec6cd4961cfb144045ee9dfe479ccf6'

* commit '0e3d77af4ec6cd4961cfb144045ee9dfe479ccf6':
  AudioService: Fix routing problem recently introduced in setRouting().
2009-06-16 08:37:50 -07:00
Mike Lockwood
d1f362fe14 AudioService: Fix routing problem recently introduced in setRouting().
Do not disable a route unless routes is zero, to avoid accidentally disabling
if the same route is enabled twice in a row.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-06-16 08:23:13 -04:00
Android (Google) Code Review
cca860fa6b am 3d4b7065: Merge change 4047 into donut
Merge commit '3d4b7065e960cdaecc8d9fd609c2e508a1f9d8f5'

* commit '3d4b7065e960cdaecc8d9fd609c2e508a1f9d8f5':
  Fix issue #899198	MODE_RINGER_STREAMS_AFFECTED does not restore volumes correctly
2009-06-12 11:43:59 -07:00
Android (Google) Code Review
5f80742306 am d670b8c6: Merge change 3981 into donut
Merge commit 'd670b8c61ebd13324ac21bdbc08d8a02fc0a765a'

* commit 'd670b8c61ebd13324ac21bdbc08d8a02fc0a765a':
  Removed trailing whitespaces.
2009-06-12 11:43:55 -07:00
Android (Google) Code Review
3d4b7065e9 Merge change 4047 into donut
* changes:
  Fix issue #899198	MODE_RINGER_STREAMS_AFFECTED does not restore volumes correctly
2009-06-12 08:33:59 -07:00
Eric Laurent
9bcf401d13 Fix issue #899198 MODE_RINGER_STREAMS_AFFECTED does not restore volumes correctly
The problem is that setRingerModeInt() does not handle streams not affected by ringer mode: when enabling "Alarm in silent mode" while in silent mode, setRingerModeInt is called after alarm streamis removed from ringer mode affected streams, and nothing is done.

The fix constists in also processing streams that are not affected by ringer mode and to restore last audible volume for them. It does not arm reapplying the volume for streams the are never affected by ringer mode as we don't do this very often.

The other problem noted in the bug report (ringer volume always restored to non zero value when exiting silent mode even if set to zero before) is also fixed: a new parameter is added to setIndex() and setStreamVolumeInt() to explicitely request to store the volume index as last audible instead of doing it automatically if index > 0.
2009-06-12 06:09:28 -07:00
Nicolas Catania
32f8277488 Removed trailing whitespaces. 2009-06-11 16:54:48 -07:00
Android (Google) Code Review
9da6971d8a am faf41044: Merge change 3644 into donut
Merge commit 'faf410443f0c2ab2d30a1c8ce90f83157b5e593b'

* commit 'faf410443f0c2ab2d30a1c8ce90f83157b5e593b':
  Print a message to the log when a file can't be opened on the client side.
2009-06-09 20:45:59 -07:00
Marco Nelissen
a2df60598a Print a message to the log when a file can't be opened on the client side. 2009-06-09 15:49:23 -07:00
Android (Google) Code Review
f5b746e157 am b2df1699: Merge change 1548 into donut
Merge commit 'b2df1699c996e62baa78877978cd2c5607ea4194'

* commit 'b2df1699c996e62baa78877978cd2c5607ea4194':
  NJ-1409: (frameworks/base) Support new audio encoding types(AMR and AAC).
2009-06-08 16:00:19 -07:00
Jianhong Jiang
2bcda90c02 NJ-1409: (frameworks/base) Support new audio encoding types(AMR and AAC). 2009-06-08 08:50:42 -07:00
Android (Google) Code Review
27b3eaf4de am 0f5179c7: Merge change 2716 into donut
Merge commit '0f5179c7d333ddab729b5943766637c21d1b74db'

* commit '0f5179c7d333ddab729b5943766637c21d1b74db':
  Update MediaPlayer to allow setVideoSurface calls after prepare. Also allow
2009-05-29 14:18:55 -07:00
Android (Google) Code Review
0f5179c7d3 Merge change 2716 into donut
* changes:
  Update MediaPlayer to allow setVideoSurface calls after prepare. Also allow passing a null surface. The API is now enabled to change the surface while the video is playing. This could allow orientation changes during playback or to allow the audio track from a video to play in the background. NOTE: There are still changes required to pmem driver to allow remapping shared physical memory into a process in order for this to work. This change only enables the API to send the appropriate calls when the lower level code supports it.
2009-05-29 14:17:44 -07:00
Dave Sparks
8b0b174198 Update MediaPlayer to allow setVideoSurface calls after prepare. Also allow
passing a null surface. The API is now enabled to change the surface while
the video is playing. This could allow orientation changes during playback
or to allow the audio track from a video to play in the background.
NOTE: There are still changes required to pmem driver to allow remapping
shared physical memory into a process in order for this to work. This
change only enables the API to send the appropriate calls when the lower
level code supports it.
2009-05-29 13:51:38 -07:00
Android (Google) Code Review
a70396cd0a am f6355e24: Merge change 2399 into donut
Merge commit 'f6355e24f5382356ea197135fdeff827aabfdb90'

* commit 'f6355e24f5382356ea197135fdeff827aabfdb90':
  Motorola additions for CDMA support without CdmaSuppConnTracker
2009-05-28 20:30:45 -07:00
Wink Saville
dda5391d50 Motorola additions for CDMA support without CdmaSuppConnTracker
There are corresponding changes to hardware/ril and packages/apps/Phone
that are required to go with these changes.
2009-05-28 17:32:34 -07:00
Android (Google) Code Review
c5d0343b67 am de8268d6: Merge change 2331 into donut
Merge commit 'de8268d6d1cd168510c490b17e93154d2eab767c'

* commit 'de8268d6d1cd168510c490b17e93154d2eab767c':
  Fix issue 1846343 - part 1
2009-05-26 10:11:44 -07:00
Eric Laurent
4bc035a65c Fix issue 1846343 - part 1
This change is the first part of a fix for issue 1846343, :
- Added new enum values for input sources in AudioRecord and MediaRecorder for voice uplink, downlink and uplink+downlink sources.
- renamed streamType to inputSource in all native functions handling audio record.

A second change is required in opencore author driver and android audio input to completely fix the issue.
2009-05-26 07:44:28 -07:00
Android (Google) Code Review
6f3cbac7eb am 65ff54c4: Merge change 1967 into donut
Merge commit '65ff54c44bbd8c1dd6818d42b7c91c634c644aa9'

* commit '65ff54c44bbd8c1dd6818d42b7c91c634c644aa9':
  Document the media scanner's flow through native and java code, since
2009-05-19 14:04:04 -07:00
Marco Nelissen
77f2c4c1f9 Document the media scanner's flow through native and java code, since
I always forget how it works after a while.
2009-05-19 10:00:33 -07:00
Android (Google) Code Review
4ae6aa232b am 109b21ba: Merge change 1677 into donut
Merge commit '109b21bab5a9eb6c17e067b11784ade36129f24f'

* commit '109b21bab5a9eb6c17e067b11784ade36129f24f':
  Findbugs fixes.
2009-05-14 14:53:35 -07:00
Marco Nelissen
d282ac8610 Findbugs fixes. 2009-05-14 13:18:16 -07:00
The Android Open Source Project
56b7eeaa01 manual merge f3af740bdfc261b1cb25c0799af780d3753d4518
Merge commit 'f3af740bdfc261b1cb25c0799af780d3753d4518'
2009-05-06 15:48:33 -07:00
The Android Open Source Project
761daf7550 manual merge for b9c9d260f21b321527c4622a123af9767630d94d
Merge commit 'b9c9d260f21b321527c4622a123af9767630d94d'
2009-05-06 15:43:48 -07:00
Eric Laurent
f3af740bdf Fixed issue 1709450: Requirements for CDMA Tone Generator
Added new tone types for CDMA IS-95 specific tones.
Automatic selection between IS-95, CEPT and JAPAN version base on operator
country code for call supervisory tones.
Also improved tone generator capabilities:
- Each tone segment can now generate its own set of frequencies
- A tone does not have to be a succession of alternating ON/OFF segments
- The sequence repetition does not have to start from first segment
2009-05-06 11:35:46 -07:00
Eric Laurent
b9c9d260f2 fix issue 1713090: After a Bluetooth call, MusicPlayer starts playing on speaker rather than wired external audio.
Temporary fix until audio routing is refactored in Eclair release:
- centralized and synchronized all audio routing control in AudioService.setRouting()
- deprecated AudioManager.setRouting() and AudioManager.getRouting() methods
2009-05-06 10:52:19 -07:00
Jean-Baptiste Queru
74008f608a Merge donut into master 2009-04-22 17:12:34 -07:00
Marco Nelissen
9f0b1a4850 Do case-insensitive matching when determining whether something is music, an alarm sound, notification sound, etc. 2009-04-22 10:34:12 -07:00
Eric Laurent
ef02827d4c Fix issue 1745312: Various cleanups in media framework
AudioTrack, AudioRecord:
  - remove useless mAudioFlinger member of AudioTrack and AudioRecord.
  - signal cblk.cv condition in stop() method to speed up stop completion.
  - extend wait condition timeout in obtainBuffer() when waitCount is -1 to avoid waking up callback thread unnecessarily

AudioFlinger:
  - remove some warnings in AudioFlinger.cpp.
  - remove function AudioFlinger::MixerThread::removetrack_l()  as its content is never executed.
  - remove useless call to setMasterVolume in AudioFlinger::handleForcedSpeakerRoute().
  - Offset VOICE_CALL stream volume to reflect actual volume that is never 0 in hardware (this fix has been made in the open source): 0.01 + v * 0.99.

AudioSystem.java:
  - correct typo in comment

IAudioflinger, IAudioFlingerClient:
  - make AudioFlinger binder interfaces used for callbacks ONEWAY.

AudioHardwareInterface:
  - correct routeStrings[] table in AudioHardwareInteface.cpp
2009-04-21 07:56:33 -07:00
Jean-Michel Trivi
f3af6a0267 AI 147036: am: CL 147035 am: CL 147032 Finalize JetPlayer javadoc.
Original author: jmtrivi
  Merged from: //branches/cupcake/...
  Original author: android-build

Automated import of CL 147036
2009-04-20 16:32:18 -07:00
Jean-Michel Trivi
6fb5a1d0ee AI 147035: am: CL 147032 Finalize JetPlayer javadoc.
Original author: jmtrivi
  Merged from: //branches/cupcake/...

Automated import of CL 147035
2009-04-20 16:30:18 -07:00
Jean-Michel Trivi
954bbe9fa3 AI 146941: am: CL 146938 am: CL 146937 Finalize AudioRecord javadoc.
Original author: jmtrivi
  Merged from: //branches/cupcake/...
  Original author: android-build

Automated import of CL 146941
2009-04-20 10:46:26 -07:00
Jean-Michel Trivi
ea63a41d26 AI 146938: am: CL 146937 Finalize AudioRecord javadoc.
Original author: jmtrivi
  Merged from: //branches/cupcake/...

Automated import of CL 146938
2009-04-20 10:45:23 -07:00
Dave Sparks
1bc5c2645d AI 146833: am: CL 146755 am: CL 146754 Fix some problems in the SoundPool docs and add additional text.
Original author: davidsparks
  Merged from: //branches/cupcake/...
  Original author: android-build

Automated import of CL 146833
2009-04-18 23:01:09 -07:00
Jean-Michel Trivi
3946a2b75b AI 146832: am: CL 146752 am: CL 146751 Finalize AudioTrack javadoc.
Original author: jmtrivi
  Merged from: //branches/cupcake/...
  Original author: android-build

Automated import of CL 146832
2009-04-18 22:58:18 -07:00
Dave Sparks
32346a89c3 AI 146671: am: CL 146668 am: CL 146667 Add advice in MediaRecorder Java docs about using MPEG-4 container format
Original author: davidsparks
  Merged from: //branches/cupcake/...
  Original author: android-build

Automated import of CL 146671
2009-04-18 22:25:38 -07:00
Dave Sparks
40a9d16087 AI 146658: am: CL 146655 am: CL 146654 Add java docs for SoundPool
Original author: davidsparks
  Merged from: //branches/cupcake/...
  Original author: android-build

Automated import of CL 146658
2009-04-18 22:20:18 -07:00
Dave Sparks
6cb9900e6f AI 146755: am: CL 146754 Fix some problems in the SoundPool docs and add additional text.
Original author: davidsparks
  Merged from: //branches/cupcake/...

Automated import of CL 146755
2009-04-17 11:48:25 -07:00
Jean-Michel Trivi
ff14c25339 AI 146752: am: CL 146751 Finalize AudioTrack javadoc.
Original author: jmtrivi
  Merged from: //branches/cupcake/...

Automated import of CL 146752
2009-04-17 11:45:30 -07:00
Dave Sparks
2170312ab0 AI 146668: am: CL 146667 Add advice in MediaRecorder Java docs about using MPEG-4 container format
Original author: davidsparks
  Merged from: //branches/cupcake/...

Automated import of CL 146668
2009-04-16 19:54:16 -07:00
Dave Sparks
cef302d095 AI 146655: am: CL 146654 Add java docs for SoundPool
Original author: davidsparks
  Merged from: //branches/cupcake/...

Automated import of CL 146655
2009-04-16 17:50:27 -07:00
Dianne Hackborn
935ae463d4 AI 145994: Integrate #145778 from Donut.
Automated import of CL 145994
2009-04-13 16:11:55 -07:00
Patrick Scott
3156bb00dd AI 145870: Add a build property for the default alarm alert. Update the various
framework classes to deal with the new property. Also update various
  documentation that mentions the default ringtones.
  Use the build property as the default alert when the user has not chosen
  an alert for an alarm. This is also used if the alarm alert is null when
  the alarm fires.
  BUG=1723684

Automated import of CL 145870
2009-04-13 09:57:38 -07:00
Andy Stadler
f8a7ceaef2 AI 145778: Manual merge changes 145382-145384 from cupcake.
Automated import of CL 145778
2009-04-10 16:24:47 -07:00
Jean-Michel Trivi
26a857e181 Automated import from //branches/master/...@142377,142377 2009-03-24 22:43:38 -07:00
Jean-Michel Trivi
3d78f9ab08 Automated import from //branches/donutburger/...@142376,142376 2009-03-24 22:36:44 -07:00
Niko Catania
4a0029f95d Automated import from //branches/donutburger/...@141213,141213 2009-03-24 19:51:09 -07:00