543 Commits

Author SHA1 Message Date
Ashok Bhat
a0398430fc AArch64: Make graphics classes 64-bit compatible
Changes in this patch include

[x] Long is used to store native pointers as they can
    be 64-bit.

[x] Some minor changes have been done to conform with
    standard JNI practice (e.g. use of jint instead of int
    in JNI function prototypes)

[x] AssetAtlasManager is not completely 64-bit compatible
    yet. Specifically mAtlasMap member has to be converted
    to hold native pointer using long. Added a TODO to
    AssetAtlasManager.java to indicate the change required.

Change-Id: I940433f601c6db998c1a8ffff338f5361200d5ed
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
2014-01-28 17:40:38 +00:00
Ashok Bhat
075e9a19ce AArch64: Use long for pointers in media classes
For storing pointers, long is used in media classes,
as native pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use
of jint instead of int in JNI function prototypes)

Change-Id: Idc4ca0124d03df7f9cef412488abafd020e5e774
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
2014-01-15 13:09:27 +00:00
Marco Nelissen
337aa376c0 Merge "Add NULL check in updateProxyConfig" 2014-01-14 16:08:18 +00:00
Jason Sams
868173a53f Merge "Fix a JNI local reference leak in MediaDrm" 2014-01-11 00:42:20 +00:00
Ashok Bhat
e2e59326f1 AArch64: Use long for pointers in MTP classes
For storing pointers, long is used in MTP classes,
as native pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use
of jint instead of int in JNI function prototypes)

Change-Id: I67805547251722e7b77611d47d0bb632a64d3e6d
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
2014-01-07 12:52:57 +00:00
Ashok Bhat
44ba5c1b4e AArch64: Use long for pointers in VideoEditor classes
For storing pointers, long is used in VideoEditor
classes, as native pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use
of jint instead of int in JNI function prototypes)

Change-Id: Ifff3a28f2ab6774ee89d31770ad63451c8726431
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
2014-01-07 12:49:41 +00:00
Ashok Bhat
ea7861c918 AArch64: Use long for pointers in audio effect classes
For storing pointers, long is used in AudioEffect
and Visualizer classes, as native pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use
of jint instead of int in JNI function prototypes)

Change-Id: Ief49bbe5baef663e268c7f6d70ac33a4df45621c
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
2014-01-07 12:47:51 +00:00
Ashok Bhat
b348c3fd87 AArch64: Use long for pointers in AmrInputStream
For storing pointers, long is used in AmrInputStream
class, as native pointers can be 64-bit.

Change-Id: I78fff3eb54fc7101746b0d693cbc4e923c2bad08
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
2014-01-07 12:44:38 +00:00
Narayan Kamath
f3172c623e Merge "MediaDrm#mNativeContext is a long, not int." 2013-12-19 12:35:24 +00:00
Patrik2 Carlsson
265551a164 Fix a JNI local reference leak in MediaDrm
A reference leak was found in the subtitle usecase that also
applies to android_media_MediaDrm.cpp
(Code taken from the similar fix in android_media_MediaPlayer.cpp)

Change-Id: Icc4b25e4adc9a600ff4ac99a7a8478bb55a6e348
2013-12-19 10:59:42 +09:00
Oscar Rydhé
e795ec73eb Add NULL check in updateProxyConfig
If the exclusionList was null in updateProxyConfig the VM would
crash when converting it to a UTF8 string. Avoid this by adding a
null check.

Change-Id: I0d8106fd54385bd9ae9c652a6c67d459a119cf2b
2013-12-19 09:38:59 +09:00
Narayan Kamath
535daa191b Remove unused field from MediaMuxer
Change-Id: If1ebb2302654b64924084a52425366f1b69c7c30
2013-12-18 17:58:11 +00:00
Narayan Kamath
f11dd63e0c MediaDrm#mNativeContext is a long, not int.
Therefore, we must use SetLongField and not SetIntField.

Change-Id: I2a805dd6b7c8e4905e742d8632d941f381a05930
2013-12-18 16:58:36 +00:00
Ashok Bhat
656fd04026 AArch64: Use long for pointers in MediaDrm and MediaMuxer
For storing pointers, long is used in MediaDrm and
MediaMuxer classes, as native pointers can be 64-bit.

