542 Commits

Author SHA1 Message Date
Eino-Ville Talvala
5d2d7788f1 Camera2: Switch to auto-gen C++ binder interfaces
- Move camera AIDL files to frameworks/av
 - Update makefiles to point to new AIDL locations
 - Adjust camera2 implementation to match modifications to AIDL needed
   for native AIDL auto-generation
 - Move Surface.aidl to frameworks/native to allow use in
   native AIDL. Use android::view::Surface in Surface JNI to
   serialize Surface objects to ensure parceling compatibility.
 - Adjust service binder tests to new interface

Bug: 25091611
Change-Id: I85b817374b34a4540fa145328dbe4bbf7f746baf
2016-03-01 17:15:17 -08:00
Jaesung Chung
596e1d3b7a Merge "Revert "Revert "ExifInterface: switch from using jhead to java implementation""" into nyc-dev 2016-02-25 14:14:28 +00:00
Jaesung Chung
15ef59e081 Revert "Revert "ExifInterface: switch from using jhead to java implementation""
This reverts commit 3c233ee291cfe1b765184920b6b7a69cb1bb82d9.

Bug: 27349581
Change-Id: Ib9f687e79ec36692fa7505ba3852099eb3e44573
2016-02-25 14:13:10 +00:00
Sungsoo Lim
b21622d477 Merge "Revert "ExifInterface: switch from using jhead to java implementation"" into nyc-dev 2016-02-25 11:50:43 +00:00
Sungsoo Lim
3c233ee291 Revert "ExifInterface: switch from using jhead to java implementation"
This reverts commit bf24c9fcb3e66b25c90c0cd51f8bf4f401f6c3d6.

Change-Id: Id278e831a9c03f615208fd6eab51c65f7bb019eb
2016-02-25 11:48:10 +00:00
Jaesung Chung
9ad5278e2b Merge "ExifInterface: switch from using jhead to java implementation" into nyc-dev 2016-02-25 05:35:54 +00:00
Jaesung Chung
bf24c9fcb3 ExifInterface: switch from using jhead to java implementation
Bug: 26044456, Bug: 11224701
Change-Id: I881ef0ead24bcec76c0fa5a7dd0b74cc71c77285
2016-02-25 10:57:27 +09:00
Neil Fuller
a835180b74 Add flags needed to switch Jack to 1.8 for CTS targets
When linking against .jack files that contain 1.8 language
features Jack (currently) requires -D jack.java.source.version=1.8.

"core-tests" includes 1.8 language features.

Bug: 27113322
Bug: 26953739
Change-Id: Ib9ceaadafc9c1d41ff137c48111ad3b060f7e248
2016-02-15 12:07:21 +00:00
Hyungtae Tim Kim
84789bef99 Rename instr argument 'repeat' to 'iterations'
The argument means the number of test iterations for camera
stress testing. Renamed for easier understanding of the argument.

Change-Id: I3247e35f8640c98db5c8438c3fc79a45073d9623
2016-02-01 16:00:49 -08:00
Hyungtae Tim Kim
6d8fd0a23f Camera2 framework stress test suite
Added a new Camera2 framework stress test to put stress in
the common use cases in exercising Camera2 APIs.

Note that this stress test differs from Camera CTS in that
it focus on ensuring stability rather than functionality.
It could also provide the flexibility to get integrated with
test tools if needed.

For the initial run, most test codes are taken from CTS package
except for test fixtures to handle arguments and results for
stress test. However test implementation could be differentiated
to meet needs in stress testing over time.

Change-Id: Ie36594de3904e41f6175b8d5072b91941975d091
2016-01-27 16:59:41 -08:00
Jeff Sharkey
60cfad80bd Discourage use of "_data" column.
Moving forward, all client file access really needs to be going
through explicit APIs like openFileDescriptor(), since that allows
the provider to better protect its underlying files.

This change also changes several classes to use the AutoClosable
pattern, which enables try-with-resources usage.  Older release()
methods are deprecated in favor of close().

Uniformly apply CloseGuard across several classes, using
AtomicBoolean to avoid double-freeing, and fix several resource
leaks and bugs related to MediaScanner allocation.  Switch
MediaScanner and friends to use public API instead of raw AIDL calls.

Bug: 22958127
Change-Id: Id722379f72c9e4b80d8b72550d7ce90e5e2bc786
2016-01-06 10:19:35 -07:00
Lazar Trsic
8ea56f6851 Replace hard-coded errno values with OsConstants
Errno values have been hard-coded inside java code. On the native side
however, bionic's errno.h is used (through utils/Errors.h). Some of
the numbers are architecture dependent (EOPNOTSUPP, ETIMEDOUT...).

This causes Camera app to crash on MIPS devices. There is a check for
expected errors, in CameraBinderDecorator.throwOnError, but the error
(EOPNOTSUPP) is not recognized and an exception is thrown.

