Snap for 5429421 from b94a3d3e5461e6148bcb3be96f51e51c8f57c7e2 to pi-qpr3-b-release
Change-Id: Ib21d610392faea3734505c7b807655a8a4f7fd28
diff --git a/camera/ndk/include/camera/NdkCameraDevice.h b/camera/ndk/include/camera/NdkCameraDevice.h
index b715b12..92dad1c 100644
--- a/camera/ndk/include/camera/NdkCameraDevice.h
+++ b/camera/ndk/include/camera/NdkCameraDevice.h
@@ -643,6 +643,14 @@
* target combinations with sizes outside of these guarantees, but this can only be tested for
* by attempting to create a session with such targets.</p>
*
+ * <p>Exception on 176x144 (QCIF) resolution:
+ * Camera devices usually have a fixed capability for downscaling from larger resolution to
+ * smaller, and the QCIF resolution sometimes cannot be fully supported due to this
+ * limitation on devices with high-resolution image sensors. Therefore, trying to configure a
+ * QCIF resolution stream together with any other stream larger than 1920x1080 resolution
+ * (either width or height) might not be supported, and capture session creation will fail if it
+ * is not.</p>
+ *
* @param device the camera device of interest.
* @param outputs the {@link ACaptureSessionOutputContainer} describes all output streams.
* @param callbacks the {@link ACameraCaptureSession_stateCallbacks capture session state callbacks}.
diff --git a/camera/ndk/include/camera/NdkCameraMetadataTags.h b/camera/ndk/include/camera/NdkCameraMetadataTags.h
index c1f5ddc..bee1a46 100644
--- a/camera/ndk/include/camera/NdkCameraMetadataTags.h
+++ b/camera/ndk/include/camera/NdkCameraMetadataTags.h
@@ -3157,6 +3157,12 @@
* IMPLEMENTATION_DEFINED | same as YUV_420_888 | Any |</p>
* <p>Refer to ACAMERA_REQUEST_AVAILABLE_CAPABILITIES for additional
* mandatory stream configurations on a per-capability basis.</p>
+ * <p>Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability for
+ * downscaling from larger resolution to smaller, and the QCIF resolution sometimes is not
+ * fully supported due to this limitation on devices with high-resolution image sensors.
+ * Therefore, trying to configure a QCIF resolution stream together with any other
+ * stream larger than 1920x1080 resolution (either width or height) might not be supported,
+ * and capture session creation will fail if it is not.</p>
*
* @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
* @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
@@ -5154,7 +5160,7 @@
* <li><code>LEVEL_3</code> devices additionally support YUV reprocessing and RAW image capture, along
* with additional output stream configurations.</li>
* <li><code>EXTERNAL</code> devices are similar to <code>LIMITED</code> devices with exceptions like some sensor or
- * lens information not reorted or less stable framerates.</li>
+ * lens information not reported or less stable framerates.</li>
* </ul>
* <p>See the individual level enums for full descriptions of the supported capabilities. The
* ACAMERA_REQUEST_AVAILABLE_CAPABILITIES entry describes the device's capabilities at a
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 251420f..7f39d10 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -783,9 +783,6 @@
// need to enable allocation when attaching
surface->getIGraphicBufferProducer()->allowAllocation(true);
- // dequeueBuffer cannot time out
- surface->setDequeueTimeout(-1);
-
// for meta data mode, we move dequeud buffers to the new surface.
// for non-meta mode, we must move all registered buffers
for (size_t i = 0; i < buffers.size(); ++i) {
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp
index c4f0410..353e407 100644
--- a/media/libstagefright/MediaCodec.cpp
+++ b/media/libstagefright/MediaCodec.cpp
@@ -2198,7 +2198,6 @@
}
if (mime.startsWithIgnoreCase("video/")) {
- mSurface->setDequeueTimeout(-1);
mSoftRenderer = new SoftwareRenderer(mSurface, mRotationDegrees);
}
}
@@ -2486,7 +2485,6 @@
&& (mFlags & kFlagPushBlankBuffersOnShutdown)) {
pushBlankBuffersToNativeWindow(mSurface.get());
}
- surface->setDequeueTimeout(-1);
mSoftRenderer = new SoftwareRenderer(surface);
// TODO: check if this was successful
} else {