932 Commits

Author SHA1 Message Date
Daichi Hirono
52da3ad906 Add getPartialObject to Java MtpDevice class.
BUG=26284424

Change-Id: Id05dc6297a1682999eee4e72972fb883fa49a5d1
2016-01-07 12:41:17 +09:00
Yin-Chia Yeh
44581ff4db Camera: add RAW_PRIVATE format
Also add necessary plumbing for RAW_PRIVATE to work for ImageReader.

Bug: 25596619
Change-Id: Ic90f3f44264ac46fae1fafbc27ac64b5319f0970
2015-12-09 11:20:32 -08:00
Jeff Tinker
67b39bfa08 Merge "Remove unused MediaDrm.unprovisionDevice" 2015-12-09 17:07:35 +00:00
Jeff Tinker
dade24c12a Remove unused MediaDrm.unprovisionDevice
bug:25726218
Change-Id: Ibbd51aaa1ee4c21c9ec8b162fc6e378ab7ba6e7b
2015-12-09 09:02:31 -08:00
Zhijun He
dc6bb24a3c media: improve ImageReader/Writer native memory management
* Hook up the native allocation registration with ImageWriter, such that GC
can get some hint when clean up the large memory object.
* Close all pending images when closing ImageReader. This could avoid native
mem leaks for some bad app practice. For example, some apps may hold images
in background service when activity is paused/destroyed, which could cause
huge native memory leaks even ImageReader is closed.
* make Image close thread safe: it is possible the clients close the image
in listener thread and the client main thread.
* Some minor code refactor to reduce the code duplication.

Bug: 25088440
Change-Id: I37d22b52aeb8d2521bf9c702b0f54c05905473e0
2015-12-07 14:38:37 -08:00
Andy Hung
0275a982ab SoundPool: add lock for findSample access from SoundPoolThread
Sample decoding still occurs in SoundPoolThread
without holding the SoundPool lock.

Bug: 25781119
Change-Id: I11fde005aa9cf5438e0390a0d2dfe0ec1dd282e8
2015-12-01 14:40:26 -08:00
Jeff Tinker
3ccb34d707 Improve MediaCodec.CryptoException log messages
The message being logged is "Unknown error" even for
known error types.  This change provides more descriptive
error strings, for the case when the message isn't
explicitly provided by the DRM plugin.

Change-Id: Ic86478d7685cd33e21ecd2f875ef7dbed351e52e
related-to-bug: 25477595
2015-11-09 17:31:05 -08:00
Wonsik Kim
8399506317 Implement pause/resume functionality to MediaRecorder
Bug: 20092236
Change-Id: I02b9f11e210d15f6efe52d44f64ad8a3bc566d96
2015-10-08 08:40:34 +00:00
Daichi Hirono
aeaa12c34e Merge "Add readEvent method to MtpDevice." 2015-09-28 12:40:05 +00:00
Daichi Hirono
0b494663a4 Add readEvent method to MtpDevice.
BUG=23368533

Change-Id: Ibefff559fa7dd0bee17e2812bd7cdd129108d804
2015-09-25 14:54:17 +09:00
Elliott Hughes
434a481b21 am ea1831d2: am b57dd722: resolved conflicts for a884d81e to stage-aosp-master
* commit 'ea1831d211ea0e6b2d161c714bb0786369ef2df5':
  constify JNINativeMethod function pointer tables
2015-09-24 17:23:00 +00:00
Elliott Hughes
b57dd722f1 resolved conflicts for a884d81e to stage-aosp-master
Change-Id: Ice485967fa96f13786024b6939b826638e906ff0
2015-09-24 10:01:32 -07:00
Daniel Micay
76f6a86de2 constify JNINativeMethod function pointer tables
Change-Id: I4036c924958221cbc644724f8eb01c5de3cd7954
2015-09-22 17:10:35 -04:00
Marco Nelissen
2f01c806e0 Stop SoundPool on error instead of continuing
otherwise we might end up looping forever.

Change-Id: I86e33de5387e3acd148d9bba83d18224bb79fd95
2015-09-15 12:49:07 -07:00
Aaron Vaage
56abfa5ce6 Merge "Resolving createByteBufferFromABuffer null input" 2015-09-08 21:33:29 +00:00
Aaron Vaage
e5b641e6ef Resolving createByteBufferFromABuffer null input
It was found that createByteBufferFromABuffer was recieving a NULL buffer in bug
22726278. Based on returning NULL when buffer->base() == NULL, returning NULL
when buffer == NULL. This does not fix bug 22726278 - but address a problem found
while looking into it.

