862 Commits

Author SHA1 Message Date
John Reck
db672b03a2 Merge "Change how Java Bitmaps are accessed in a few places" into mnc-dev 2015-04-30 21:00:08 +00:00
John Reck
ed207b9274 Change how Java Bitmaps are accessed in a few places
Stop assuming that a Java Bitmap has a SkBitmap* that
has some externally managed lifecycle, and instead switch
a bunch of users to accessing the bitmap by providing
their own SkBitmap* on which to set the (ref counted!)
SkPixelRef* instead

Attempt #2 to land this, original issue was in getSkBitmap
and should be fixed

Change-Id: I0fd9e193968b41e5597784140d56b4885906864a
2015-04-30 12:46:57 -07:00
Ronghua Wu
1b12db9e62 Merge "media: set codec exception reason." into mnc-dev 2015-04-30 15:40:36 +00:00
Andy Hung
f3d3856f3e Merge "Check for null codec from AMediaCodec_createDecoderByType" into mnc-dev 2015-04-30 00:37:58 +00:00
Andy Hung
26eca01c49 Check for null codec from AMediaCodec_createDecoderByType
NULL codec can now occur if codec cannot be created.

Bug: 20566134
Change-Id: I08d54e733a01d0614313673dc49a6f5e702633ac
2015-04-29 14:09:45 -07:00
Svet Ganov
fa5ecdc4ac Respect the record audio app op - framework
Change-Id: I5696d2ef22738ccffaf8bd7a0ee68cbc3dea3bf1
2015-04-28 16:31:58 -07:00
Ronghua Wu
fb621e8737 media: set codec exception reason.
Bug: 19620911
Change-Id: I13c007bc82b367680e9a15dc6caed6ef8a81d0a6
2015-04-28 10:57:57 -07:00
Dan Stoza
3316452ffa ImageWriter: Change detach to sp<GraphicBuffer>
Changes the call to IGBP::detachNextBuffer to return an
sp<GraphicBuffer> instead of an ANativeWindowBuffer*.

Bug: 20092217
Change-Id: I59d6acef7120de5040c6710aeecfa1633ec7f736
2015-04-27 11:31:12 -07:00
Zhijun He
18191b4a52 Merge "ImageWriter: fix and cleanup the closed Image Handling" 2015-04-24 21:59:21 +00:00
Zhijun He
a58271419e ImageWriter: fix and cleanup the closed Image Handling
Attempting to access an Image after it is closed will result in an ISE.

Also fixed some minor doc issues.

Bug: 19872785
Change-Id: I91f037b2b2f243fcbd905d5a646b505bc9c10638
2015-04-24 13:35:07 -07:00
Wei Jia
25b802d472 MediaSync: fix message delay based on play time for pending audio frames.
Bug: 19666434
Change-Id: Ia9ad3858d4ddccf8aa476f2506785f1d76f90b32
2015-04-23 15:47:50 -07:00
Lajos Molnar
c98f58efd1 media: add SyncSettings to MediaSync and MediaPlayer
Bug: 18249558
Change-Id: I76d7e20d0e0c2d1d24bf60ade6386986573476f0
2015-04-22 22:45:08 -07:00
Lajos Molnar
b3d5fd2528 media: use PlaybackSettings in MediaSync and MediaPlayer
Bug: 19666434
Change-Id: Ic5e517534a26f4e3b0294205e0b93f95338bf072
2015-04-22 21:22:04 -07:00
John Reck
c1b33d665c GraphicsJNI Canvas cleanup
Change-Id: I72e142986a8bc9f464c1951b6b5187919de3462e
2015-04-22 09:34:34 -07:00
John Reck
8222a7ec81 Merge "Revert "Change how Java Bitmaps are accessed in a few places"" 2015-04-20 22:07:45 +00:00
John Reck
edc22fba59 Revert "Change how Java Bitmaps are accessed in a few places"
Bug: 20207616

This reverts commit a771b9861d11671c780092d35c0062eeefcf37c0.

Change-Id: Ifd891cc075274a7986e987229e0fed5a04ed9ff0
2015-04-20 22:06:31 +00:00
John Reck
9d4efdf280 Revert "A bunch more cleanups"
This reverts commit c294d128d03bc9a9982b273a82516c04583438cc.

