912 Commits

Author SHA1 Message Date
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
Andy Hung
a6238ef389 Fix SoundPool.unload() return value
Bug: 21209627
Change-Id: Ifd5c5f349894744c192cad10c5c875882566ec53
2015-05-15 18:43:03 -07:00
Jeff Tinker
7020a1377a Merge "MediaDrm API Updates per api council review" into mnc-dev 2015-05-15 22:13:33 +00:00
Jeff Tinker
5ffbae6492 MediaDrm API Updates per api council review
bug: 21044671

Change-Id: Ifb34e7b8cb53f7bd5737c0869fc6c1f731ba1c9c
2015-05-15 01:44:59 +00:00
Zhijun He
758e6a8f70 Merge "ImageReader: Image getFormat should return the Image buffer format" into mnc-dev 2015-05-14 21:46:38 +00:00
Chong Zhang
7fc802bbf7 Merge "MediaDataSource: address API council comments" into mnc-dev 2015-05-14 21:29:52 +00:00
Chong Zhang
bc10185fa1 MediaDataSource: address API council comments
- throw IOExecption on fatal errors

- add offset argument to readAt

- and fix a crash in MediaExtractor

bug: 21045118
bug: 21163225
Change-Id: I3c0ff42e539868b9374a4f1f3a9852143f68ba68
2015-05-14 14:19:01 -07:00
Jean-Michel Trivi
6c307879b7 AudioTrack in SoundPool uses audio_attributes_t parameter
Bug 20731155

Change-Id: I62ce9d5c5a88aaf534cfd1861378215f9253248d
2015-05-13 19:26:12 -07:00
Chong Zhang
80283cd747 Merge "MediaCodec: rename usePersistentInputSurface to setInputSurface" into mnc-dev 2015-05-13 19:57:12 +00:00
Chong Zhang
9560ddb48a MediaCodec: rename usePersistentInputSurface to setInputSurface
bug: 21045402
Change-Id: I510a3a694367b8e5a21f4a4fa2a338031fed8991
2015-05-13 10:53:47 -07:00
Wei Jia
ea4eb326cf Merge "MediaSync: address API review." into mnc-dev 2015-05-08 23:23:47 +00:00
Ronghua Wu
c53ad69bcc media: merge CodecException's getErrorCode and getReason.
And unhide getErrorCode.

Bug: 20950388
Change-Id: I19c5ddaadfcdd446777e341f73edb75ca184d32f
2015-05-08 15:31:15 -07:00
Wei Jia
2d61e2b97c MediaSync: address API review.
Rename *Settings to *Params;
Remove size parameter from MediaSync.queueAudio();

Bug: 20887706
Change-Id: I4c572da92ada51458031a482b96b3f624224e608
2015-05-08 15:23:28 -07:00
Chih-Hung Hsieh
9eb9dd326a Fix clang warnings on unused variable, mismatched tag, print format.
BUG: 20890093
Change-Id: I91588f481d80b69823bc9d104b8bd09167ee5373
2015-05-07 12:30:13 -07:00
Zhijun He
7c3997d96a ImageReader: Image getFormat should return the Image buffer format
Also return buffer size correctly.

Bug: 19527410
Change-Id: I9a912afc61d577571c1b2a7f6df21da40838e925
2015-05-06 12:14:36 -07:00
Wei Jia
d80d6f6b05 MediaSync: clean up configureAudioTrack and configureSurface.
Bug: 19666434

Change-Id: I8b112843d430c0730a879abc9aa25f143bdcf09d
2015-05-04 15:59:20 -07:00
Lajos Molnar
4971de2a2e Merge "media: hook up MediaCodec.setSurface" into mnc-dev 2015-05-02 02:23:11 +00:00
Chong Zhang
0335916173 MediaRecorder: implement persistent input surface APIs
Bug: 19127604
Bug: 19489395

Change-Id: Ic8e151b97ea6b85fc65f724d3e68e1cb6b500866
2015-05-02 02:20:20 +00:00
Chong Zhang
8034d60f6e MediaCodec: implement persistent input surface APIs
Bug: 19127604
Bug: 19489395

Change-Id: If0d723c9ecd6fe81d9df210bd2fd026b8603ea4a
2015-05-01 18:30:09 -07:00
Lajos Molnar
5e02ba977e media: hook up MediaCodec.setSurface
Bug: 11990461
Change-Id: Id2dc952594c21c6be68e4ffd039c7f74006a2374
2015-05-01 17:39:37 -07:00
Lajos Molnar
05ebffe6bf media: Hook up MediaPlayer and MediaSync to new settings
Bug: 19666434
Change-Id: Ib815a80a991d4be9ce179514ac517c54f98234fd
2015-04-30 16:49:36 -07:00