Change-Id: I8bcac8f1ced50c76614f566a6e624967a18a25e1
2015-12-04 12:41:37 +01:00
Eino-Ville Talvala
3a94b2d22e am 028c2e4e: am 33689420: am eec25a4f: am 1017f986: Merge "Camera2: Add camera type to getNumberOfCameras." into mnc-dev
* commit '028c2e4e264d1d2235e4d0f95d178fdf77510e7e':
  Camera2: Add camera type to getNumberOfCameras.
2015-08-16 02:55:33 +00:00
Eino-Ville Talvala
5717612ba9 Camera2: Add camera type to getNumberOfCameras.
Do not list strange cameras in old API; ensure new API gets all
cameras.

Bug: 23194168
Change-Id: Ia1fdffac245525674c913fefb1ec06e9094fe8d3
2015-08-14 14:52:57 -07:00
Narayan Kamath
fc5e0ba625 am b9f170ff: am b4db7923: Merge "Delete some obsolete test code."
* commit 'b9f170ff99a3ad25623bf20c77eb4f6173577c98':
  Delete some obsolete test code.
2015-07-14 20:27:48 +00:00
Narayan Kamath
b9f170ff99 am b4db7923: Merge "Delete some obsolete test code."
* commit 'b4db7923818393c5c839dba0d43bec36da98759c':
  Delete some obsolete test code.
2015-07-14 11:05:07 +00:00
Narayan Kamath
85bdaae347 Delete some obsolete test code.
- Get rid of obsolete annotations in MediaInserterTest.

- Drop support for @BrokenTest and @SideEffect. Nobody uses
  SideEffect and none of the tests that use this test runner
  (vm-tests-tf, essentially) use @BrokenTest.

Change-Id: Id73c4d4eda8031689f9263c85b563c29e635d446
2015-07-09 18:23:53 +01:00
Hyungtae Tim Kim
333578bcd4 Add bucket that unknown state playback falls into
MediaPlayerStressTest some media files are missing on the results as they
were reported neither completed nor erroneous.
This case will fall into a new category named unknown playback state so that
we could track them in media dashboard.

Bug: 21755950
Change-Id: Iefcc3e375c63d952a7d9edb418208209d87b9e08
2015-06-11 08:33:04 -07:00
Zhijun He
b1300e39c7 Camera2: add high speed video APIs
Interface only.

Bug: 21442271
Change-Id: If81caa0f2dc9f7802af564abcd9541aff3e30901
2015-06-03 17:50:22 -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
Marco Nelissen
e796ff912e Handle unknown duration in playMediaSamples test
Bug: 21391417
Change-Id: I85d8f5921e8423da078acfe3aff34a6fcef69e78
2015-05-27 12:33:03 -07:00
Yohann Roussel
7bcaf9a997 [DO NOT MERGE] Allow compilation with Jack.
Adapt to Jack compilation specifics.

Fix bad import in VideoDumpActivity.
The extra semicolumn is ignored by javac because of
https://bugs.openjdk.java.net/browse/JDK-8027682 but is not
permitted by ecj or Jack.

This includes cherry-picks of the following changes:
248ef6f9c414db26fd1bc7ec3d4ee4f3b87d54cf
705555dc468e46560d02db102dfcedc1e5c70d9e
f50a51fb4c8d5ca973ce910a21bddf9f8466cb51
bf5ad8d9943c0e1b0b3f1b4524c277f369065d08

Change-Id: Ifbe063e3822a7d63b1681921b9788cfca898ba64
2015-05-19 18:17:39 +02:00
Chong Zhang
9560ddb48a MediaCodec: rename usePersistentInputSurface to setInputSurface
bug: 21045402
Change-Id: I510a3a694367b8e5a21f4a4fa2a338031fed8991
2015-05-13 10:53:47 -07:00
Harish Mahendrakar
34265cd94f media: Added MPEG2 profile/levels and tests
Bug: 20852831
Change-Id: I172f2f08c30d12bf684f32a52db64823cc286d35
2015-05-05 11:05:22 -07:00
Chong Zhang
ac95f1ac77 MediaRecorderTest: test recording from persistent surface
Bug: 19127604
Bug: 19489395

Change-Id: I17984e0febaf0541a0ce650a07e0c485ffc41c08
2015-05-01 18:37:07 -07:00
Chien-Yu Chen
7a316f6b1b camera2: validate reprocess request's session
Add a session ID to CaptureResult to indicate the session where
the result comes from. When creating a reprocess capture request
with a capture result, the session ID will be carried over to
the reprocess capture request. Reprocess capture request's session
ID will be used to validate that it matches the session ID when
submitting the reprocess capture request to a session.

