1199 Commits

Author SHA1 Message Date
Glenn Kasten
5c2faf3dc3 Bug 4571308 Provide correct video frame timestamps
Change-Id: I0f726817fc02d3e2a4cf82ed801ef977994e6bcc
2011-06-27 11:09:33 -07:00
Wu-cheng Li
42419ce28a Add framework support for camcorder zoom.
The purpose of ICameraRecordingProxy and ICameraRecordingProxyListener is to
allow applications using the camera during recording.

Camera service allows only one client at a time. Since camcorder application
needs to own the camera to do things like zoom, the media recorder cannot
access the camera directly during recording. So ICameraRecordingProxy is a proxy
of ICamera, which allows the media recorder to start/stop the recording and
release recording frames. ICameraRecordingProxyListener is an interface that
allows the recorder to receive video frames during recording.

ICameraRecordingProxy
  startRecording()
  stopRecording()
  releaseRecordingFrame()

ICameraRecordingProxyListener
  dataCallbackTimestamp()

The camcorder app opens the camera and starts the preview. The app passes
ICamera and ICameraRecordingProxy to the media recorder by
MediaRecorder::setCamera(). The recorder uses ICamera to setup the camera in
MediaRecorder::start(). After setup, the recorder disconnects from camera
service. The recorder calls ICameraRecordingProxy::startRecording() and
passes a ICameraRecordingProxyListener to the app. The app connects back to
camera service and starts the recording. The app owns the camera and can do
things like zoom. The media recorder receives the video frames from the
listener and releases them by ICameraRecordingProxy::releaseRecordingFrame.
The recorder calls ICameraRecordingProxy::stopRecording() to stop the
recording.

The call sequences are as follows:
1. The app: Camera.unlock().
2. The app: MediaRecorder.setCamera().
3. Start recording
   (1) The app: MediaRecorder.start().
   (2) The recorder: ICamera.unlock() and ICamera.disconnect().
   (3) The recorder: ICameraRecordingProxy.startRecording().
   (4) The app: ICamera.reconnect().
   (5) The app: ICamera.startRecording().
4. During recording
   (1) The recorder: receive frames from ICameraRecordingProxyListener.dataCallbackTimestamp()
   (2) The recorder: release frames by ICameraRecordingProxy.releaseRecordingFrame().
5. Stop recording
   (1) The app: MediaRecorder.stop()
   (2) The recorder: ICameraRecordingProxy.stopRecording().
   (3) The app: ICamera.stopRecording().

bug:2644213

Change-Id: I15269397defc25cbbcae16abc071c8349c123122
2011-06-27 15:44:57 +08:00
Gloria Wang
1e1b13e62e - Public part of the Metadata API.
- Modify the media framework test for Metadata.

Change-Id: Ib8fa4991f114e1bb88a17ca662844b9b8e1d0faf
2011-06-23 15:28:36 -07:00
Gloria Wang
019caf42c0 Merge "Timed text display format support: 1. Extract 3GPP global format descriptions 2. Extract 3GPP local format descriptions 3. Define data structure (TimedText) for applications to retrieve the format metadata" 2011-06-22 13:47:45 -07:00
Gloria Wang
eaa5d8f9c0 Timed text display format support:
1. Extract 3GPP global format descriptions
2. Extract 3GPP local format descriptions
3. Define data structure (TimedText) for applications to
retrieve the format metadata

Change-Id: I6eac2a78df29ee15beee456656331fdd83b24e8e
2011-06-22 11:32:19 -07:00
James Dong
24a38f1ab9 Switch to use MediaMetadataRetriever to generate the project thumbnail when the first media item is a MediaVideoItem
o This patch allows us to use the logic from MediaMetadataRetriever to extract a thumbnail instead of extracting
  the thumbnail from a fixed position (@500 ms).

Change-Id: I81e8378d9bed80894cc622479679021dce3d52e5
related-to-bug: 3485609
2011-06-21 13:50:51 -07:00
Mike Lockwood
7d40d42a36 MTP: Add support for PTP variant of GetDeviceInfo result.
Change-Id: I09f86fda768b7697665e401adb9516588859bf59
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-21 08:27:06 -04:00
Mike Lockwood
6acc90fc21 MTP: Fix some problems with GetObjectHandles and GetNumObjects commands
These calls did not correctly handle some variants of the arguments,
which showed up when running in PTP mode.

