OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |