298 Commits

Author SHA1 Message Date
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
Glenn Kasten
e46a86fcb6 Revert "Use AudioTrack::event_type not int in callback"
This reverts commit 2225e4b7049fa3fb9d39a068b8268b63c952d7c1
2011-06-01 15:20:35 -07:00
Glenn Kasten
2225e4b704 Use AudioTrack::event_type not int in callback
Change-Id: Ifefc708d46874e04fd0d01cb6e2d43b987ee796c
2011-06-01 13:50:23 -07:00
Mike Lockwood
e6f3f54e05 resolved conflicts for merge of b107f4de to master
Change-Id: I0290c8517562bcbba7ac1f6ed358011c8e7e250e
2011-05-16 16:08:12 -04: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
Dima Zavin
34bb419e59 update for new audio.h header location
Change-Id: Ic4c62c4037800802427eb7d3c7f5eb8b25d18876
Signed-off-by: Dima Zavin <dima@android.com>
2011-05-12 14:09:57 -07:00
James Dong
79f407cc6c Refactor to share code between MediaPlayer and MediaMetadataRetriever JNI
Change-Id: Ib847213f566dee79126d7c14d00750a9a8dedeb9
2011-05-05 15:11:23 -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
710a206445 DO NOT MERGE MTP: Implement GetThumb command
This allows the PC to access thumbnails in JPEG files over MTP/PTP

Bug: 3219495

Change-Id: Id61f353ba70e896fae9a47338bf7871c0f185d3e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-03 21:03:57 -04:00
Mike Lockwood
371279f802 DO NOT MERGE MTP: Add extended operations to support in-place editing of files
MTP does not support partial writes of files (the entire file must be transferred at once).
This makes it impossible to implement a FUSE file system for MTP
with acceptable performance.
To fix this problem, this change adds extended MTP operations to allow
partial writes to files:

SendPartialObject - allows writing a subset of a file, or appending to the end of a file

TruncateObject - allows changing the size of a file

BeginEditObject - must be called before using SendPartialObject and TruncateObject

EndEditObject - commits changes to a file after it has been edited with SendPartialObject or TruncateObject

We also add GetPartialObject64, which is the same as GetPartialObject
but has a 64 bit offset rather than 32.

Change-Id: Id5365e1c4dc55a2d819c16c9db0a3ac2260f9309
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-03 21:03:56 -04:00
Mike Lockwood
9c112a86de DO NOT MERGE MediaScanner: reimplement the ".nomedia" feature for hiding files from the media provider
Previously we ignored any files and directories that had name started with '.'
and ignored any directories that contained a ".nomedia" file.
Now to support transferring any file via MTP, we now add these previously ignored files
to the media database, but will not mark them as audio, video, image or playlist files.
That way they will be included in the files table but will be hidden from the
audio, video, images and playlist views that are used by apps like Music and Gallery.

Bug: 3405327

Change-Id: Ibb37bb2856a0684ce9f685ed565ad35347622834
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-03 21:03:56 -04:00
Mike Lockwood
7ae938be1b DO NOT MERGE MTP and media provider support for multiple storage devices:
- MTP support for multiple storage units

- Add storage_id column to media database for MTP storage ID

- Add framework resource for defining mount points and user visible descriptions
for multiple volumes

- Clean up locking in MtpServer JNI code

Change-Id: Ide6d47bd9aa1698ed2a13d695613e03f2a9b29e3
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-03 21:03:56 -04:00
Gloria Wang
d01ec6eab0 Add setParameter/getParameter to MediaPlayer API.
for bug 1982947

Change-Id: If3f40e4f18cbba155af29944af38bdc627f8cd53
2011-04-29 10:24:03 -07:00
Dima Zavin
24fc2fb1c5 audio/media: convert to using the audio HAL and new audio defs
Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5
Signed-off-by: Dima Zavin <dima@android.com>
2011-04-27 13:10:10 -07:00
Mike Lockwood
c89f22242b MTP: Implement GetThumb command
This allows the PC to access thumbnails in JPEG files over MTP/PTP

Bug: 3219495

Change-Id: I4964f8b4826dffb7f0f77464ec91bd2e97a2f007
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-04-25 17:40:33 -07:00
Mike Lockwood
997354e4b4 MediaScanner: reimplement the ".nomedia" feature for hiding files from the media provider
Previously we ignored any files and directories that had name started with '.'
and ignored any directories that contained a ".nomedia" file.
Now to support transferring any file via MTP, we now add these previously ignored files
to the media database, but will not mark them as audio, video, image or playlist files.
That way they will be included in the files table but will be hidden from the
audio, video, images and playlist views that are used by apps like Music and Gallery.

Bug: 3405327

