555 Commits

Author SHA1 Message Date
Sungsoo
c9ed3b8a5b ExifInterfaceTest: Catch IOException
ExifInterface throws IOException instead of UnsupportedOperationException.

Bug: 32221877
Change-Id: I68a4a62f565a386434b774759271bf6f2af2b7db
2016-10-19 01:26:37 +09:00
Hang Yin
39aafafa9a Code Patch for camera preview switch tests
This cl will fix the bug: b/28982885. It enables Raw10 Size Array
only when the device support Raw10.

Change-Id: I6a7a9d47708017f71c47fb5bbb15f3e98b555af4
2016-05-27 14:56:14 -07:00
Hang Yin
3ed27cc2b2 Created 4 camera preview stress test cases.
The 4 stress test cases cover situations of preview switch between
front/back camera and between photo/video mode. Followed Google
Camera App Kenai version streaming rules to set preview request in
the tests.

b/28916141 will be solved once this change is merged

Change-Id: I448be429df5b0813fa2e2f6ff05ad2936afee1b3
2016-05-23 17:29:28 -07:00
Narayan Kamath
a09b4d2a61 Remove unnecessary allocation+unboxing of objects.
Transforming String->int can be done with 0 allocations
using Integer.parseInt.

bug: 28078871
Change-Id: I8d9f322d7154728849dde61ef282046032858d60
2016-04-18 09:55:59 +01:00
Jaesung Chung
865cef475d Merge "ExifInterface: keep the original metadata data instead of strings" into nyc-dev 2016-04-16 02:41:23 +00:00
Jaesung Chung
0e7d22535d ExifInterface: keep the original metadata data instead of strings
This CL makes ExifInterface store the tag values as the original forms
and the format validiation is added that compares the given value and
the data format specificed in EXIF specification in order to keep the
valid tag values only.

Bug: 27583378, Bug: 27614052, Bug: 28075709
Change-Id: If60bbddefe74c4b87b4ce64b5fc79e467e36a5b9
2016-04-15 23:27:21 +00:00
Chien-Yu Chen
2da496f1ce Camera2: Stop repeating request for abandoned output
Stop repeating request if any of its output stream is abandoned
and notify that repeating request has been stopped.

Update binder tests for binder interface changes.

Update CameraDeviceImpl to expect an exception when canceling
a repeating request that is already stopped.

Bug: 21270879
Change-Id: I9fa72ae7218948aac88cb1a8e57839bd022c4a5e
2016-04-15 16:04:18 -07:00
Insun Kang
8884af3ee9 ExifInterface: Code clean up
Replaces deprecated constants with newly added constants in the actual
implementation.

Bug: 27932489
Change-Id: Id54236a05127cd7ce3bf0668c002635fb86489a9
2016-04-01 11:53:14 +09:00
Insun Kang
9e175f468e ExifInterface: Clean up test code and increase test coverage
Bug: 27888859
Change-Id: I8a2d4f3cdafd932aa0c4272c80e4967097c62491
2016-03-30 11:47:18 +09:00
Jaesung Chung
42ac0d0015 ExifInterface: fix regression of re-writing JPEG
Bug: 27583378
Change-Id: I052dfedbb1393705eba378de5eaf3636ed0e65ea
2016-03-22 19:12:42 -07:00
Jaesung Chung
ad76dc2e62 ExifInterface: fix a bug in readExifEntryValue
The readExifEntry method has raised an unnessary EOFException on reading
an non-ASCII byte array.

Bug: 27484747
Change-Id: I19371e0eed25770929f50b3ca25f249c50113925
2016-03-09 23:21:32 +09:00
Jaesung Chung
6e08d2b082 ExifInterface: add RAW input stream support
And also the following things are included:

- Remove mInputStream.
- Update javadoc accordingly.

Bug: 11224701
Change-Id: I30b4c29ac800ae396fca8f6b2c2c0f68028a44b3
2016-03-09 17:22:11 +09:00
Brian Carlstrom
03cec27e7a Remove unneeded dependecy on core-tests to fix build
Bug: 27555885

(cherry picked from commit 2687673025f9b5a86f917135d2a8288d4f31818b)

Change-Id: I1c40ed0a565216652acdbef61dd8f44ce8df70f8
2016-03-08 17:34:07 -08:00
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