969 Commits

Author SHA1 Message Date
Yujie Qin
42d8b7d7ab Merge "Use new API from PIEX" into nyc-dev 2016-02-29 08:21:52 +00: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
Yujie Qin
01f6390ff4 Use new API from PIEX
Bug: 26894354
Change-Id: I7080c6ec4a45a746652ab226e63490a0baa1c359
2016-02-23 17:15:50 +01:00
Zhijun He
9cc3f881df ImageReader: override the flexible YUV compatible formats
For gralloc HAL v0.1 devices, if the producer buffer format is NV21 or YV12,
the returned flexFormat will be NV21 or YV12, which causes CTS failure
for ImageReader decoder test. This change overrides the NV21 or YV12 image
formats to HAL_PIXEL_FORMAT_YCbCr_420_888 for such case. With this, the
ImageReader will work for the devices with older gralloc HAL implementations
for HAL_PIXEL_FORMAT_YCbCr_420_888 compatible formats.

Bug: 27136665
Change-Id: Ib4722f1f8dc20ad6561088755e4ab9d2e68f1b47
2016-02-17 17:24:04 -08:00
Jeff Tinker
dc614f86a5 Add mediadrm service
Part of media security hardening

This is an intermediate step toward moving
mediadrm to a new service separate from mediaserver.
This first step allows mediadrmservice to run based
on the system property media.mediadrmservice.enable
so it can be selectively enabled on devices that
support using native_handles for secure buffers.

bug: 22990512
Change-Id: I9af073d8383f25657938d07be90c21c0dc6126b7
2016-02-12 20:23:45 -08:00
Wei Jia
f202143597 Merge "MediaDataSource: add getFlags()" 2016-01-28 19:22:28 +00:00
Anton Daubert
8f7a8f1eba Fix the initialize of PreviewImageData to its default values.
Bug: 26762780, 26837999
Change-Id: Ifc268beb84903576b8c82681fddf2f51ffc4a2ec
2016-01-28 13:52:46 +01:00
Daichi Hirono
376c5a8d34 Merge "Implement MtpDevice#getPartialObject64 in Java API." 2016-01-28 04:46:16 +00:00
Daichi Hirono
c8718b57b7 Merge "Add varietions of MtpDevice's mehtods using long." 2016-01-28 02:56:34 +00:00
Daichi Hirono
e0e6654a31 Add varietions of MtpDevice's mehtods using long.
BUG=26525304

Change-Id: I0a0b187910cf498720d8e7b8fbe9b0590e67e65e
2016-01-28 11:54:57 +09:00
Daichi Hirono
038832b900 Implement MtpDevice#getPartialObject64 in Java API.
BUG=26703522

Change-Id: I08510e3a179b7dc8bf247a9e997dc8a160138fc2
2016-01-28 11:19:55 +09:00
Jaesung Chung
9f774342aa Merge "Fix GpsTimeStamp format string" 2016-01-28 00:53:34 +00:00
Wei Jia
fbc164ba3c MediaDataSource: add getFlags()
Bug: 26533748
Change-Id: I980b833da47b54d94ecc5fedbd75ce69e59925fb
2016-01-27 14:26:03 -08:00
Jaesung Chung
04e18bb2fa Fix GpsTimeStamp format string
Bug: 26816278
Change-Id: If3694ec44f5a5d6109c1895eac305d0a1a7e1ca2
2016-01-28 01:31:18 +09:00
Jaesung Chung
d4c505c9b4 Fix build
Change-Id: I91e10406da341e226180b14dd2446cadbdab5684
2016-01-28 01:16:56 +09:00
Jaesung Chung
800133d4eb Merge "Enable reading a thumbnail from RAW image files in MtpDatabase" 2016-01-27 11:52:34 +00:00
Jaesung Chung
8409c0691f Enable reading a thumbnail from RAW image files in MtpDatabase
Also introduce new supported RAW image file formats, PEF and SRW.

RAW image file formats are not defined in PTP 1.2 specification except
for DNG. They are mostly built on top of TIFF or TIFF/EP. (Fuji's RAF
is the exception).

In this CL, image file formats are classified newly as below:

DNG: dng
TIFF: cr2, nrw, arw, rw2, orf, pef, srw
TIFF/EP: nef
Unknown Image Formats(FORMAT_DEFINED): wbmap, webp, raf