Bug: 20263212
Change-Id: I024c1a28ecf0a43909a0ed3814a11360c318417f
2015-04-23 15:21:07 -07:00
Eino-Ville Talvala
e9e5a162c0 Merge "Camera2: Add prepare method for output buffer pre-allocation" 2015-04-15 17:56:39 +00:00
Chong Zhang
b6e809bfab Merge "MediaRecorderTest: verify capture fps meta key is set" 2015-04-14 23:54:18 +00:00
Eino-Ville Talvala
ad916f7fd3 Camera2: Add prepare method for output buffer pre-allocation
Normally, buffers for camera output Surfaces are allocated as
needed. This minimizes memory overhead and time to first frame.

However, if allocation takes a long time, as it can do for full-resolution
output buffers, full frame rate may not be maintainable with the added
allocation overhead.

The prepare() method allows an application to indicate that buffers for
a given output Surface should be preallocated by the camera device.
Once the allocation is complete, the onSurfacePrepared callback is invoked.
The application may then use the prepared Surface without concerns about
allocation-caused delays.

Change-Id: I4f616dc87dd4346f408cf1ea37d48a642ceb57da
2015-04-14 16:36:50 -07:00
Chien-Yu Chen
5398a67680 camera2: add reprocess support
Add reprocess API and implementation to support creating reprocess
capture sessions, reprocess requests, and receiving reprocess capture
results.

Change-Id: I4c1c02f41d1712f65e729ea3ba09592a27ffe86d
2015-04-13 17:04:04 -07:00
Chong Zhang
699780f54b MediaRecorderTest: verify capture fps meta key is set
bug: 19460202
Change-Id: I6a98089e560d2bc655e66d5bbe5d93ffb59bbeea
2015-04-07 17:32:36 -07:00
Ruben Brunk
2c2546a296 camera2: Remove ProCamera.
Bug: 19186859
Change-Id: I4aaadb53db65b479f92cbb3c05329d1e40317900
2015-03-20 22:38:54 -07:00
Yin-Chia Yeh
bfbbee7566 Camera: update createStream API to add new rotation field
Change-Id: I0f4343a0bfa7bf09ba887c78a1da1c08daa35333
2015-03-16 13:48:15 -07:00
Eino-Ville Talvala
864005b026 Camera2: Remove unused parameters in ICameraDeviceUser#createStream
- width, height, format are unused

Change-Id: I26540aab1118108b0325df69cfa2dd23da41849b
2015-03-09 11:15:30 -07:00
Chien-Yu Chen
afa91399fd CameraManager: implement flashlight controls
Implement the flashlight controls and callbacks and update the
torch mode states.

Bug: 2682206
Change-Id: I59025f34f9ece75dd535166a25c428b8d68c6e4b
2015-03-03 13:55:07 -08:00
Yohann Roussel
705555dc46 Fix bad import in VideoDumpActivity
The extra semicolumn is ignored by javac because of
https://bugs.openjdk.java.net/browse/JDK-8027682 but is not
permitted by ecj or Jack.

Change-Id: I6a30107e7b4fd5d7ef3dff3380d6829d2a15af3f
2015-01-13 10:24:48 +01:00
Andreas Gampe
307218c7f2 resolved conflicts for merge of 09910723 to lmp-mr1-dev-plus-aosp
Change-Id: I4b47723a9314bf9bef08e68ce269038d0d50c5d9
2014-11-21 09:57:52 -08:00
Andreas Gampe
a4a13480dd Frameworks/base: Wall Werror in media/tests
Turn on -Wall -Werror in media/tests. Fix warnings.

Change-Id: I7177e795d4896f62dfa0b0a5990386e564763384
2014-11-10 18:44:43 -08:00
Leon Scroggins III
b3d2a85b64 am 694fd58d: am fed9888e: Merge "Remove outdated tests for custom decoder." into lmp-mr1-dev
* commit '694fd58dd93b6360ec2204dab731d3c68847478b':
  Remove outdated tests for custom decoder.
2014-10-22 22:39:30 +00:00
Leon Scroggins III
8e8a0d6eaf Remove outdated tests for custom decoder.
These tests don't appear to be meaningful. We are comparing an
unused decoder against one that is used.

Keeping this test building (the primary changes to this directory
in a while) is not believed to be worth the effort.

BUG:17419670
Change-Id: Ia0862f2a1de1fb9d744382bb949f6c1638a1a12a
2014-10-22 18:17:14 +00:00
Neil Fuller
c2a0b4482d resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aosp
Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7
2014-10-02 14:32:37 +01:00
Neil Fuller
f7cf5d43aa resolved conflicts for merge of ee665151 to lmp-dev-plus-aosp
Change-Id: I97671e62de26919e391dbb2686511584c59ab990
2014-10-02 11:48:08 +01:00
Neil Fuller
33253a4baa Switch from FloatMath -> Math and Math.hypot where possible
The motivation is an API change: FloatMath is going to be
deprecated and/or removed. Performance is not the goal of
this change.

