26 Commits

Author SHA1 Message Date
Marco Nelissen
fd2e50086c Fix hang
b/10855561

Change-Id: I29b046b835ce0ca3644e5c2e8f9bca5c0b380d4b
2013-09-25 13:45:41 -07:00
Andreas Huber
226065bbe6 Expose MediaCodec.setParameters API to
- change video target bitrate on the fly
- request sync frames
- temporarily suspend feeding input buffers to the encoder

Change-Id: If5cf1162b2eeb28ac08288ecfa9f0e9823dd972e
2013-08-12 10:14:11 -07:00
Andreas Huber
8d5f3e31c9 Manage jclass objects (and most jobjects) in jni code using ScopedLocalRef
for safer refcounting. Previously jclass objects were not DeleteLocalRef'ed
at all, leading us to exhaust the local ref pool quickly in certain
circumstances.

This change also makes sure we properly serialize int64_t entries when
converting from AMessage to HashMap and boosts thread priority for
java-instantiated MediaCodecs slightly from NORMAL to FOREGROUND.

Change-Id: I4ebdd8a5ca6b3442698c9f86fcc31af8c199aaf5
2013-08-12 09:23:49 -07:00
Jeff Tinker
3ed38266c1 Define error codes for MediaCodec.CryptoException
Define specific failure cases so apps have the information they
need to deal with these conditions.

Also adds a new ResourceBusyException to MediaDrm

Change-Id: Iaecf269d58108f28179974b05671bf29b9fe4b7d
related-to-bug: 10157154
related-to-bug: 9695816
2013-08-03 10:23:41 -07:00
Marco Nelissen
e20a6d5c47 Add support for common encryption
Change-Id: I2d56a6a90dff3ce1c37296934fca01b8a2ca0f89
2013-04-08 14:32:34 -07:00
Andy McFadden
2621e40d0e Implement Surface input to MediaCodec.
Adds two new public methods to MediaCodec, and one new public
constant to MediaCodecInfo (currently @hidden).

Bug 7991062

Change-Id: I830a9794e92334ad05c870cc5fc90be4652147a5
2013-03-04 15:04:12 -08:00
Mathias Agopian
5280061794 Refactoring: Rename SurfaceTextureClient to Surface
Change-Id: I5a218ca11abeeec05e3a4c3cfc581bcc788814ea
2013-02-15 12:47:40 -08:00
Marco Nelissen
eca3eb5983 Merge "Don't create weird ByteBuffers" 2012-12-19 15:40:47 -08:00
Marco Nelissen
cbbea8e651 Don't create weird ByteBuffers
Ensure that we don't create ByteBuffers with a NULL memory pointer
but nonzero size.
b/7892060

Change-Id: I2fc52e19fd05e698c38d94275e738e23a2999e1f
2012-12-19 14:59:12 -08:00
Andy McFadden
d47f7d8b5f Rename ISurfaceTexture and SurfaceTexture
The C++ class names don't match what the classes do, so rename
ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to
GLConsumer.

Bug 7736700

Change-Id: I08e677faf2ebb418ef131d0a8008e01037db0e50
2012-12-18 11:22:21 -08:00
Martin Storsjo
056ef2ed5f MediaCodec: Allow getting the chosen component name
Currently, when the codec was opened by createDecoder/EncoderByType,
the caller does not know what codec actually was chosen, and
(for encoders) thus cannot know what color formats it supports.

This adds new public API.

Change-Id: Ie471f40f8104b37d27ced3dba5a54facc6504b1b
2012-11-14 14:46:57 +02:00
Jeff Brown
64a55af0ac Add plumbing for new surface flinger display API.
Cleaned up the implementation of Surface and SurfaceSession
to use more consistent naming and structure.

Added JNI for all of the new surface flinger display API calls.

Enforced the requirement that all Surfaces created by
the window manager be named.

Updated the display manager service to use the new methods.

Change-Id: I2a658f1bfd0437e1c6f9d22df8d4ffcce7284ca2
2012-08-27 14:34:54 -07:00
Martin Storsjo
d932de9aff mediacodec: Don't crash if trying to open a codec that does not exist
Change-Id: If75e3156517993629f50622a84a9ac573fced815
2012-08-07 11:11:24 -07:00
Andreas Huber
3dd7fd08a8 Return codec buffers that are marked as having host endianness.
Change-Id: Iedfd829d108e65ee368909af14ace68b63e0e168
related-to-bug: 6364139
2012-05-08 13:50:45 -07:00
Andreas Huber
60d610bf10 Various changes to Media* APIs requested by the api council.
Change-Id: Iec2f50c99cf5f00a442737231361334e9ab46340
related-to-bug: 6432753
2012-05-03 16:02:29 -07:00
Andreas Huber
b12a539069 New API to set the video rendering mode on a MediaCodec instance.
Change-Id: I6d765bb4cab7bcf29f09364293c24e8a6930078b
related-to-bug: 6364139
2012-04-30 14:46:22 -07:00
Andreas Huber
bfc56f497d DRM errors signaled by the CryptoPlugin are now visible to MediaCodec clients
through a custom exception "MediaCodec.CryptoException".

Change-Id: I30215e9e13bab68abad23e27dcead7c1accd07f1
related-to-bug: 6365261
2012-04-19 13:42:14 -07:00
Andreas Huber
91befdc0c4 Information required to decrypt buffers is now packaged into MediaCodec.CryptoInfo
New API on MediaExtractor to retrieve a CryptoInfo structure where applicable.

Change-Id: I18edfc9ac56a4544c8f17cba24401b96dacbff7d
related-to-bug: 6275919
2012-04-18 12:19:51 -07:00
Andreas Huber
07ea426e3a Unhide new media related java APIs.
Change-Id: If0b8201eaca74f51f3499b6ecdfb73088586ee24
2012-04-16 10:14:05 -07:00
Andreas Huber
9e6bcce17d New JAVA API to support submitting encrypted buffers of input data.
Change-Id: Ib0df9a9427b4580946179860495b26f743558597
related-to-bug: 6275919
2012-04-06 12:14:47 -07:00
Andreas Huber
8240d9239d New Crypto JAVA class to facilitate decryption via MediaCodec.
Change-Id: Ic4e395faa84f003793c2804f2badabab9e7f1034
related-to-bug: 6275919
2012-04-04 14:06:32 -07:00
Andreas Huber
0e97fc248e More DRM/crypto support.
related-to-bug: 6275919
Change-Id: I9179c03f1f91f939afcb3b1c6514a200bf586c93
2012-04-03 14:16:07 -07:00
Andreas Huber
c52b980277 Documentation/API update for MediaCodec/MediaExtractor, fixes to MediaCodec.
and MediaExtractor.readSampleData now works with a non-direct byte buffer.

Change-Id: Ifbe5c152d9550c34d3b1d493e12a223eb98e8b4e
2012-03-12 14:49:43 -07:00
Andreas Huber
4484bdd2f9 Separate the notion of "stop" from that of "release", i.e.
stop - means transition back to LOADED state and keeping the component
instance allocated.

release - means we get rid of the component completely.

Change-Id: I40ad01ce70821faaad43f57999249904f9144924
2012-02-28 15:54:51 -08:00
Mathias Agopian
8335f1cccc fix libgui header location
Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
2012-02-27 13:03:08 -08:00
Andreas Huber
88572f7a3e Implementation of a java media codec interface and associated tools.
Change-Id: I13e54062d4de584355c5d82bb027a68aeaf2923b
2012-02-22 15:06:06 -08:00