I referred to the following documents for defining MTP formats of RAW
images:

* http://www.rags-int-inc.com/PhotoTechStuff/RawStandards/RawSummary.html
* https://en.wikipedia.org/wiki/Raw_image_format

Bug: 26552863, Bug: 26626825
Change-Id: Ia218f6320c4c1ff051a23ca0060ceac46134b0d7
2016-01-27 18:40:36 +09:00
Yin-Chia Yeh
e76958297a Merge "ImageReader: fix missing pixel stride" 2016-01-25 02:26:11 +00:00
Daichi Hirono
148954a657 Add eventsSupported property to MtpDeviceInfo.
The property provides the set of event code that are supported by
MtpDevice.

BUG=26147375

Change-Id: I54be75e4bb52ddfe9aba8630538ddd32d1a641c8
2016-01-25 10:47:01 +09:00
Yin-Chia Yeh
b99a7f1359 ImageReader: fix missing pixel stride
Change-Id: Ie34cb51fee90e2d5624663fa23da4093fec435e2
2016-01-22 18:02:58 -08:00
Jaesung Chung
1c78b60a49 Merge "ExifInterface: add support for reading metadata from RAW images" 2016-01-19 00:37:13 +00:00
Jaesung Chung
fe968dfc12 ExifInterface: add support for reading metadata from RAW images
This CL depends on piex (github.com/google/piex),
which is owned by Google Photos's RAW team.

piex is capable of reading EXIF data that contains
metadata, and finding the positions in an image of
thumbnail and preview images from RAW images.

piex supports DNG, CR2, NEF, NRW, ARW, RW2, ORF
and RAF image file formats.

ExifInterface gets thumbnail and metadata information
from the above RAW image formats via piex.

Bug: 26177215
Change-Id: I529f8032bcb2a9d3d9e857ff1365a26a4f040066
2016-01-18 22:14:57 +09:00
Daichi Hirono
cc1251b9b2 Merge "Change offset and size arguments of MtpDevice#getPartialObject to Java long." 2016-01-14 02:28:45 +00:00
Daichi Hirono
2dd48256e9 Change offset and size arguments of MtpDevice#getPartialObject to Java
long.

To represents full range of 32-bit unsigned integer, we should use
jlong instead of jint.

BUG=26284424

Change-Id: Id3fa9e3daa778c204ab8e38f821d454c709c317a
2016-01-14 09:42:59 +09:00
Jeff Tinker
c8c0de38d1 Merge "Support AES-CBC sample encryption in MediaDrm" 2016-01-12 17:42:16 +00:00
Daichi Hirono
2a9a43369b Reland "Add event parameters to MtpEvent."
The CL was previously reviewed at ag/842930.

> We can obtain detailed information of MtpEvent from devices. e.g. object
> handle of changed object.  The CL adds the detailed information as
> properties of MtpEvent class.
>
> BUG=26480986

Change-Id: I93afad9caf118d74cd0923d70242133c4fb2a648
2016-01-12 12:14:30 +09:00
Jeff Tinker
d4ea5d3eb6 Support AES-CBC sample encryption in MediaDrm
bug:23719082
Change-Id: I06eb39bd8ad9b55ea0da4011258cac62a8c21ae1
2016-01-11 17:11:51 -08:00
Daichi Hirono
1d4779c29a Add operationsSupported to device info.
Because not all MTP devices support getPartialObject, we need to check
supported operation of MTP devices. The CL adds operationsSupported
field to MtpDeviceInfo class.

BUG=26147375

Change-Id: Iaad968fb4497a5ad11bf6489097abea99c3cbac7
2016-01-08 16:58:24 +09:00
Glenn Kasten
d713c9d65a Merge "Use FCC_2 and FCC_8 to highlight channel count assumptions" 2016-01-07 15:54:45 +00:00
Andreas Gampe
9c180dd387 Media: Fix MtpDevice call
The signature was changed last minute. Update the media side.

Bug: 26284424
Change-Id: Ia8fb665221f60d3eadd2c32831a12aa21c6c5e9c
2016-01-06 21:15:09 -08:00
Daichi Hirono
3ad1a8ee94 Add missing style change to android_mtp_MtpDevice.cpp.
BUG=26284424