Change-Id: Iedbaefebfa39111c8bcaee7c6cc3820a65d6c98f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-17 19:49:05 -04:00
James Dong
05be9531b6 Second attempt to fix the broken build
o due to a link to a hidden method

Change-Id: Ia488743e9bff6854253696cc368facbd50d2d8f4
2011-06-14 18:51:24 -07:00
James Dong
d52ad9ca8d Fix broken build
Change-Id: Icf7e33a3a4d9b430cd8cbc97801df24a94f9e079
2011-06-14 18:21:59 -07:00
James Dong
9ddb7888b4 Update MediaPlayer and MediaRecorder javadoc
o Adding some description to the Looper requirement for receiving callbacks

Change-Id: I79e7014c521f2286e6c2ccea1097d7e7467eb9ee
2011-06-14 16:38:08 -07:00
tedbo
cc5278a3e2 Support for setting a ParcelSurfaceTexture as the MediaPlayer sink.
This adds support for setting a SurfaceTexture as the MediaPlayer video
sink by using a ParcelSurfaceTexture object. The goal is to enable a
SurfaceTexture to pass through Binder (via ParcelSurfaceTexture) and then
be set on the MediaPlayer.

Change-Id: Ife5689ce673eb4bee1c377019db761685217b71d
2011-06-13 14:27:39 -07:00
Mike Lockwood
aa48835ce9 MTP: Remove obsolete setPtpMode support
PTP mode will be implemented as a separate USB function instead.

Change-Id: I9304c1936c70604ab2ed9704c6b95e11b61f5ba2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-08 09:19:23 -07:00
Marco Nelissen
5ca271efe9 Merge "Add WebP Mime-Type support in Android Media File" 2011-06-06 08:21:07 -07:00
Vikas Arora
d0881d95e2 Add WebP Mime-Type support in Android Media File
Change-Id: Ifaa64c8fc55d1f1ad14db3057821696b565e0c26
2011-06-03 00:13:36 +05:30
James Dong
22bf7a7ea7 Add some comment to MediaRecorder.stop() about the stop() failure (-1007)
o The intended failure happens if stop() call comes immediately after start() call
  before any media data from the output of the encoder is received.

Change-Id: I62fad123ac67e2f566ba555e84c0c3faf2adfd99
2011-05-26 17:45:00 -07:00
James Dong
e8b26dcec7 Extract embedded cover art (aka poster frame) in mp4 files
Change-Id: Ic9421ee27b9aa3b27df00878b887de20f25d232b
2011-05-26 11:31:16 -07:00
Gloria Wang
98472cced0 Merge "For out of band timed text support (timed text in a separate file)." 2011-05-25 20:11:25 -07:00
Gloria Wang
13bc8cde1c For out of band timed text support (timed text in a separate file).
Change-Id: I9e024a63eb9bf6f839deee3c7766a66e63126c96
2011-05-25 17:53:29 -07:00
Eric Laurent
b06ac839dd Issue 4364098: bluetooth SCO not working
AudioService does not need to unconditionally stop virtual calls
when the audio mode is changed from normal. Only stop virtual calls
that have been started from AudioService.

Change-Id: I75992d3655661e5910536a62dc8a8e0256d835e8
2011-05-25 16:03:01 -07:00
Eric Laurent
dc03c61fe3 Bluetooth SCO audio API improvements.
The AudioManager API to control bluetooth SCO did not provide an easy way for
applications to handle SCO connection errors. When a request to activate SCO with
AudioManager.startBluetoothSco() failed, no state change was indicated via
AudioManager.ACTION_SCO_AUDIO_STATE_CHANGED intent. The application had to
implement a timeout to handle connection failures.

The API change consists in defining a new intent AudioManager.ACTION_SCO_AUDIO_STATE_UPDATED
and deprecate AudioManager.ACTION_SCO_AUDIO_STATE_CHANGED. The new intent
will broacast a new state CONNECTING when the SCO connection is initiated.
The application can monitor changes from CONNECTING to either CONNECTED or DISCONNECTED
states to detect connection success or failure.
An extra indicating the previous state is also added to the new intent.

Also improved BluetoothHeadset service management in AudioService. A disconnection
from the service is not considered as a device or SCO link disconnection. Instead, if the
service interface is not present when a request to activate SCO is received, an
attempt is made to reconnect to the service.

Change-Id: I005fda1caaf74bb7de64fece44e9c7e628e828db
2011-05-25 09:11:46 -07:00
Glenn Kasten
817c161ef2 Bug 4184736 unhide MediaPlayer.setTexture
Change-Id: I4c8456465611b717e42c0a11e3ce3b4dc0a34270
2011-05-20 07:30:00 -07:00
James Dong
3c707256cf Merge "Publish setLocation() method as a public Java API" 2011-05-19 11:51:37 -07:00
Gloria Wang
612956c914 Merge "Add one more MIME type (audio/aac-adts) for aac file. Fix for bug 4463059." 2011-05-19 11:15:16 -07:00
Gloria Wang
f9cf277cda Add one more MIME type (audio/aac-adts) for aac file.
Fix for bug 4463059.

Change-Id: Ie2125349667e65b41871a228d87e4dce6b513398
2011-05-19 10:45:45 -07:00
James Dong
af3131fe2e Publish setLocation() method as a public Java API
related-to-bug: 4260295

Change-Id: I91b923af8549127eb08f0d7e535cd53ad229e1f6
2011-05-18 09:41:57 -07:00
Mike Lockwood
fa1e5561cc am 53b988ba: am 5a79cfd7: am 27ac64ec: Merge "StorageVolume: Add getStorageId() accessor" into honeycomb-mr2
* commit '53b988ba1842f40e595bb85f2ca055c24787e6dc':
  StorageVolume: Add getStorageId() accessor
2011-05-18 09:23:35 -07:00
Mike Lockwood
53b988ba18 am 5a79cfd7: am 27ac64ec: Merge "StorageVolume: Add getStorageId() accessor" into honeycomb-mr2
* commit '5a79cfd7518defdce1911cecbc2441bb0a057e54':
  StorageVolume: Add getStorageId() accessor
2011-05-17 16:49:40 -07:00
Mike Lockwood
fbfe555125 StorageVolume: Add getStorageId() accessor
This ID is used for MTP as well as per volume querying in the media provider.

Change-Id: Ic4fc986d972bd477730643f7e9450c390c0b3a4b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-17 17:19:37 -04:00
James Dong
0f32fb3ecf Make track informational event optional, depending on system property
o also add a track informational event to return the encoded data in kilo-bytes

Change-Id: I7c383360d57048c8a3606d0b8141ba53e4f4b224
2011-05-17 12:21:57 -07:00
Mike Lockwood
e6f3f54e05 resolved conflicts for merge of b107f4de to master
Change-Id: I0290c8517562bcbba7ac1f6ed358011c8e7e250e
2011-05-16 16:08:12 -04:00
Dianne Hackborn
f97ed77197 am d90a2c4d: am 1e662c32: Merge "DO NOT MERGE. Integrate from master: Rework display size access." into honeycomb-mr2
* commit 'd90a2c4d4463085155444efb07eba2d6579b444a':
  DO NOT MERGE.  Integrate from master: Rework display size access.
2011-05-16 13:01:38 -07:00
Dianne Hackborn
1e662c3294 Merge "DO NOT MERGE. Integrate from master: Rework display size access." into honeycomb-mr2 2011-05-16 12:54:22 -07:00
Mike Lockwood
b107f4dec3 am e23639e0: am 15afd076: Merge "MTP: Have GetStorageInfo command return correct storage type for removable storage" into honeycomb-mr2
* commit 'e23639e0386735df50ad208078f638c38f662d42':
  MTP: Have GetStorageInfo command return correct storage type for removable storage
2011-05-16 12:41:25 -07:00
Mike Lockwood
fc4a3d37ef am b822d246: am 0a93d875: Merge "StorageManager: Clean up and generalize storage configuration resources" into honeycomb-mr2
* commit 'b822d2464dc59056f736b0c49f0ac514c7cbb9d9':
  StorageManager:  Clean up and generalize storage configuration resources
2011-05-16 12:38:36 -07:00
Dianne Hackborn
ac8dea12c1 DO NOT MERGE. Integrate from master: Rework display size access.
Applications now get the display size from the window manager.  No
behavior should be changed yet, this is just prep for some real
changes.

