133 Commits

Author SHA1 Message Date
Mike Lockwood
c37255d5d0 Media scanner support for tracking files of arbitrary type.
The native media scanner no longer filters files based on file extension.
Audio, video, image and playlist files are handled as before, but non-media
files are now inserted into the "files" table, which was originally added
to support MTP.

Change-Id: I9053218fb6d2671a3bb181405c34442b94678afc
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-12 23:21:44 -04:00
Nipun Kwatra
55d39f2066 Merge "Adding hasProfile." 2010-09-10 15:04:17 -07:00
Nipun Kwatra
35c8b532e5 Merge "Added specific resolution and time lapse profiles." 2010-09-10 14:26:45 -07:00
Nipun Kwatra
9d619542be Adding hasProfile.
- Added hasProfile to CamcorderProfile and JNI.
- Added hasCamcorderProfile to MediaProfiles.
- using android.hardware.Camera.CAMERA_ID_DEFAULT for default camera
  in get().

Change-Id: Ib57bb49ae79492d7cbc0ec6c7b6efcbf74f80013
2010-09-10 14:22:11 -07:00
Nipun Kwatra
4af0dfd6cb Added specific resolution and time lapse profiles.
- Added enums QUALITY_{QCIF,480P,720P,1080P}
  QUALITY_TIME_LAPSE_{LOW,HIGH,QCIF,480P,720P,1080P} in CamcorderProfile
  and corresponding ones in MediaProfiles.
- Added functions createDefaultCamcorderTimeLapseLowProfile,
  createDefaultCamcorderTimeLapseHighProfile to set default values.
- Moved javadoc for constants to the get() function.

Change-Id: Ib8b3f8d29395dff77a397d1e6b44cfaf8c481d4d
2010-09-10 14:22:08 -07:00
James Dong
c18c02d78c am 2432248b: am 4709c7fa: Merge "Fixed a copy and paste error" into gingerbread
Merge commit '2432248b03c675812dbb2154e2535bf3ada54b0a'

* commit '2432248b03c675812dbb2154e2535bf3ada54b0a':
  Fixed a copy and paste error
2010-09-10 11:34:15 -07:00
James Dong
8d3b9100a6 Fixed a copy and paste error
Change java/lang/IOException to java/lang/RuntimeException
since there is no java/lang/IOException while keeping
the signature of the MediaRecorder class
constructor unchanged.

Change-Id: Id9b9aa55db42bef528069ef1e2102038391bc15f
2010-09-10 08:49:14 -07:00
Mike Lockwood
db16e5a673 Merge "MTP: Implement support for getting/setting device properties" 2010-09-02 12:03:25 -07:00
Mike Lockwood
59e3f0db08 MTP: Implement support for getting/setting device properties
Added support for the "device friendly name" and "synchonization partner"
properties, which are required by Microsoft.

Change-Id: Ic0443333d75f7d98a2d902a790b9d505a56d4eef
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-02 14:59:26 -04:00
Mike Lockwood
602bebd3fc MTP: try to fix sim build
Change-Id: I25b7bbecf61043e326105c74b2244036beda7c43
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-02 09:58:48 -04:00
Andreas Huber
ee9c3dbdd0 resolved conflicts for merge of 71c908c4 to master
Change-Id: I5a462c8e8ee0acfe2cecbfd58cb9aa2b360da047
2010-09-01 15:53:26 -07:00
Andreas Huber
8d7d413959 Now that AmrInputStream no longer relies on opencore, make sure it's registered in non-opencore builds.
Change-Id: Ia9748691ba60d3c4b5fcaf319ed0b4493d69abc6
related-to-bug: 2963846
2010-09-01 13:27:14 -07:00
Mike Lockwood
f06a449951 Merge "MTP: Send an Intent after an MTP session that resulted in media database modifications" 2010-08-31 14:32:39 -07:00
Mike Lockwood
d20e802512 Merge "Add settings option for running MTP server in PTP mode." 2010-08-31 13:47:13 -07:00
Mike Lockwood
2837eefc54 MTP: Send an Intent after an MTP session that resulted in media database modifications
Change-Id: Ib2796e9155350c67769502935a73cf98d6ae9c08
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-31 16:25:12 -04:00
Mike Lockwood
eabe8bfaf8 Add settings option for running MTP server in PTP mode.
This can be used as a compatibility workaround for host operating systems
without MTP support.

Change-Id: If4f1856206056ca8e40c3ffbfa382f185c413598
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-31 14:35:23 -04:00
Nipun Kwatra
b33a5aea13 Added setAuxiliaryOutputFile to MediaRecorder and JNI
added setAuxiliaryOutputFile to allow setting of an auxiliary output file.
Also added the JNI support.

Change-Id: I8c3335192bd6f7fcbfdfc8552cfd0848f2ad2a5d
2010-08-31 10:38:49 -07:00
Mike Lockwood
828d19dd96 MTP: work in progress on expanded property support
GetObjectPropValue and SetObjectPropValue are disabled until I figure out
why Windows doesn't like what I have done.

Change-Id: I74e945ef3ea031f6d46f4ebaa8df815da0a5c3ed
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-25 18:42:22 -04:00
Mike Lockwood
0a7fa0a868 MTP: Check and clear exceptions after calling into Java in MtpDatabase
Change-Id: I805858c66fe57208c06aa624d16b72966555e005
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-24 11:25:28 -04:00
Mike Lockwood
2b2bff5d98 MTP: Remove retry loop from MTP server code
This should eliminate the spammy logging that my coworkers have noticed.

Change-Id: Ic0e611f5277dd13651490cbe5f7ded5f6e17db4f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-18 13:31:48 -04:00
James Dong
465206940a am b408f549: am d790c648: Add lost preview surface detection in the JNI layer Throws an IOException if this happens rather than crashes
Merge commit 'b408f5490b8591a2799d6b1db91e29e4b203d2bf'

* commit 'b408f5490b8591a2799d6b1db91e29e4b203d2bf':
  Add lost preview surface detection in the JNI layer
2010-08-12 13:30:57 -07:00
James Dong
d790c6485a Add lost preview surface detection in the JNI layer
Throws an IOException if this happens rather than crashes

Change-Id: I32bb4c889ae596f992a0d05283c9130a99b2d0d5
2010-08-12 11:59:56 -07:00
Mike Lockwood
4b322ce4fb MTP: Push queries for supported formats and properties up to Java.
Change-Id: I4f117090340e3916afda3d194521a6092a672ddc
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-10 09:00:30 -04:00
Mike Lockwood
c642e8a44c MTP: Fix some typos
Change-Id: Ib31708c3a925e3c0ab8eea6922ab09e02b740936
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-09 14:17:52 -04:00
Mike Lockwood
9a2046fb5c MTP: Add support for syncing MTP playlists
MTP playlists now correspond to playlists in the media provider
(like those created by the Music app).

Change-Id: I085cb3cff003037ad62f0e297fb0cfd3047cb3a2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-03 15:36:22 -04:00
Mike Lockwood
23ee42f904 MTP: Fix some thread safety issues in MTP server start/stop sequence.
Change-Id: Ied1cddc6220fa7394e8de99df9bc37a1208b04ff
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-03 15:35:38 -04:00
Mike Lockwood
7a047c8986 MTP: Implement GetNumObjects
Change-Id: Iccc3a445f9a1eab7bb76eddd567c6a3a8f155b2b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-02 10:52:20 -04:00
Mike Lockwood
59c777a24a Clean up MtpDatabase API.
Return MTP response codes instead of booleans for success or failure.
Remove some unused code.

Change-Id: I82ce80a4d7779233264e3caf139ebd0cece12f5c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-02 10:37:41 -04:00
Eric Laurent
ba2709583d am 6fa88882: am 62d83a0c: Merge "Audio effects: modified command() parameter types." into gingerbread
Merge commit '6fa8888254deb4961dc64c6ac03dc103c9cd8bcf'

* commit '6fa8888254deb4961dc64c6ac03dc103c9cd8bcf':
  Audio effects: modified command() parameter types.
2010-07-28 07:53:24 -07:00
Eric Laurent
a4c72acfbc Audio effects: modified command() parameter types.
The type of the cmd, cmdSize and *pReplySize parameters of the effect control interface command()
function have been modified from int to uint32_t. This is more consistent with their role.

Change-Id: I84d289fc262d6753747910f06f485597dfee6591
2010-07-28 05:49:21 -07:00
Eric Laurent
b008e9b128 resolved conflicts for merge of d306cc81 to master
Change-Id: Ib593b7719a837de12605e8c75904634843298ba1
2010-07-27 02:41:41 -07:00
Eric Laurent
ca57d1cc89 Audio Effects: added methods to effects java classes to store and load current effect settings in
a single call.

Addional changes:
- Fixed simulator build
- Use effect interface UUIDs from OpenSL ES includes when available
- Added cleanspec rules to remove now obsolete test effect libraries
- Fixed bug in AudioEffect JNI setParameter function.

Change-Id: Ic25ddb135e2cec5a68c181d727321f5ac7a1ab6b
2010-07-27 00:41:31 -07:00
Mike Lockwood
bc4cb0bc79 MTP host: Add support for reading files from an MTP device via ParcelFileDescriptor
Also added some support for sending files to the device that hasn't been debugged yet.
Add locking to MtpDevice to prevent it from attempting multiple transactions simultaneously.