Change-Id: I0e288712a8fccfb3dd21fa927388bacf5ce155d0
2016-01-07 13:06:11 +09:00
Daichi Hirono
52da3ad906 Add getPartialObject to Java MtpDevice class.
BUG=26284424

Change-Id: Id05dc6297a1682999eee4e72972fb883fa49a5d1
2016-01-07 12:41:17 +09:00
Glenn Kasten
bd2c3d65d6 Use FCC_2 and FCC_8 to highlight channel count assumptions
Bug: 21656069
Change-Id: I20a74575eddf6e28f1777d04eeab396f28bcc0cc
2016-01-05 11:44:12 -08:00
Yin-Chia Yeh
44581ff4db Camera: add RAW_PRIVATE format
Also add necessary plumbing for RAW_PRIVATE to work for ImageReader.

Bug: 25596619
Change-Id: Ic90f3f44264ac46fae1fafbc27ac64b5319f0970
2015-12-09 11:20:32 -08:00
Jeff Tinker
67b39bfa08 Merge "Remove unused MediaDrm.unprovisionDevice" 2015-12-09 17:07:35 +00:00
Jeff Tinker
dade24c12a Remove unused MediaDrm.unprovisionDevice
bug:25726218
Change-Id: Ibbd51aaa1ee4c21c9ec8b162fc6e378ab7ba6e7b
2015-12-09 09:02:31 -08:00
Zhijun He
dc6bb24a3c media: improve ImageReader/Writer native memory management
* Hook up the native allocation registration with ImageWriter, such that GC
can get some hint when clean up the large memory object.
* Close all pending images when closing ImageReader. This could avoid native
mem leaks for some bad app practice. For example, some apps may hold images
in background service when activity is paused/destroyed, which could cause
huge native memory leaks even ImageReader is closed.
* make Image close thread safe: it is possible the clients close the image
in listener thread and the client main thread.
* Some minor code refactor to reduce the code duplication.

Bug: 25088440
Change-Id: I37d22b52aeb8d2521bf9c702b0f54c05905473e0
2015-12-07 14:38:37 -08:00
Andy Hung
0275a982ab SoundPool: add lock for findSample access from SoundPoolThread
Sample decoding still occurs in SoundPoolThread
without holding the SoundPool lock.

Bug: 25781119
Change-Id: I11fde005aa9cf5438e0390a0d2dfe0ec1dd282e8
2015-12-01 14:40:26 -08:00
Jeff Tinker
3ccb34d707 Improve MediaCodec.CryptoException log messages
The message being logged is "Unknown error" even for
known error types.  This change provides more descriptive
error strings, for the case when the message isn't
explicitly provided by the DRM plugin.

Change-Id: Ic86478d7685cd33e21ecd2f875ef7dbed351e52e
related-to-bug: 25477595
2015-11-09 17:31:05 -08:00
Wonsik Kim
8399506317 Implement pause/resume functionality to MediaRecorder
Bug: 20092236
Change-Id: I02b9f11e210d15f6efe52d44f64ad8a3bc566d96
2015-10-08 08:40:34 +00:00
Daichi Hirono
aeaa12c34e Merge "Add readEvent method to MtpDevice." 2015-09-28 12:40:05 +00:00
Daichi Hirono
0b494663a4 Add readEvent method to MtpDevice.
BUG=23368533

Change-Id: Ibefff559fa7dd0bee17e2812bd7cdd129108d804
2015-09-25 14:54:17 +09:00
Elliott Hughes
434a481b21 am ea1831d2: am b57dd722: resolved conflicts for a884d81e to stage-aosp-master
* commit 'ea1831d211ea0e6b2d161c714bb0786369ef2df5':
  constify JNINativeMethod function pointer tables
2015-09-24 17:23:00 +00:00
Elliott Hughes
b57dd722f1 resolved conflicts for a884d81e to stage-aosp-master
Change-Id: Ice485967fa96f13786024b6939b826638e906ff0
2015-09-24 10:01:32 -07:00
Daniel Micay
76f6a86de2 constify JNINativeMethod function pointer tables
Change-Id: I4036c924958221cbc644724f8eb01c5de3cd7954
2015-09-22 17:10:35 -04:00