Change-Id: I2d7285bd32e06c1a5c4ef6a8a15f8f8b2c33b39b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-04-25 09:21:54 -07:00
Mike Lockwood
825e8716a6 Merge "MTP: Add extended operations to support in-place editing of files" 2011-04-23 08:55:59 -07:00
hongteng
2fb605a088 Fix for issue 3385135 "source code cleanup" engine part
- remove the unused header files

Change-Id: I78971f7a6ae9325ce96a474e448c6f3d586d7ba6
2011-04-22 11:46:10 -07:00
Mike Lockwood
9df53fae3a MTP: Add extended operations to support in-place editing of files
MTP does not support partial writes of files (the entire file must be transferred at once).
This makes it impossible to implement a FUSE file system for MTP
with acceptable performance.
To fix this problem, this change adds extended MTP operations to allow
partial writes to files:

SendPartialObject - allows writing a subset of a file, or appending to the end of a file

TruncateObject - allows changing the size of a file

BeginEditObject - must be called before using SendPartialObject and TruncateObject

EndEditObject - commits changes to a file after it has been edited with SendPartialObject or TruncateObject

We also add GetPartialObject64, which is the same as GetPartialObject
but has a 64 bit offset rather than 32.

Change-Id: I4b110748b97ae05cdc8aab02ecdbbbeb263f7840
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-04-22 07:11:20 -07:00
Shyam Pallapothu
c0125dd4f1 Fix for issue 4133431 "Remove OSAL layer" in JNI part
Change-Id: I4d38454cdf32cb87dadeedcecd19261dd0b0b927
2011-04-21 19:13:56 -07:00
Shyam Pallapothu
3feb41ff6f Fix for issue 4133431 "Remove OSAL layer" in JNI
Change-Id: I55f43989a8b89a3811468b30646fe1af0c87b386
2011-04-20 20:28:32 -07:00
Dheeraj Sharma
7743fa64b1 Fix for issue 4133431 "Remove OSAL layer" in JNI part"
Fix for issue 4133431

Change-Id: I5879b740e7104abca7f4e1e831629997a6eec781
2011-04-20 18:33:02 -07:00
Gloria Wang
966f9e558d Merge "- Add another parameter in notify() to be able to send timed text sample through listener during video playback. - Add OnTimedTextListener in the MediaPlayer For feature request 800939." 2011-04-13 15:36:14 -07:00
Gloria Wang
162ee49e1c - Add another parameter in notify() to be able to send timed text sample
through listener during video playback.
- Add OnTimedTextListener in the MediaPlayer
For feature request 800939.

Change-Id: I65072c27acb4c0037109a72be38c73e9f667420f
2011-04-13 11:11:34 -07:00
Elliott Hughes
dd66bcbf9d More native code cleanup.
Don't keep unused global references to classes, don't throw exceptions
when an exception is already pending, and fix a (harmless) misunderstanding
about how GetStringChars works.

Change-Id: Ie445036f057daa8a1c76aceb7bad2a84fb81d820
2011-04-12 11:28:59 -07:00
Elliott Hughes
a3804cf77f You don't need to poke around inside FileDescriptor manually.
We can help you with that.

Note also that getParcelFileDescriptorFD did no such thing. All its callers
were passing in a regular java.io.FileDescriptor and expecting the int. No
ParcelFileDescriptors involved.

Change-Id: Idc233626f20c092e719f152562601f406cc1b64a
2011-04-11 17:04:01 -07:00
Elliott Hughes
15dd15fd57 Tidy up exception throwing in the media native code.
(I'm going through all of frameworks/base in multiple passes. This pass is just
for exception throwing.)

Change-Id: Ia14a5c720edae86ac780023be88e676aa1b3315d
2011-04-08 17:42:34 -07:00
James Dong
c371a02e7c Media JNI code cleanup
o Don't throw exception again because an exception was already thrown
o Check on return values from FindClass() and GetMethodID

Change-Id: Id92bb8228f1f0d2798d1cdf7de73cbb43816060b
related-to-bug: 4139926
2011-04-07 11:10:25 -07:00
James Dong
3977472d9f Handle the failure from GetStringUTFChars()
Change-Id: I9eb0f9f0fd2fa5116e7be80b1fa2ed4a95521b9d
related-to-bug: 4139926
2011-04-06 12:05:03 -07:00
Brian Carlstrom
46e18c11d4 Don't use local ref for cached jclass reference in JNI code
Change-Id: Id45b2acb358a819f2fd332e99f3a095f6fc7299b
related-to-bug: 4241138
2011-04-06 10:04:20 -07:00
Mike Lockwood
b239b68376 MTP and media provider support for multiple storage devices:
- MTP support for multiple storage units

- Add storage_id column to media database for MTP storage ID

- Add framework resource for defining mount points and user visible descriptions
for multiple volumes

- Clean up locking in MtpServer JNI code

