514 Commits

Author SHA1 Message Date
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
Zhijun He
534046d2b1 ImageReader: get correct jpeg size.
the jpeg size was set to the buffer width, which is the max jpeg buffer size.
the right size can be obtained by parsing the camera3_jpeg_blob data sent by
hal.

Also correct the buffer size check when crop is not set.

Bug: 9254294
Change-Id: Ic73de47ef97efa4eb356a399c1576715e2eacbfd
2013-07-01 11:03:41 -07:00
Zhijun He
212e78df9e ImageReader: Implementation of ImageReader and Image APIs
Used for direct image data access from producer like camera or video decoder.

Bug: 9254294
Change-Id: I1853af03f4487ac3585d86202f6140854471fa89
2013-06-26 15:56:27 -07:00
Marco Nelissen
3e72eb5245 Remove unused MediaPlayer methods
Change-Id: Id63fdde7d0e4f096d3bb9eb4da5e0f37eb9dea21
2013-06-13 15:25:25 -07:00
Andreas Huber
4a02d4c609 am c41a0eff: am be22605d: Merge "Listen for HTTP proxy changes and propagate the information to the media" into jb-mr2-dev
* commit 'c41a0eff938f825ef235b92efa7a31c3b7f8bfb4':
  Listen for HTTP proxy changes and propagate the information to the media
2013-06-03 08:48:30 -07:00
Andreas Huber
d5f9fa574d Listen for HTTP proxy changes and propagate the information to the media
framework.

related-to-bug: 8873723

Change-Id: I2a34343f8006fa1b1448a1f047458fd58fe14fda
(cherry picked from commit bfe9154142428aa8abecaf943dfeffc55f411ea7)
2013-05-31 21:33:13 +00:00
Jeff Tinker
a70924bedd am eaa9ce70: am 606ab470: Merge "Improve exception error messages to help diagnose app errors" into jb-mr2-dev
* commit 'eaa9ce7064ad4978d5acaafd4e797b5186ff03de':
  Improve exception error messages to help diagnose app errors
2013-05-22 12:16:03 -07:00
Jeff Tinker
63c7f94c48 am 09d6ad37: am 2161b7cb: Merge "Fix invalid keyType translation in MediaDrm.getKeyRequest" into jb-mr2-dev
* commit '09d6ad37f790f1e135c4dbe71109b33ae29a94cc':
  Fix invalid keyType translation in MediaDrm.getKeyRequest
2013-05-22 12:16:00 -07:00
Jeff Tinker
606ab4706d Merge "Improve exception error messages to help diagnose app errors" into jb-mr2-dev 2013-05-22 19:12:39 +00:00
Jeff Tinker
17b8922785 Fix invalid keyType translation in MediaDrm.getKeyRequest
bug: 9070897
Change-Id: Ib9b4174e08b1c828d0204e0ab65bc3d7c2efcedf
2013-05-21 13:00:58 -07:00
Jeff Tinker
eada5376d9 Improve exception error messages to help diagnose app errors
bug: 9072051

Change-Id: I45057951d1a62b1b4a996e85f01601239e1b7161
2013-05-21 12:55:59 -07:00
Jeff Tinker
e0eb0e9063 am 9ba564c7: am 48f2b548: Merge "MediaDrm API: Add two exceptions to handle error path scenarios" into jb-mr2-dev
* commit '9ba564c7e205c4b278be61eec773a90a94451251':
  MediaDrm API: Add two exceptions to handle error path scenarios
2013-05-01 15:04:36 -07:00
Jeff Tinker
48f2b548ed Merge "MediaDrm API: Add two exceptions to handle error path scenarios" into jb-mr2-dev 2013-05-01 22:01:16 +00:00
Mike J. Chen
1d507f7b9b am 94264d52: am 2f4cc8ea: Merge "Fix a crash case" into jb-mr2-dev
* commit '94264d522efcc21ac749a6444fbea90916f575c9':
  Fix a crash case