Change-Id: I2b995ba0af086cc6920bd6b8c869f540ad78560a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-26 20:40:45 -04:00
Eric Laurent
0119ba5bd3 am 34161132: am 7070b365: Added support for auxiliary audio effects to AudioTrack and MediaPlayer.
Merge commit '34161132030254bac7dd64c9713832e2f961a061'

* commit '34161132030254bac7dd64c9713832e2f961a061':
  Added support for auxiliary audio effects to AudioTrack and MediaPlayer.
2010-07-21 09:52:17 -07:00
Eric Laurent
7070b36549 Added support for auxiliary audio effects to AudioTrack and MediaPlayer.
Added methods to AudioTrack and MediaPlayer java classes to enable use of
auxiliary audio effects. The effect can be attached and detached by specifying its
ID and the send level controlled.

Change-Id: Ie74ff54a453096a742688476f612ce355543b6f3
2010-07-21 06:28:01 -07:00
Mike Lockwood
ff164a7d6f Exclude MTP implementation from simulator build
Change-Id: I93364c74c26ba6e2bf6b08f1bd82802b966c8dfb
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-15 15:27:38 -04:00
Mike Lockwood
be125a50b4 MTP: Add support for sending events to the host when objects are added and removed
Change-Id: Ia1d5232b919c644c670ff9ca651eca92b3f9ad42
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-13 20:04:22 -04:00
Mike Lockwood
d815f79766 Integrate host to device file transfer with the media provider.
MTP file transfers happen in two stages.  The SendObjectInfo command sends
some information about the file and reserves an ObjectHandle for the new file.
The file transfer is then performed using the SendObject command.

To support this in the media provider, MtpDatabase.beginSendObject receives
the information from SendObjectInfo and creates an row for it in the MTP objects
table for the new file.  After the file transfer has completed, then
MtpDatabase.endSendObject is called.  In endSendObject, we run the media scanner
on the new file, which will add a row to the images, audio, video
or audio playlist table.

To avoid the media scanner creating a second row for the file in the MTP objects
table, we pass the ObjectHandle created in beginSendObject to the media scanner,
which then passes it to the media provider via the content values when it
performs its insert.

Change-Id: I1ebcc63d6bd4404b0d3a93c703a9d3c097381d3a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-12 14:01:22 -04:00
Jean-Michel Trivi
90787e053a am bd3f8b71: am e7b790f1: Merge "Fix swap of sessionId and output in audio effect API." into gingerbread
Merge commit 'bd3f8b711643a172703537e34a0fa7c21c5b953f'

* commit 'bd3f8b711643a172703537e34a0fa7c21c5b953f':
  Fix swap of sessionId and output in audio effect API.
2010-07-09 12:34:03 -07:00
Jean-Michel Trivi
4cb15cf15d Fix swap of sessionId and output in audio effect API.
Change-Id: Idc93415efef92087507401e50cfb235a6f1f7ed7
2010-07-09 12:11:49 -07:00
Mike Lockwood
c5c7853b63 Remove some scafolding and test code that is no longer worth maintaining.
Change-Id: I9ee62d2463d8df1246a84774e8ac7e674778279a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-09 11:07:55 -04:00
Mike Lockwood
d21eac9c70 MTP: Use media provider database to implement MTP device support.
Uses a new "MTP objects" table in the media provider to support basic
enumeration of the external storage file system.
Support for accessing audio, video and image metadata in the existing
media provider tables will be added in a later commit.

The C++ MtpDatabase class is now abstract, to support a proxy subclass that
calls through JNI to the Java MtpDatabase class in the media provider.

Change-Id: I90f0db5f3acc5d35ae78c27a8507edff16d14305
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-08 16:21:09 -04: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
Eric Laurent
dacabf97c6 Merge "Added Visualizer effect." into gingerbread 2010-07-07 16:23:30 -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
Mike Lockwood
dad69277b7 MTP: Fix ownership and file permissions for transferred files and folders
All new files and folders are created with group sdcard_rw
Permissions for new files are 0664 and directories 0775

Change-Id: I6d508231150f687e2e529112fd47f10e30fa594f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-02 15:19:32 -04: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
Mike Lockwood
d0e1a9f40e MTP: Remove an unnecessary thread from the MtpClient class.
Now a single thread is used for passing USB host events up to MtpClient.

Change-Id: I0e3a277956cb3d1036da122ea10acb03a27844d6
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-01 11:39:42 -04:00
Chih-Chung Chang
09b9005769 Add multiple camera support for in MediaProfiles.
Change-Id: Ie89568a0f5f5fd08ede77e33f9a559215d6bed9a
2010-07-01 10:57:15 +08: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