Change-Id: Iffb66ed156ef5bc80b14228af78fbacee7734360
2011-04-05 15:19:16 -04:00
James Dong
a93f84e067 ISurfaceTexture does not have a method getIdentity()
Change-Id: I81e6b0335747bd5c2c4b15c9f8c99100842a06c1
2011-04-01 13:29:27 -07:00
Mathias Agopian
696257ccf3 merge libsurfaceflinger_client into libgui
this is the first step in unifying surfacetexture and surface.
for this reason the header files were not moved, as most of them
will eventually go away.

NOTE: currently we keep libsurfaceflinger_client.so as an empty
library to workaround prebuilt binaries wrongly linking against
it.

Change-Id: I130f0de2428e8579033dc41394d093f4e1431a00
2011-03-25 18:42:40 -07:00
Eric Laurent
602b3286ff Fix issue 3509396: AudioEffect.getParameter JAVA.
Removed dead/buggy code in AudioEffect.getParameter() and
AudioEffect.command() that was meant to return the actual length of
meaningful data in the returned parameter or command reply.

This is replaced by the method return status indicating this length when
positive (negative return codes still indicate the same errors as before).

Modified automated AudioEffect tests accordingly.

Change-Id: Ie89617f912766b8dee73b81f92af9c48027c982d
2011-03-21 17:11:59 -07:00
Andreas Huber
5bb357f4cc Fixing the build.
Change-Id: I89daa503029491e6f1a8321f7e45c9439315ad23
2011-03-21 11:55:01 -07:00
Andreas Huber
14a80afa51 Merge "Support passing headers to MediaMetadataRetriever's setDataSource API" 2011-03-21 11:23:15 -07:00
Andreas Huber
5b7ced6a4e Support passing headers to MediaMetadataRetriever's setDataSource API
Change-Id: Ib1a5c08fc5034cac05034db27007a35c9b660b26
related-to-bug: 3506316
2011-03-21 11:13:59 -07:00
James Dong
9f2cde3cdb Scale the thumbnail if display dimension is different from the actual buffer size
bug - 3379293

Change-Id: I31c08010c97387716433da99d648bd364847b6aa
2011-03-20 14:46:30 -07:00
Rajneesh Chowdury
0b8fe2012d am ce254e86: am 69d05490: am 0edefea8: Merge "Fix for 4087846 Crash reported by monkey report (Java/Jni)" into honeycomb-mr1
* commit 'ce254e8613ddc4d57a8a5a8a2763b22690f451a4':
  Fix for 4087846 Crash reported by monkey report (Java/Jni)
2011-03-16 16:10:32 -07:00
Rajneesh Chowdury
8e7991a52e Fix for 4087846 Crash reported by monkey report (Java/Jni)
Change-Id: I356f975743f5a24e72f33a20ee497a2b12791be6
2011-03-15 16:20:17 -07:00
James Dong
0660c7d048 Merge "Add a release() method to MediaScanner" 2011-03-14 17:49:25 -07:00
Iliyan Malchev
3070af0882 frameworks/base: remove LOCAL_PRELINK_MODULE
Change-Id: I54dd62ebef47e7690afa5a858f3cad941b135481
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-03-14 14:25:59 -07:00
James Dong
133cf8b92a Add a release() method to MediaScanner
bug - 2586042

Change-Id: I08713ac75cbcaf01dff21a24cdefb6e2dacc92cb
2011-03-11 19:08:59 -08:00
Ying Wang
86ad55028b Merge "Remove unnecessary ld flags." 2011-03-11 16:52:59 -08:00
Ying Wang
eab30df281 Remove unnecessary ld flags.
This fixes the x86 buid, in which bfd linker is unavailabe.

Change-Id: Ibce1b5cbfb0435644b2d75056003578371510929
2011-03-11 16:06:02 -08:00
James Dong
f399752858 A little cleanup in MediaScanner JNI code
o mainly use the defined class name rather than repeat the string each time
  to reduce the typo chance.
o format the code also

Change-Id: I131c98f11335ff524d01a6791baa1b8c11013abc
2011-03-11 13:36:28 -08:00
Mike Lockwood
b966b9d9e8 MTP: Convert date created and modified values from seconds to milliseconds
BUG: 4026365

Change-Id: Ifd78cca305299ed1cedd6595609d9bf8d520cd8e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-09 17:28:33 -05:00
Santosh Madhava
895a28e14e Fix for issue 3453519: (Java/JNI) do not allow editing of DRM protected contents
Change-Id: I376483c42b5bed8d2a1765804c2261c18d720a0c
2011-03-04 18:37:51 -08:00
Basavapatna Dattaguru
4fad6762c6 Fix for issue 3371667: fix source code compilation warnings (4)
Change-Id: I898f81fea6c061b9ca7cbd675218d9f4b8c0bc77
2011-03-02 10:37:58 -08:00