Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java

Issue 2362333002: Reland: Image Capture Linux/CrOs: wire some capabilities set/get (Closed)
Patch Set: VideoCaptureCamera2: do not return error if stopCapture() finds the CameraCaptureSession closed Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/capture/video/linux/v4l2_capture_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java
diff --git a/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java b/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java
index 800aee1092c62921adfbdbce5ecd14d49fe40ab8..c2438da244e94d1146118c681904fa00cb31ef47 100644
--- a/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java
+++ b/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java
@@ -112,6 +112,7 @@ public class VideoCaptureCamera2 extends VideoCapture {
private class CrImageReaderListener implements ImageReader.OnImageAvailableListener {
@Override
public void onImageAvailable(ImageReader reader) {
+ Log.d(TAG, "CrImageReaderListener.onImageAvailable");
try (Image image = reader.acquireLatestImage()) {
if (image == null) return;
@@ -199,7 +200,7 @@ public class VideoCaptureCamera2 extends VideoCapture {
@Override
public void onImageAvailable(ImageReader reader) {
- Log.d(TAG, "CrPhotoReaderListener.mCallbackId " + mCallbackId);
+ Log.d(TAG, "CrPhotoReaderListener.onImageAvailable");
try (Image image = reader.acquireLatestImage()) {
if (image == null) {
throw new IllegalStateException();
@@ -628,8 +629,8 @@ public class VideoCaptureCamera2 extends VideoCapture {
try {
mPreviewSession.abortCaptures();
} catch (CameraAccessException | IllegalStateException ex) {
- Log.e(TAG, "abortCaptures: ", ex);
- return false;
+ // Stopping a device whose CameraCaptureSession is closed is not an error: ignore this.
+ Log.w(TAG, "abortCaptures: ", ex);
}
if (mCameraDevice == null) return false;
mCameraDevice.close();
@@ -847,7 +848,7 @@ public class VideoCaptureCamera2 extends VideoCapture {
@Override
public boolean takePhoto(final long callbackId) {
- Log.d(TAG, "takePhoto " + callbackId);
+ Log.d(TAG, "takePhoto");
if (mCameraDevice == null || mCameraState != CameraState.STARTED) return false;
final CameraCharacteristics cameraCharacteristics = getCameraCharacteristics(mContext, mId);
« no previous file with comments | « no previous file | media/capture/video/linux/v4l2_capture_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698