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

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

Issue 2673373003: getUserMeida: report device starting states (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.media; 5 package org.chromium.media;
6 6
7 import android.annotation.TargetApi; 7 import android.annotation.TargetApi;
8 import android.content.Context; 8 import android.content.Context;
9 import android.graphics.ImageFormat; 9 import android.graphics.ImageFormat;
10 import android.graphics.Rect; 10 import android.graphics.Rect;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // time a downloaded image is ready. Since |handler| is null, we 'll work on the 91 // time a downloaded image is ready. Since |handler| is null, we 'll work on the
92 // current Thread Looper. 92 // current Thread Looper.
93 mPreviewSession.setRepeatingRequest(mPreviewRequest, null, null) ; 93 mPreviewSession.setRepeatingRequest(mPreviewRequest, null, null) ;
94 } catch (CameraAccessException | SecurityException | IllegalStateExc eption 94 } catch (CameraAccessException | SecurityException | IllegalStateExc eption
95 | IllegalArgumentException ex) { 95 | IllegalArgumentException ex) {
96 Log.e(TAG, "setRepeatingRequest: ", ex); 96 Log.e(TAG, "setRepeatingRequest: ", ex);
97 return; 97 return;
98 } 98 }
99 // Now wait for trigger on CrImageReaderListener.onImageAvailable(); 99 // Now wait for trigger on CrImageReaderListener.onImageAvailable();
100 changeCameraStateAndNotify(CameraState.STARTED); 100 changeCameraStateAndNotify(CameraState.STARTED);
101 nativeOnStarted(mNativeVideoCaptureDeviceAndroid);
101 } 102 }
102 103
103 @Override 104 @Override
104 public void onConfigureFailed(CameraCaptureSession cameraCaptureSession) { 105 public void onConfigureFailed(CameraCaptureSession cameraCaptureSession) {
105 // TODO(mcasas): When signalling error, C++ will tear us down. Is th ere need for 106 // TODO(mcasas): When signalling error, C++ will tear us down. Is th ere need for
106 // cleanup? 107 // cleanup?
107 changeCameraStateAndNotify(CameraState.STOPPED); 108 changeCameraStateAndNotify(CameraState.STOPPED);
108 nativeOnError(mNativeVideoCaptureDeviceAndroid, "Camera session conf iguration error"); 109 nativeOnError(mNativeVideoCaptureDeviceAndroid, "Camera session conf iguration error");
109 } 110 }
110 }; 111 };
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 return false; 970 return false;
970 } 971 }
971 return true; 972 return true;
972 } 973 }
973 974
974 @Override 975 @Override
975 public void deallocate() { 976 public void deallocate() {
976 Log.d(TAG, "deallocate"); 977 Log.d(TAG, "deallocate");
977 } 978 }
978 } 979 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698