Change-Id: I47bf8b55ecd4476c25ed6482494a7bcc5fae45d2
2011-05-16 11:58:27 -07:00
Mike Lockwood
51690544aa MTP: Have GetStorageInfo command return correct storage type for removable storage
Change-Id: I09b548483c12080e7d77970babcae2eef379f2f4
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-16 14:29:45 -04:00
Mike Lockwood
2f6a388553 StorageManager: Clean up and generalize storage configuration resources
Replace config_emulateExternalStorage, config_externalStorageRemovable,
config_externalStoragePaths, config_externalStorageDescriptions and
config_mtpReserveSpaceMegabytes resources with an XML resource file
to describe the external storages that are available.

Add android.os.storage.StorageVolume class

StorageManager.getVolumeList() now returns an array of StorageVolume

Change-Id: I06ce1451ebf08b82f0ee825d56d59ebf72eacd3d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-16 14:29:23 -04:00
James Dong
987ab4833e Support for storing geo information in the recorded mp4/3gpp file.
o Geo data (latitude and longitude) is stored in udta box

Change-Id: I76e4aeb741c4b339f3753d3d28190151f3ea4919
related-to-bug: 4260295
2011-05-13 16:29:19 -07:00
James Dong
f605a5aae5 Merge "Fix setDataSource(Context, Uri, Map<String,String> headers)" 2011-05-11 17:52:32 -07:00
Andreas Huber
e4e7b48e33 Fix setDataSource(Context, Uri, Map<String,String> headers)
must not throw an exception if headers == null.

Change-Id: Ic8ddac597707129693874222fb2ebc5a84b8fff6
2011-05-11 16:54:41 -07:00
James Dong
9e836a7d2e Expose the track informational event for testing
Change-Id: I0f12d62d4a36dde76823f7f39e075184c1916504
2011-05-11 12:00:21 -07:00
The Android Automerger
158e3582c0 Merge remote branch 'goog/honeycomb-mr1' into honeycomb-mr2 2011-05-08 22:11:52 -07:00
Scott Main
256764c92f am 9603fdee: am 0d560d45: am 9f7054fe: Merge "docs: add package description for mtp and a little more info to MtpDevice" into honeycomb-mr1
* commit '9603fdeecdf5417041aa68cc61a0373f33b74daa':
  docs: add package description for mtp and a little more info to MtpDevice
2011-05-06 09:01:13 -07:00
Scott Main
9603fdeecd am 0d560d45: am 9f7054fe: Merge "docs: add package description for mtp and a little more info to MtpDevice" into honeycomb-mr1
* commit '0d560d454b88d52a3b48cbc3c3be27e563b7f098':
  docs: add package description for mtp and a little more info to MtpDevice
2011-05-06 08:50:50 -07:00
Scott Main
0d560d454b am 9f7054fe: Merge "docs: add package description for mtp and a little more info to MtpDevice" into honeycomb-mr1
* commit '9f7054fea28e65ae1bf8bc1114090306979ba657':
  docs: add package description for mtp and a little more info to MtpDevice
2011-05-06 08:41:57 -07:00
Scott Main
0cdd9f7def docs: add package description for mtp and a little more info to MtpDevice
Change-Id: I44b3926c4a286f624de525a7f0cc896879582bf5
2011-05-05 15:53:44 -07:00
James Dong
17524dc0d2 Clean up JNI code
o Move the Set/Map/Iterator calls from JNI to Java
o The JNI function receives arrays instead of Maps
o Removed Set/Iterator calls from the Java code as suggested

Change-Id: I34068bf24b61abaf2833dad1f65abc733ed760dd
2011-05-05 11:20:55 -07:00
Mike Lockwood
63de615ddb am 36132a48: DO NOT MERGE MediaScanner: Add special casing of WMP album art files to isNoMediaPath()
* commit '36132a488b2974db9a90da809c2f3eeab99a4427':
  DO NOT MERGE MediaScanner: Add special casing of WMP album art files to isNoMediaPath()
2011-05-04 08:57:59 -07:00
Mike Lockwood
f6df5b41e1 am fb623263: DO NOT MERGE MediaScanner: reimplement the ".nomedia" feature for hiding files from the media provider
* commit 'fb6232635d339c83ca100e472b159f103dafb6e2':
  DO NOT MERGE MediaScanner: reimplement the ".nomedia" feature for hiding files from the media provider
2011-05-04 08:57:37 -07:00