Change-Id: I77f26cde627baf0dce70b6aa3a4dbd974051d9a6
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2013-12-10 18:10:47 +00:00
The Android Open Source Project
dbccd44a63 Merge commit 'b873a17ce7be0a9771c24999adca6964431728f6' into HEAD
Change-Id: I938755073e70602cc8f51ce9bd420fdcf870cecd
2013-11-22 11:18:57 -08:00
Elliott Hughes
99f752149b Fix a JNI local reference leak in JNIMediaPlayerListener::notify.
Bug: https://code.google.com/p/android/issues/detail?id=62137
Change-Id: I776cd83a66de37fdbbe8af367bf1b26e5e0c7247
2013-11-13 15:10:40 -08:00
Marco Nelissen
fd2e50086c Fix hang
b/10855561

Change-Id: I29b046b835ce0ca3644e5c2e8f9bca5c0b380d4b
2013-09-25 13:45:41 -07:00
Jean-Michel Trivi
badca26cb2 Add audio level monitoring capabilities in Visualizer effect
Extend the visualizer audio effect with the capability to query
 peak and RMS values for the currently playing audio.
Values are expressed in mB and are retrieved as an array of
 int values in the native layer, and written directly as
 object fields for the JNI.

Bug 8413913

Change-Id: I808075a18e61f85c566544a2bdaae10e5c4a644b
2013-09-23 14:03:39 -07:00
Zhijun He
4eda9f5359 ImageReader: disable NV21 support
Bug: 10787131
Change-Id: I5ff0a67144b5ec49eabde6129423a41c9597c2b8
2013-09-18 10:30:50 -07:00
Zhijun He
9e6d073a99 ImageReader: fix the 0 crop rect size issue
Rect isValid actually include the zero size case, which we don't want to include
in our case. This causes camera ImageReader test case fails at buffer size
sanity check.

Bug: 9802344
Change-Id: I561f5a049c6117c613df1e1b2789c43af9a19628
2013-09-16 16:03:36 -07:00
Igor Murashkin
5cf86aa756 Merge "media: Update ImageReader to remove MaxImagesAcquiredException" into klp-dev 2013-09-16 21:02:32 +00:00
Igor Murashkin
26cb5fd5ff Merge "media: Update ImageReader APIs" into klp-dev 2013-09-16 20:19:15 +00:00
Zhijun He
cfa553369f ImageReader: get correct crop size
Bug: 10752797
Change-Id: I2e56d69cde7f5ca669a366646b876861b277a239
2013-09-16 09:49:28 -07:00
Igor Murashkin
e3351f1942 media: Update ImageReader to remove MaxImagesAcquiredException
* acquiring images now throws IllegalStateException instead of
    MaxImagesAcquiredException

Bug: 10691447
Change-Id: I7ce68f990fb96703705b9181012a28633fea0b7a
2013-09-13 23:27:44 -07:00
Igor Murashkin
5e712064df media: Update ImageReader APIs
Bug: 10461757
Change-Id: Ic04e4c41965e3d417b29004f3f08e0cd56b8f4cb
2013-09-12 16:57:57 -07:00
Ruben Brunk
91019c9ef3 Merge "Remove dependency on JNIHelp header side effects." into klp-dev 2013-09-12 00:01:28 +00:00
Zhijun He
37682135da ImageReader: Skip size check for BLOB format
HAL_PIXEL_FORMAT_BLOB is for JPEG capture, the buffer width/height by definition
shouldn't be the same as the image width/height.

Bug: 10360518
Change-Id: I32146a0e8e15439bb8fe199403db4ff37d1ab1af
2013-09-11 13:18:00 -07:00
Ruben Brunk
87eac99a21 Remove dependency on JNIHelp header side effects.
Bug: 10680559
Change-Id: I47870d6c48906e0a420c52b7bc5945ffe29c68a2
2013-09-10 20:47:43 -07:00
Zhijun He
cfd47481d1 MediaMuxer: Add setLocation API
This API could be used for camera recording when MediaMuxer is used to write
output media file.

Bug: 10594784
Change-Id: Ide2d6e1d87b246100a5def49bfb8646dc984a512
2013-09-10 07:52:25 -07:00
Igor Murashkin
d901c03375 media: ImageReader throws OutOfResourcesException when out of buffers
Bug: 10507939
Change-Id: I34c66485695ad6141388be85903cbecb9ebaa5ab
2013-08-27 16:42:24 -07:00
Zhijun He
af753a2dfc ImageReader: Fix API doc table misalignment issue
Also cleanup unused macro in ImageReader.