Bug: 22726278
Change-Id: I933b6a4a535d803576a4cdd7a1ffaf4a428c3201
2015-09-04 10:16:57 -07:00
Tomasz Mikolajewski
b80a3cfd05 Add support for uploading files via MTP.
Change-Id: Id1811ab70cb28be471e0a99999e9ad5380deac49
2015-08-28 10:50:23 +09:00
Tomasz Mikolajewski
87763e6a91 Wire uploading to MtpDocumentsProvider.
This patch does not yet allow to upload files, but uploading (creating)
directories already works.

Bug: 22545670
Change-Id: If4d5a53aa26f791475bb1a783e0ac9540d6760c1
2015-08-20 11:34:44 +09:00
Tomasz Mikolajewski
b04990599a Add API for uploading files to MTP devices.
Bug: 22545670
Change-Id: I038c54db06b7cf780bd027d76693e98c685d57a7
2015-08-14 13:09:52 +09:00
Tomasz Mikolajewski
74d4ff8ab3 Add API for streamed reading on MTP devices.
The existing APIs required to copy all bytes to memory, which will fail in
case of very large files, like movies.

Bug: 22908937
Change-Id: I23bdcbdbf08b7c1b1017591799bbb94e53249a57
2015-08-07 11:47:50 +09:00
Lajos Molnar
d08debcf42 MediaSync: fix flush handling and deadlock
- clear pending video frames
- flush audio track
- reset clock
- restart audio track after flush
- don't hold lock during callback

Bug: 22234976
Change-Id: I681df950b67d7f9f77a9c5783279f1c8c91be856
2015-07-16 17:09:20 -07:00
Chien-Yu Chen
69421363c6 Merge "ImageWriter: Exception when Surface is abandoned" into mnc-dev 2015-07-07 22:16:10 +00:00
Chien-Yu Chen
e0ee63046a ImageWriter: Exception when Surface is abandoned
Throw IllegalStateException when queueing or dequeueing an
image if the input surface is already abandoned by the consumer.

Also fix a crash when planes are not initialized when closing
ImageWriter.

Bug: 22279111
Change-Id: I8301920d64a53c45b29e947e52ff323733abbf16
2015-07-06 18:26:28 -07:00
Jeff Tinker
96a2a957e4 Report specific exception type on decrypt with invalid session
bug: 22235465
Change-Id: Ic1e1a86529d4f2246b9768799aacde5cd1070d04
2015-07-06 14:35:29 -07:00
Chien-Yu Chen
be2e38e01c Merge "ImageReader: Fix format workarounds for legacy devices" into mnc-dev 2015-06-19 19:51:42 +00:00
Eric Laurent
1f98e79abd Merge "audio effect JNI: fix global ref leak." into mnc-dev 2015-06-19 16:46:30 +00:00
Eric Laurent
077999844f audio effect JNI: fix global ref leak.
Remove one more global ref leak in AudioEffect
and Visualizer JNI.

Bug: 21629892.
Change-Id: Id77fc2d10f3dc9d3154d6a1cf0f8cc0f83683584
2015-06-19 09:13:02 -07:00
Jeff Tinker
969a06475c Merge "Improve robustness of MediaDrm after mediaserver crash" into mnc-dev 2015-06-19 16:05:13 +00:00
Chien-Yu Chen
aca98de433 Merge "ImageWriter: Remove exception for closing twice" into mnc-dev 2015-06-18 20:42:21 +00:00
Chien-Yu Chen
0375cb042d ImageWriter: Remove exception for closing twice
because close() will be called again when GC kicks in.

Bug: 20945169
Change-Id: If3c5a13be241977ccf4692d5301c423b7ff38918
2015-06-18 11:55:18 -07:00
Chien-Yu Chen
0782aab077 ImageReader: Fix format workarounds for legacy devices
Legacy shim overrides HAL_PIXEL_FORMAT_BLOB to
HAL_PIXEL_FORMAT_RGBA_8888. Make ImageReader aware of the
workaround when returning the format.

Remove the workaround in legacy shim that overrides YUV_420_888
to YV12 because allocating YUV_420_888 buffers with SW access
is supported on Flo.

Bug: 21707937
Change-Id: I84a8610c82ae986a0064873f611e4f257baf1774
2015-06-17 11:03:04 -07:00
Jeff Tinker
314b7f3af3 Improve robustness of MediaDrm after mediaserver crash
If DEAD_OBJECT is returned from binder calls due to
mediaserver crash, throw new MediaDrmResetException.
This allows the app to detect the condition and handle
it properly.

