298 Commits

Author SHA1 Message Date
Mike Lockwood
3e13c1b705 MTP: Remove some excessive logging
Change-Id: I4b082d8a2ea7ec4ee80e557ad50ed10b03fe4c52
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-10-11 08:42:53 -04:00
Eric Laurent
329430a54e am 4f21e517: am b37fcbfd: Merge "Added getter for session Id to AudioSink" into gingerbread
Merge commit '4f21e517d09b9d793d20d64547df330fba705b3c'

* commit '4f21e517d09b9d793d20d64547df330fba705b3c':
  Added getter for session Id to AudioSink
2010-10-10 16:06:04 -07:00
Eric Laurent
b3bdf3f008 Added getter for session Id to AudioSink
Added a method to expose the audio session id at AudioSink interface
so that the AudioPlayer in stagefright can retrieve it.

Also:
- Fixed audio effect send level not being initialized in mediaplayer.
- Fixed compilation error when LOGV is enabled in mediaplayer JNI

Change-Id: I4bb55454fd63d646e0e677692d737c4843fb05fb
2010-10-07 18:23:03 -07:00
Mike Lockwood
8839471f4d MTP: Fix local reference leaks.
We cannot rely on the VM automatically freeing local references for us
in a timely manner in JNI code that is not called directly from Java.

Change-Id: I6ee8a9a97cb557b9d3b2ace4e4d20467b436fb9c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-27 13:16:53 -04:00
Mike Lockwood
ae078f7dac MTP: Implement extra object properties for audio, video and image files
Read-only support at this point.

BUG: 2869730

Change-Id: I424ba760c8f5f4af394bd65276f19438fa6da6cb
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-27 13:16:53 -04:00
Mike Lockwood
cc64c5dbfb Merge changes I1302cacd,I05125c79,I8d9653ce
* changes:
  MTP: Fix some warnings
  MTP: Include current property value in GetDevicePropDesc
  MTP: Fix reading and writing device property descriptors
2010-09-26 09:42:06 -07:00
Mike Lockwood
ac745c1c6b MTP: Fix some warnings
Change-Id: I1302cacd1df885c770332cecaaea9f7c8ab97b88
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-25 21:38:13 -04:00
Mike Lockwood
a2a2128423 MTP: Include current property value in GetDevicePropDesc
Change-Id: I05125c79ad58b6f75734fcedcc8af9b689fa9ff3
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-25 21:21:05 -04:00
Eric Laurent
a7936a5d6d am f3ae63ee: am 52f58e96: Merge "fix problem in AudioEffect JNI setup." into gingerbread
Merge commit 'f3ae63eef2d7f55c793b2e76d1371f82cea0aab7'

* commit 'f3ae63eef2d7f55c793b2e76d1371f82cea0aab7':
  fix problem in AudioEffect JNI setup.
2010-09-24 15:57:44 -07:00
Eric Laurent
2fb43ef8c0 fix problem in AudioEffect JNI setup.
There is a problem in AudioEffect and Visualizer native_setup() methods
that causes a crash in the application after the mediaserver process
has crashed and restarted.
The problem is that the native AudioEffect/Visualizer constructor is
called while the JNI is in critical state after calling
GetPrimitiveArrayCritical(). As the mediaserver process just restarted, the
first call to AudioSystem will cause the binder IAudioflinger interface to
be reteived and a callback send to AudioSystem JNI to clear the mediaserver
error state. This will call env->FindClass() and crash due to the JNI being
in critical state.

Also fixed a similar problem in AudioTrack JNI

Change-Id: I4a9026a3e26c7f78d9b4b4bec1aac90fbee2ab62
2010-09-24 13:18:14 -07:00
Mike Lockwood
dbaa3c8f68 Merge changes Ie8bd9107,I1065179a
* changes:
  MTP: Reenable GetObjectPropValue and SetObjectPropValue
  MTP: Minor debug output cleanup
2010-09-23 20:09:46 -07:00
Mike Lockwood
d3bfecb0c9 MTP: Reenable GetObjectPropValue and SetObjectPropValue
Windows no longer chokes now that we implement the minimum set of properties

BUG: 2869730

Change-Id: Ie8bd9107610b9b38f060ad8a2f05334a3b4aff9b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-23 23:04:28 -04:00
Eric Laurent
bb7684bafa resolved conflicts for merge of ac4a284a to master
Change-Id: Ia644f67b5d7d7e7137eef2284e9533b5819c12d8
2010-09-23 12:22:44 -07:00
Eric Laurent
1a5149e5d7 Fix issue 3022800.
- Created sub-package android.media.audiofx for audio effects.
- Hid AudioEffect class contructor, methods and variables not needed by
applications
- Added more javadoc comments for AudioEffect Class

Change-Id: Ibbb40d4e714bb248aa32cf82d7763d74efae96d1
2010-09-23 11:04:03 -07:00
Mike Lockwood
f1f5361e32 MTP host: Use Java longs for storage and object IDs
This avoids problems with unsigned 32 bit numbers with cameras that use
storage and object IDs > 0x7FFFFFFF

Change-Id: I615f2d468851e9d6ff8882d22966d3687697d8eb
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-21 10:41:33 -04:00
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