That said...

Math is faster than FloatMath with AOT compilation.

While making the change, occurances of:

{Float}Math.sqrt(x * x + y * y) and
{Float}Math.sqrt({Float}Math.pow(x, 2) + {Float}Math.pow(y, 2))

have been replaced with:

{(float)} Math.hypot(x, y)

Right now there is no runtime intrinsic for hypot so is not faster
in all cases for AOT compilation:

Math.sqrt(x * x + y * y) is faster than Math.hypot(x, y) with
AOT, but all other combinations of FloatMath, use of pow() etc.
are slower than hypot().

hypot() has the advantage of being self documenting and
could be optimized in future. None of the behavior differences
around NaN and rounding appear to be important for the cases
looked at: they all assume results and arguments are in range
and usually the results are cast to float.

Different implementations measured on hammerhead / L:

AOT compiled:

[FloatMath.hypot(x, y)]
benchmark=Hypot_FloatMathHypot} 633.85 ns; σ=0.32 ns @ 3 trials

[FloatMath.sqrt(x*x + y*y)]
benchmark=Hypot_FloatMathSqrtMult} 684.17 ns; σ=4.83 ns @ 3 trials

[FloatMath.sqrt(FloatMath.pow(x, 2) + FloatMath.pow(y, 2))]
benchmark=Hypot_FloatMathSqrtPow} 1270.65 ns; σ=12.20 ns @ 6 trials

[(float) Math.hypot(x, y)]
benchmark=Hypot_MathHypot} 96.80 ns; σ=0.05 ns @ 3 trials

[(float) Math.sqrt(x*x + y*y)]
benchmark=Hypot_MathSqrtMult} 23.97 ns; σ=0.01 ns @ 3 trials

[(float) Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))]
benchmark=Hypot_MathSqrtPow} 156.19 ns; σ=0.12 ns @ 3 trials

Interpreter:

benchmark=Hypot_FloatMathHypot} 1180.54 ns; σ=5.13 ns @ 3 trials
benchmark=Hypot_FloatMathSqrtMult} 1121.05 ns; σ=3.80 ns @ 3 trials
benchmark=Hypot_FloatMathSqrtPow} 3327.14 ns; σ=7.33 ns @ 3 trials
benchmark=Hypot_MathHypot} 856.57 ns; σ=1.41 ns @ 3 trials
benchmark=Hypot_MathSqrtMult} 1028.92 ns; σ=9.11 ns @ 3 trials
benchmark=Hypot_MathSqrtPow} 2539.47 ns; σ=24.44 ns @ 3 trials

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I06c91f682095e627cb547d60d936ef87941be692
2014-10-01 14:04:15 +01:00
Shaohan Zou
d097e7ef74 Add Media Player Streaming Tests
Change-Id: I4bb78b0487d158f4ea57349b591f66eda6b325d2
2014-08-27 17:36:51 -07:00
Eino-Ville Talvala
acc0095bc8 Camera2: Correct error handling
- Report capture failures from service to application
- Only go to error state for device-level errors
- Adjust binder interface method names to match the service side names
- Reduce failed session creation logging
- Don't fire CaptureSession.onActive for CameraDevice.onBusy
- Check with session to determine capture failure reason

Bug: 17160301
Bug: 15524101
Bug: 14448494
Bug: 11272459

Change-Id: I9dd606004fd7845910dc865738fbe17f1640f07d
2014-08-27 11:08:18 -07:00
Yin-Chia Yeh
12da140082 Camera2: add highSpeedVideoConfig wrapper and APIs
- Add wrapper class for highSpeedVideoConfiguration.
- Add APIs to query high speed video recording configurations in
  StreamConfigurationMap
- Fix ColorSpaceTransform unit test in CameraMetadataTest
- Fix a bug in HashCodeHelper

Change-Id: I192e57f6ab5dfbba6d958571352f067a9eaec7b2
2014-07-18 16:00:53 -07:00
Naveen Kumar Ponnusamy
ee64575cf7 Added a test for HEVC playback memory usage
Bug: 14571712
Change-Id: If5c4053dea23142b73aed77498c93e149b7ef9b2
2014-07-12 22:13:32 +00:00
Lajos Molnar
b1a236b85f add utility methods to util.Range, Rational and Size
Bug: 12065651
Bug: 11990470
Change-Id: I0d0929ea0289ac5de5c17cca90f25abc4e9dfd7a
2014-07-12 14:12:27 -07:00
Mike Reed
42a1d08df7 SkBitmap::Config is deprecated, use SkColorType
Change-Id: Ida181d2aac760072cf2d01409edac37699dea216
2014-07-07 18:11:24 -04:00