bug: 20614102
Change-Id: Id08b08fb612672fd94383f0470f5fa3f267b944f
2015-06-17 09:32:58 -07:00
Eino-Ville Talvala
cd17a84a86 Merge "Add more specific consumer names for common buffer queue endpoints." into mnc-dev 2015-06-11 19:36:17 +00:00
Dan Albert
fb48b01424 Merge "Fix format string mismatch. Clang build fix." into mnc-dev 2015-06-11 00:53:27 +00:00
Dan Albert
1102e21b5d Fix format string mismatch. Clang build fix.
The gralloc usage flags are an enum, which is backed by an
implementation defined type. Both gcc and clang are making this a long
long. All the values are hard coded to fit within 8 hex characters
though, so just make the cast.

Change-Id: I4a9778a24c2cbf7fb663371d208e30c4921e170d
2015-06-10 23:05:53 +00:00
Jean-Michel Trivi
5c768f4c85 SoundPool monitors AppOps for OP_PLAY_AUDIO
Fix performance regression in SoundPool by not checking SoundPool
  can play audio everytime it's about to play.
Instead check for permission in constructor and register a listener
  for changes on OP_PLAY_AUDIO.

Bug 20018833

Change-Id: I4e7a633d23b98653a149681d18a387cd560efe4d
2015-06-10 14:46:26 -07:00
Lajos Molnar
53858ced4c Merge "media: hook up OnFrameRenderedListener events to framework events" into mnc-dev 2015-06-10 01:04:50 +00:00
Eino-Ville Talvala
ef9db7d81b Add more specific consumer names for common buffer queue endpoints.
Change-Id: I744bdcba6e60e5efd8865f725b09a9f791d76160
2015-06-09 14:15:15 -07:00
Eric Laurent
76f8133188 Use only strong references to AudioEffect
Modify AudioEffect and Visualizer JNI to use strong references to
native AudioEffect object.

Bug: 21629892.

Change-Id: I4c2dea0b2e16d807d6dc5d6b09e02e4652d48873
2015-06-08 18:50:05 -07:00
Lajos Molnar
d8578577b0 media: hook up OnFrameRenderedListener events to framework events
Bug: 20503131
Change-Id: Ife6d4862d14daf5b9659307af57417bd3532e8fe
2015-06-08 11:06:53 -07:00
Jeff Tinker
4575acf1e7 Merge "Fix bug in MediaCrypto.setMediaDrmSession" into mnc-dev 2015-06-03 20:03:29 +00:00
Robert Shih
eb8a51f359 Merge "MediaPlayer: trigger onError instead of exception on stale native notifications" into mnc-dev 2015-06-01 21:56:35 +00:00
Jeff Tinker
025af8b0de Fix bug in MediaCrypto.setMediaDrmSession
MediaCryptoException was being thrown unexpectedly

bug: 21565802
Change-Id: I44768cac1e85a01c8d775b8432d11711ae978b0d
2015-06-01 14:17:06 -07:00
Robert Shih
07830aa6ba MediaPlayer: trigger onError instead of exception on stale native notifications
This change also reverted commit 2c838fbd87ad5685c0008b419ea02421159b9b70,
"MediaPlayer: add mPreparing to weed out unwanted prepared messages".

Bug: 21266735
Change-Id: I392342519420bee2fde1fe1915c51d24101ca27d
2015-06-01 13:50:00 -07:00
Glenn Kasten
626f0dc73b Merge "Deprecations are warnings not errors" into mnc-dev 2015-05-28 22:51:17 +00:00
Glenn Kasten
85d99546a0 Deprecations are warnings not errors
Change-Id: Ib77f45fdc27ea53f1dd181f48c76810d03f8dcdb
2015-05-28 07:59:36 -07:00
Glenn Kasten
16144ac378 Merge "Add comments to indicate code review was done for bugs" into mnc-dev 2015-05-28 14:52:37 +00:00
Robert Shih
410239b6bf MediaPlayer: add mPreparing to weed out unwanted prepared messages
Bug: 21266735
Change-Id: Ie4fe76533c9b7f505c57ba63df7992f2490942cc
2015-05-21 16:43:10 -07:00
Glenn Kasten
14d226a2cd Add comments to indicate code review was done for bugs
Bug: 20818955
Bug: 20890069
Change-Id: I243205b99b198eb1b5a1a027b27cbb7d5aaaa8db
2015-05-18 13:54:40 -07:00
Andy Hung
921ded795f Merge "Fix SoundPool.unload() return value" into mnc-dev 2015-05-16 04:11:09 +00:00