1163 Commits

Author SHA1 Message Date
Mike Lockwood
dcc31946f2 MTP: Clean up MtpServer initialization and threading:
Move thread from native to Java code
Remove the stop() method (the thread will exit on its own)

Change-Id: Ib897c3630162f82669a4ee8c187e8172da50b29d
2011-07-13 09:44:42 -04:00
Jeff Brown
501c4671e7 Merge "Eliminate single-process mode. Bug: 5010576" 2011-07-11 13:37:53 -07:00
Mike Lockwood
a59a1bad85 Merge "Remove unnecessary locking from MediaScanner JNI code" 2011-07-11 12:15:21 -07:00
Mike Lockwood
af16d0b30e Remove unnecessary locking from MediaScanner JNI code
There is nothing in this file that requires a global lock.
Furthermore, the lock can cause timeouts in native_finalize if one instance
is being garbage collected while another is busy in processDirectory

Bug: 5002520

Change-Id: I8717f8edeb932200d9f76b3d98915cfbe18b6ec6
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-11 15:07:10 -04:00
Mike Lockwood
e6d24ab6a9 Merge "MTP: Return error if user tries to copy a file >= 4GB to a FAT32 file system" 2011-07-11 10:41:08 -07:00
Mike Lockwood
7a59dd2ce3 MTP: Return error if user tries to copy a file >= 4GB to a FAT32 file system
Bug: 4561836

Change-Id: I2bffb93b032038f6c220c24c752ccd7ca66c23a0
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-11 13:40:02 -04:00
Mike Lockwood
bd682b0408 MediaScanner: Use bulk inserts when in batch mode
To do this we need to move the logic for determining media type to MediaProvider
Make some things in MediaFile public so they can be used from MediaProvider

Bug: 4948188

Change-Id: I6ab168b6b4d45b2fc91ea8bd52ca58283b0efc14
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-11 11:55:26 -04:00
Jeff Brown
10e8971286 Eliminate single-process mode.
Bug: 5010576

Change-Id: Id450dc83efed4897d1e4ff451530fed14457aace
2011-07-08 19:54:07 -07:00
Gloria Wang
2da9eb7175 Merge "- Retrieve is_drm in MediaMetadataRetriever. - Add one more column in MediaStore to indicate whether a media file is drm-protected. - Remove old DRM code from Ringtone - Use the new DRM code in RingtoneManager" 2011-07-06 09:22:05 -07:00
Vikas Arora
7f61f5919d Associate WebP Mime-Type with FILE_TYPE_WEBP.
The last change for adding WEBP Mime-Type
(https://android-git.corp.google.com/g/#change,112919) had this bug.
Fixing the bug in this change.

Change-Id: I084b66de4aabb3892fb0e6fa36062a52d4dcc224
2011-07-06 16:48:18 +05:30
Gloria Wang
82428a862f - Retrieve is_drm in MediaMetadataRetriever.
- Add one more column in MediaStore to indicate whether a
  media file is drm-protected.
- Remove old DRM code from Ringtone
- Use the new DRM code in RingtoneManager

Change-Id: I1311fd1c04841c2cd47df6c901589966cf55a692
2011-07-01 16:52:28 -07:00
Glenn Kasten
03f9435273 Merge "Bug 4571308 Provide correct video frame timestamps" 2011-07-01 15:02:33 -07:00
Chih-Chung Chang
ff90212a3c Remove curtain effect (it's unused).
Change-Id: I2addf390aaa5aa514238b1f98eea67f27745cbf1
2011-06-30 14:41:20 +08:00
Wu-cheng Li
528b084be2 Unlock the camera if media recorder fails to start recording.
bug:4965716

Change-Id: Icb1f7f18e9ea6c4f0427ade2ed338e7d56be5e01
2011-06-29 16:53:37 +08:00
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