Change-Id: Id1ebb236950f7c36c6d86e1dd95566d3a200748d
2015-04-17 20:47:27 +00:00
Chris Watkins
56d16568c0 Merge "Unhide the android.media.[Media]DataSource interface." 2015-04-16 17:06:46 +00:00
Wei Jia
03b3dccffe Merge "MediaSync: pass the error code of setPlaybackRate from native code to JAVA." 2015-04-16 03:05:38 +00:00
Wei Jia
0feab71799 MediaSync: pass the error code of setPlaybackRate from native code to JAVA.
Bug: 19666434
Change-Id: I9c892b1e487b3bcdce49ff067e42995194cf6585
2015-04-15 18:06:08 -07:00
Ronghua Wu
9e9ec943ce media: add reason to CodecException ctor.
Bug: 19620911
Change-Id: I3e9d1824c438253e9a7c303478f3cb75d0bb5c75
2015-04-15 18:00:52 -07:00
Chris Watkins
4eaa293808 Unhide the android.media.[Media]DataSource interface.
This allows apps to implement MediaDataSource, which is modeled on
stagefright's DataSource, to supply media data to the framework. This
was already implemented for MediaExtractor, but it was renamed from
DataSource.

MediaExtractor, MediaPlayer and MediaMetadataRetriever each have a new
overload: #setDataSource(android.media.MediaDataSource)

Only NuPlayer supports this new data source.

The change introduces:
 * IDataSource:        The binder interface for DataSource.
 * JMediaDataSource:   The native counterpart to the java interface. It
                       implements IDataSource.
 * CallbackDataSource: A stagefright DataSource that wraps an IDataSource.

Change-Id: I6d9c1167b4a7384c469b1e928f31791a7ebed716
2015-04-15 16:33:15 -07:00
John Reck
f7a61483bc Merge "A bunch more cleanups" 2015-04-15 14:48:19 +00:00
Ronghua Wu
4823dee929 Merge "Revert "media: add new MediaCodec Callback onCodecReleased."" 2015-04-15 01:38:23 +00:00
John Reck
c294d128d0 A bunch more cleanups
Switch a few places to using android::canvas
instead of SkCanvas as well which eliminated
some JNI

Change-Id: I8f98b56442a06362b82b984cd1bd3a92398d8dbc
2015-04-14 15:38:22 -07:00
Ronghua Wu
41eedcf311 Revert "media: add new MediaCodec Callback onCodecReleased."
This reverts commit 4c302e8b141cd490733130e86e44fa4f216de457.

Change-Id: I563ba6419cf61968bf356c5b096445dde55abac2
2015-04-14 21:12:07 +00:00
Ronghua Wu
69fec1aafc Merge "media: add CodecCapabilities.getMaxSupportedInstances." 2015-04-14 01:10:30 +00:00
John Reck
073f36c6c1 Merge "Change how Java Bitmaps are accessed in a few places" 2015-04-13 19:20:59 +00:00
Ronghua Wu
ee2997577d media: add CodecCapabilities.getMaxSupportedInstances.
Bug: 19620911
Change-Id: I11a55121490eba5027498a27c7719133acd1a39a
2015-04-13 11:26:07 -07:00
John Reck
a771b9861d Change how Java Bitmaps are accessed in a few places
Stop assuming that a Java Bitmap has a SkBitmap* that
has some externally managed lifecycle, and instead switch
a bunch of users to accessing the bitmap by providing
their own SkBitmap* on which to set the (ref counted!)
SkPixelRef* instead

Change-Id: I0fd9e193968b41e5597784140d56b4885906864a
2015-04-13 09:50:42 -07:00
Wei Jia
dfb0e6236b MediaSync: fix a typo.
Bug: 19666434
Change-Id: I31e959f49d2539e11a9f23f9f9d7eb785ec08512
2015-04-10 16:48:14 -07:00
Wei Jia
e833b534c9 Merge "MediaSync: add getTimestamp in MediaSync." 2015-04-10 22:44:09 +00:00
Wei Jia
217ec0adfc MediaSync: add getTimestamp in MediaSync.
Bug: 19666434
Change-Id: Ieae70b13864e3eb5abae3577f209f4b926418731
2015-04-10 14:44:06 -07:00
Jeff Tinker
6f6ef118a7 Add a method to associate MediaDrm session with MediaCrypto
Previously, to associate a MediaDrm session with MediaCrypto,
the MediaDrm sessionId was passed as initData to the MediaCrypto
constructor.  This is not ideal for two reasons: it's pretty
obscure and you can't change the association without tearing
down the MediaCodec/MediaCrypto and starting all over.  Use
cases like key rotation require being able to update the
MediaDrm session post-construction.  This CL addresses both of
these issues.

