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
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
long.
To represents full range of 32-bit unsigned integer, we should use
jlong instead of jint.
BUG=26284424
Change-Id: Id3fa9e3daa778c204ab8e38f821d454c709c317a
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
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
* 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
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
It was found that createByteBufferFromABuffer was recieving a NULL buffer in bug
22726278. Based on returning NULL when buffer->base() == NULL, returning NULL
when buffer == NULL. This does not fix bug 22726278 - but address a problem found
while looking into it.
Bug: 22726278
Change-Id: I933b6a4a535d803576a4cdd7a1ffaf4a428c3201
This patch does not yet allow to upload files, but uploading (creating)
directories already works.
Bug: 22545670
Change-Id: If4d5a53aa26f791475bb1a783e0ac9540d6760c1
The existing APIs required to copy all bytes to memory, which will fail in
case of very large files, like movies.
Bug: 22908937
Change-Id: I23bdcbdbf08b7c1b1017591799bbb94e53249a57
Throw IllegalStateException when queueing or dequeueing an
image if the input surface is already abandoned by the consumer.
Also fix a crash when planes are not initialized when closing
ImageWriter.
Bug: 22279111
Change-Id: I8301920d64a53c45b29e947e52ff323733abbf16