Bug: 10360518
Change-Id: I2332703c92df771a6339ff92069e92d50a6c5cd5
2013-08-23 09:25:27 -07:00
Jeff Tinker
76cf8fe75e Merge "Add ability to test supported content types to MediaDrm" into klp-dev 2013-08-22 23:08:07 +00:00
Jeff Tinker
7cda491321 Add ability to test supported content types to MediaDrm
bug: 10244066
Change-Id: Ic96c2e23f36809faf1c88ede500f4bc2bad4142a
2013-08-21 17:30:06 -07:00
Jeff Tinker
df717aaa25 Merge "Fix JNI method called with exception pending" into klp-dev 2013-08-16 23:04:54 +00:00
Jeff Tinker
8117d8f702 Fix JNI method called with exception pending
bug: 10313912
Change-Id: I8390905334f2e37f210adced52c31e7a431d4f55
2013-08-16 13:46:02 -07:00
Igor Murashkin
dd0643202d media: Fix ImageReader only using maxImages=1 no matter what
- No longer return null when some bad error happens
- Throws OutOfResourcesException when images need to be closed
- Throws IllegalStateException when an unknown internal error happens

Bug: 10333400
Change-Id: Ia53a5dd33f9ce53abd036e080e6fcc4ded9b251d
2013-08-16 12:20:09 -07:00
Andreas Huber
ca2fb9158e Merge "Expose MediaCodec.setParameters API to" into klp-dev 2013-08-14 15:39:17 +00:00
Lajos Molnar
80c4437ebf MediaCodecInfo.java: Added isFeatureSupported method to CodecCapabilities
Added isFeatureSupported method to CodecCapabilities, so that applications
can query whether codecs support various features.  For now
added one video-decoder feature:

FEATURE_AdaptivePlayback

Media playback applications can query it to see if the codec
supports seamless resolution changes during decoding.

Change-Id: I56b2cf1429f39f9b9e0243a990c95e7a64dd7ff7
Signed-off-by: Lajos Molnar <lajos@google.com>
Related-to-bug: 7093648
2013-08-13 10:30:22 -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 Brown
f724c277d3 Add more virtual display tests.
We can't test everything in CTS because some features require
system permissions.  So this is another copy of the CTS test
with more stuff that we can build with the system cert.

Change-Id: Ied5a456a0810d38d307b6dfbad0f770cb480b4ee
2013-08-07 17:58:47 -07:00
Jeff Tinker
8f6c998cfb Merge "Define error codes for MediaCodec.CryptoException" 2013-08-07 01:44:09 +00:00
Mathias Agopian
52a9a10b6b Clearly separate consumer and producer interfaces
Bug: 9265647
Change-Id: Ic68e91788d0a05251e1d2fb9f9d4de403c7099bf
2013-08-06 13:07:42 -07:00
Jeff Brown
445b5f460f Merge "Minor style cleanups." 2013-08-06 19:31:23 +00:00
Zhijun He
708e359503 ImageReader: Add RGB format support.
Bug: 10155122
Change-Id: Id53d6ec815488e73bde6ca62b42c92d16bc813c9
2013-08-06 09:44:29 -07:00
Jeff Brown
ef96121559 Minor style cleanups.
A few changes to demonstrate a slightly cleaner way to write
JNI code in the framework especially when multiple types are
involved.  We use this pattern in many other places outside
of the media stack.

Added more detail to the UnsupportedOperationException that
occurs when buffer formats don't match.

Change-Id: Ic894dc1bd71b387f1be6ea1798fa59e533e9574f
2013-08-05 20:39:29 -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
Zhijun He
7f4d3147d1 camera2: Implement CameraDevice#waitUntilIdle
Also cleanup some logging/comments.

Change-Id: Id1a4dd853519802a2b74b8d2172095ba388329e6
2013-07-23 13:46:37 -07:00
Mathias Agopian
e32632682c update to new Consumer APIs
Change-Id: I8649f3add40e0aeeeb0396b98e2cb93312e8e990
2013-07-16 23:14:24 -07:00
Mathias Agopian
b550929b7a always pass the BufferQueue explicitely to consumers
Change-Id: I32e380979a3f4c6b1dfb440cc5b5c3d30d7607db
2013-07-12 22:06:31 -07:00