bug: 19570317
Change-Id: Ie3d3eda16651b598cdd41f2180074a43cb6c0884
2015-04-10 04:15:15 -07:00
Jeff Tinker
74797f843c Add expiration update and keys change events
In support of unprefixed EME

bug: 19771612
bug: 19771431
Change-Id: Iddef695cfa1a56363a4c173249597e415cb93f50
2015-04-09 22:44:36 +00:00
Ronghua Wu
4c302e8b14 media: add new MediaCodec Callback onCodecReleased.
Bug: 19620911
Change-Id: I2912c570678861daf1516757dda2160ffddcfa8d
2015-04-09 14:47:58 -07:00
Zhijun He
ce9d6f9c75 ImageReader/Writer: implement opaque format operations
Implement attach/detach for image reader and writer.

Bug: 19872821
Change-Id: Ib45a054c6be0b56b370fa8d709b47b0298ba5ea7
2015-04-08 10:39:29 -07:00
Wei Jia
071a8b71d1 MediaSync: add MediaSync JAVA API
Bug: 19666434
Change-Id: Iab6941f6d81cb95a3b86be14b239287acb0d0eee
2015-04-03 15:34:34 -07:00
Andy Hung
c09ccc5631 Merge "Fix SoundPool track recycling for fast tracks" 2015-04-01 01:42:00 +00:00
Yin-Chia Yeh
37ec99b19c Merge "Add RAW12 image format" 2015-03-31 18:27:23 +00:00
Andy Hung
32ccb69fde Fix SoundPool track recycling for fast tracks
Bug: 19970735
Change-Id: I075d04a688383139484f24ba4be2829c5220c57e
2015-03-30 11:33:33 -07:00
John Spurlock
b4f01b966b Remove the ability to disable audio service.
Running in a configuration without audio service is not fully tested.
Remove the configuration option for now. Also remove unused delegation
layer in SoundPool.

Bug: 19891112
Change-Id: I47be0e32d54b8ef8fa25cf47b85eacf8a4969500
2015-03-24 17:22:13 -04:00
Jeff Tinker
4cdc2de0e4 Report key request message type for unprefixed EME
bug: 19771299
Change-Id: If76fa2988ca45632d0afff601c12f8f5f9908ed1
2015-03-23 16:23:12 -07:00
Zhijun He
d1cbc68405 media: fix build break
clang/llvm complains the timestamp print formating.

Change-Id: Ie4bff9cbec90994709097d087d1c1f2a7d1465cf
2015-03-23 10:10:04 -07:00
Zhijun He
f6a09e5106 ImageReader/Writer: Add ImageWriter and Opaque ImageReader
ImageWriter/Reader API change, including below changes
* Interface for Opaque ImageReader
* ImageWriter Interface and implementation
* Image class minor update to support ImageWriter opaque ImageReader

detach/attach interface are defined but yet to be implemented.

Change-Id: Ic7c0d2df73c80b1a81a7316d8c4556bf7703c309
2015-03-20 18:19:58 -07:00
Yin-Chia Yeh
11d444f0b7 Add RAW12 image format
Change-Id: I1c528ecf62746aa96d6e132eaa874015d9d7c446
2015-03-20 17:40:01 -07:00
Andy Hung
2bec0fe3a7 Merge "Revert "Revert "soundpool: update sample rate when reusing audiotrack""" 2015-03-17 23:14:24 +00:00
Andy Hung
9bd868fe7a Merge "Revert "Revert "soundpool: reuse channel for same sample if available""" 2015-03-17 23:12:38 +00:00
Andy Hung
bc4537393b Revert "Revert "soundpool: update sample rate when reusing audiotrack""
This reverts commit b801f73343194cd081f675a5dc2b3e90959cf6d1.

Change-Id: I0f6ee7fc981d65040f32e7852a5f66fd391b329d
2015-03-17 23:05:12 +00:00
Andy Hung
0c4b81bd3e Revert "Revert "soundpool: reuse channel for same sample if available""
This reverts commit 18c225d05480e7b80b312ef90d15789b34ce6bbc.

Change-Id: If91b4b0fb94df1d910cbaa0a7944001b2baa7be3
2015-03-17 23:02:00 +00:00