Lines Matching refs:image

136      * The format specifies the image format of this ImageWriter. The format
260 * image buffer is inaccessible to the application, and calling this method
307 * filled the input image with data. This method then passes the filled
336 * @param image The Image to be queued back to ImageWriter for future
338 * @throws IllegalStateException if the image was already queued previously,
339 * or the image was aborted previously, or the input
345 public void queueInputImage(Image image) {
346 if (image == null) {
347 throw new IllegalArgumentException("image shouldn't be null");
349 boolean ownedByMe = isImageOwnedByMe(image);
350 if (ownedByMe && !(((WriterSurfaceImage) image).mIsImageValid)) {
356 if (!(image.getOwner() instanceof ImageReader)) {
358 + " ImageWriter, other image source is not supported yet!");
361 ImageReader prevOwner = (ImageReader) image.getOwner();
363 prevOwner.detachImage(image);
364 attachAndQueueInputImage(image);
368 image.close();
372 Rect crop = image.getCropRect();
373 nativeQueueInputImage(mNativeContext, image, image.getTimestamp(), crop.left, crop.top,
384 mDequeuedImages.remove(image);
385 // Do not call close here, as close is essentially cancel image.
386 WriterSurfaceImage wi = (WriterSurfaceImage) image;
425 * the downstream consumer uses and releases this image to this
426 * ImageWriter, this callback will be fired. This image will be
431 * After the downstream consumer uses and releases this image to this
487 for (Image image : mDequeuedImages) {
488 image.close();
530 * @param image The source Image to be attached and queued into this
536 private void attachAndQueueInputImage(Image image) {
537 if (image == null) {
538 throw new IllegalArgumentException("image shouldn't be null");
540 if (isImageOwnedByMe(image)) {
542 "Can not attach an image that is owned ImageWriter already");
545 * Throw ISE if the image is not attachable, which means that it is
550 if (!image.isAttachable()) {
551 throw new IllegalStateException("Image was not detached from last owner, or image "
558 Rect crop = image.getCropRect();
559 nativeAttachAndQueueImage(mNativeContext, image.getNativeContext(), image.getFormat(),
560 image.getTimestamp(), crop.left, crop.top, crop.right, crop.bottom);
620 * @param image The Image to be aborted.
624 private void abortImage(Image image) {
625 if (image == null) {
626 throw new IllegalArgumentException("image shouldn't be null");
629 if (!mDequeuedImages.contains(image)) {
630 throw new IllegalStateException("It is illegal to abort some image that is not"
634 WriterSurfaceImage wi = (WriterSurfaceImage) image;
645 cancelImage(mNativeContext, image);
646 mDequeuedImages.remove(image);
651 private boolean isImageOwnedByMe(Image image) {
652 if (!(image instanceof WriterSurfaceImage)) {
655 WriterSurfaceImage wi = (WriterSurfaceImage) image;
858 private synchronized native void nativeQueueInputImage(long nativeCtx, Image image,
865 private synchronized native void cancelImage(long nativeCtx, Image image);