History log of /frameworks/base/media/jni/android_media_ImageWriter.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
07ad459c84b565ea216854a64e726a16c5824640 02-May-2017 Eino-Ville Talvala <etalvala@google.com> ImageWriter: Attach non-opaque Images as well.

With all the work under the hood of ImageReader/Writer in the last few
releases, this is much more straightforward to enable.

Only trick is to ensure that the Image detached from the ImageReader
correctly clears out its planes, if present.

Bug: 19962027
Test: Camera CTS still passes on angler, sailfish, ryu
Change-Id: Ic8a1f3e2f45cf15971d76e308a5af25eb2fd66f1
916d8ac650865cd05808d48bad68b69bebbc95ab 23-Mar-2017 Zhijun He <zhijunhe@google.com> ImageReader/Writer: add usage flag support

Also add an ImageWriter ctor to take additional arugment (format)

Test: ImageReader and Writer CTS tests
Bug: 32766711
Change-Id: I99e3862dd5b9a85c9df7879c14c84b68a35718ec
845eef05ffea53f4ce7a1e0551896be874c4f302 04-Apr-2017 Mathias Agopian <mathias@google.com> Remove useless GraphicBuffer() constructor

Test: compiled & run
Bug: 36869708
Change-Id: Ie825979cd03874904b6f953ece4a05d4a0d52253
0ab416269a866c8afa8f65d9351afa2407abee4c 26-Feb-2016 Zhijun He <zhijunhe@google.com> ImageReader/Writer: refactor and cleanup

Below changes are included:
* Defer the buffer lock to Image#getPlanes call. This will save quite a bit
CPU cycles associated with lock buffer if the application doesn't really
want to access the data.
* Refactor the code: move some common code to some utility class, and use
one unified consumer (BufferItemConsumer) in ImageReader native implementation.
The code refactoring will also make it easier to support non-opaque image

Bug: 22356918
Bug: 19962027
Change-Id: I4fb865b0ea3deb6650afc64c32a5906f30e8ccbd
dc6bb24a3c2c830c909523e8d7d999fb556fb77d 04-Dec-2015 Zhijun He <zhijunhe@google.com> 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
e0ee63046ad062040aafc977585fb461a2acf666 07-Jul-2015 Chien-Yu Chen <cychen@google.com> ImageWriter: Exception when Surface is abandoned

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

Bug: 22279111
Change-Id: I8301920d64a53c45b29e947e52ff323733abbf16
0375cb042d54a6d7c93795b4d117b138f02bd1e0 18-Jun-2015 Chien-Yu Chen <cychen@google.com> ImageWriter: Remove exception for closing twice

because close() will be called again when GC kicks in.

Bug: 20945169
Change-Id: If3c5a13be241977ccf4692d5301c423b7ff38918
1102e21b5dd0f79072e826932d0a3e3cb2f8c285 10-Jun-2015 Dan Albert <danalbert@google.com> Fix format string mismatch. Clang build fix.

The gralloc usage flags are an enum, which is backed by an
implementation defined type. Both gcc and clang are making this a long
long. All the values are hard coded to fit within 8 hex characters
though, so just make the cast.

Change-Id: I4a9778a24c2cbf7fb663371d208e30c4921e170d
3316452ffa74ea9a44d157c4d0cacdca3ad99fc9 27-Apr-2015 Dan Stoza <stoza@google.com> ImageWriter: Change detach to sp<GraphicBuffer>

Changes the call to IGBP::detachNextBuffer to return an
sp<GraphicBuffer> instead of an ANativeWindowBuffer*.

Bug: 20092217
Change-Id: I59d6acef7120de5040c6710aeecfa1633ec7f736
a58271419ee5b4d8d2a6e25c602a0c40719f33e0 22-Apr-2015 Zhijun He <zhijunhe@google.com> ImageWriter: fix and cleanup the closed Image Handling

Attempting to access an Image after it is closed will result in an ISE.

Also fixed some minor doc issues.

Bug: 19872785
Change-Id: I91f037b2b2f243fcbd905d5a646b505bc9c10638
ce9d6f9c75e2254f3704996e232e57e0c8f686d8 30-Mar-2015 Zhijun He <zhijunhe@google.com> ImageReader/Writer: implement opaque format operations

Implement attach/detach for image reader and writer.

Bug: 19872821
Change-Id: Ib45a054c6be0b56b370fa8d709b47b0298ba5ea7
d1cbc684053986c6c9efc6220bd79d654932b3d0 23-Mar-2015 Zhijun He <zhijunhe@google.com> media: fix build break

clang/llvm complains the timestamp print formating.

Change-Id: Ie4bff9cbec90994709097d087d1c1f2a7d1465cf
f6a09e510649ae4701bb5ad4c40d102d59a5608c 25-Feb-2015 Zhijun He <zhijunhe@google.com> ImageReader/Writer: Add ImageWriter and Opaque ImageReader

ImageWriter/Reader API change, including below changes
* Interface for Opaque ImageReader
* ImageWriter Interface and implementation
* Image class minor update to support ImageWriter opaque ImageReader

detach/attach interface are defined but yet to be implemented.

Change-Id: Ic7c0d2df73c80b1a81a7316d8c4556bf7703c309