2013-05-01 14:04:59 -07:00
Jeff Tinker
1d7c218ba2 MediaDrm API: Add two exceptions to handle error path scenarios
bug: 8725707
Change-Id: Ia00c495ac591cc2993f4d11ad3480b59833d009e
2013-04-30 12:39:04 -07:00
Mike J. Chen
67a1218477 Fix a crash case
There's a runtime check for a bad argument, but it is
after the usage of the bad argument.  Move the usage
after the check.

Bug 8687716

Change-Id: Iddfa457951bac69b436a430cda21b5d7a563107b
Signed-off-by: Mike J. Chen <mjchen@google.com>
2013-04-26 12:39:04 -07:00
Jeff Tinker
665bcd96b7 am a393c2a2: am c884a08e: Merge "Improve error handling for DRM errors reported by plugins" into jb-mr2-dev
* commit 'a393c2a2f7a6a3153b82b1e43bfffa1a040d56b5':
  Improve error handling for DRM errors reported by plugins
2013-04-18 16:26:55 -07:00
Jeff Tinker
d32885bb7f am 4efe71ae: am 45d59a99: Merge "Make MediaDrm APIs public" into jb-mr2-dev
* commit '4efe71ae55db09a4e3d727175df97d5bcda0449c':
  Make MediaDrm APIs public
2013-04-18 09:15:45 -07:00
Jeff Tinker
f7568b5ee9 Improve error handling for DRM errors reported by plugins
Change-Id: I25df78f16379b32c54189949daa3ab9c91187375
related-to-bug: 8621516
2013-04-17 16:46:49 -07:00
Jeff Tinker
e1c76bebef Make MediaDrm APIs public
bug: 8603279

Change-Id: I9fab2673867ad413a084933cee7239d13e8b7893
2013-04-17 15:24:48 -07:00
Ying Wang
28af35e8cd resolved conflicts for merge of a976bddd to master
Change-Id: I64e1cbfb0eee891ce4d1eee40eefdcedcc501f7f
2013-04-09 23:21:42 -07:00
Ying Wang
d685894212 Add liblog
Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
2013-04-09 21:54:12 -07:00
Marco Nelissen
574215e1f3 am d563cede: am c4ad3cb0: Merge "Add support for common encryption" into jb-mr2-dev
* commit 'd563cede5cf4ca2647dcf00775dd0ed1dd08e792':
  Add support for common encryption
2013-04-08 17:06:03 -07:00
Marco Nelissen
c4ad3cb07e Merge "Add support for common encryption" into jb-mr2-dev 2013-04-08 23:39:29 +00:00
Marco Nelissen
e20a6d5c47 Add support for common encryption
Change-Id: I2d56a6a90dff3ce1c37296934fca01b8a2ca0f89
2013-04-08 14:32:34 -07:00
Jeff Tinker
9e2e8e0b6d am 72e2307c: am 1e0f36cf: Merge "Implement async event callout from drm plugin to Java app" into jb-mr2-dev
* commit '72e2307c6a84de5770dd1aa2943d3d609d29baf3':
  Implement async event callout from drm plugin to Java app
2013-04-04 18:26:28 -07:00
Jeff Tinker
1e0f36cffd Merge "Implement async event callout from drm plugin to Java app" into jb-mr2-dev 2013-04-05 01:16:23 +00:00
Dan Morrill
e4d9a01bfc Phase 1 of refactoring SystemServer.
SystemServer is currently a monolithic class that brings up key system
services. This change is the first phase of refactoring it to be more
configurable. Specifically, it adds a set of on/off switches used to control
startup of individual services. Future plans include finer grained controls
and a more explicit and consistent startup sequence for these services.

Change-Id: I7299f5ce7d7b74a34eb56dffb788366fbc058532
2013-04-04 09:49:22 -07:00
Jeff Tinker
54cfbd6dc2 Implement async event callout from drm plugin to Java app
Change-Id: I451b7c6f766aafac39ce432a71ef5a03bffe29f1
2013-04-03 12:01:59 -07:00
Jeff Tinker
5c0ce512c5 Merge "MediaDrm API update" into jb-mr2-dev 2013-04-02 22:49:19 +00:00