當前位置: 首頁>>代碼示例>>Java>>正文


Java CameraDevice.close方法代碼示例

本文整理匯總了Java中android.hardware.camera2.CameraDevice.close方法的典型用法代碼示例。如果您正苦於以下問題:Java CameraDevice.close方法的具體用法?Java CameraDevice.close怎麽用?Java CameraDevice.close使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.hardware.camera2.CameraDevice的用法示例。


在下文中一共展示了CameraDevice.close方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onError

import android.hardware.camera2.CameraDevice; //導入方法依賴的package包/類
@Override
public void onError(final CameraDevice cd, final int error) {
  cameraOpenCloseLock.release();
  cd.close();
  cameraDevice = null;
  final Activity activity = getActivity();
  if (null != activity) {
    activity.finish();
  }
}
 
開發者ID:codekongs,項目名稱:ImageClassify,代碼行數:11,代碼來源:CameraConnectionFragment.java

示例2: onError

import android.hardware.camera2.CameraDevice; //導入方法依賴的package包/類
@Override
public void onError(CameraDevice cameraDevice, int error) {
    cameraDevice.close();
    Camera2Manager.this.cameraDevice = null;

    uiHandler.post(new Runnable() {
        @Override
        public void run() {
            cameraOpenListener.onCameraOpenError();
        }
    });
}
 
開發者ID:florent37,項目名稱:CameraFragment,代碼行數:13,代碼來源:Camera2Manager.java

示例3: onError

import android.hardware.camera2.CameraDevice; //導入方法依賴的package包/類
@Override
public void onError(@NonNull CameraDevice cameraDevice, int error) {
    mCameraOpenCloseLock.release();
    cameraDevice.close();
    mCameraDevice = null;
}
 
開發者ID:lytcom,項目名稱:CameraKitView,代碼行數:7,代碼來源:Camera2.java

示例4: onError

import android.hardware.camera2.CameraDevice; //導入方法依賴的package包/類
@Override
public void onError(@NonNull CameraDevice cameraDevice, int i) {
    Log.d(TAG, "Camera device error, closing.");
    cameraDevice.close();
}
 
開發者ID:kevalpatel2106,項目名稱:robo-car,代碼行數:6,代碼來源:PiCameraDriver.java

示例5: onDisconnected

import android.hardware.camera2.CameraDevice; //導入方法依賴的package包/類
@Override
public void onDisconnected(@NonNull CameraDevice cameraDevice) {
    mCameraOpenCloseLock.release();
    cameraDevice.close();
    mCameraDevice = null;
}
 
開發者ID:vulovicv23,項目名稱:opencv-documentscanner-android,代碼行數:7,代碼來源:Camera2BasicFragment.java

示例6: onError

import android.hardware.camera2.CameraDevice; //導入方法依賴的package包/類
@Override
public void onError(CameraDevice cameraDevice, int error) {
    cameraDevice.close();
    mCameraDevice = null;
    mCameraOpenCloseLock.release();
}
 
開發者ID:ykarim,項目名稱:FTC2016,代碼行數:7,代碼來源:Camera2Renderer.java

示例7: onDisconnected

import android.hardware.camera2.CameraDevice; //導入方法依賴的package包/類
@Override
public void onDisconnected(final CameraDevice cd) {
  cameraOpenCloseLock.release();
  cd.close();
  cameraDevice = null;
}
 
開發者ID:codekongs,項目名稱:ImageClassify,代碼行數:7,代碼來源:CameraConnectionFragment.java

示例8: onDisconnected

import android.hardware.camera2.CameraDevice; //導入方法依賴的package包/類
@Override
public void onDisconnected(CameraDevice cameraDevice) {
    cameraDevice.close();
    mCameraDevice = null;
    mCameraOpenCloseLock.release();
}
 
開發者ID:johnhany,項目名稱:MOAAP,代碼行數:7,代碼來源:Camera2Renderer.java

示例9: onDisconnected

import android.hardware.camera2.CameraDevice; //導入方法依賴的package包/類
@Override
public void onDisconnected(@NonNull CameraDevice camera) {
    camera.close();
    mCamera = null;
}
 
開發者ID:jphacks,項目名稱:TK_1701,代碼行數:6,代碼來源:Camera2.java

示例10: onError

import android.hardware.camera2.CameraDevice; //導入方法依賴的package包/類
@Override
public void onError(@NonNull CameraDevice camera, int error) {
    camera.close();
    mCamera = null;
}
 
開發者ID:jphacks,項目名稱:TK_1701,代碼行數:6,代碼來源:Camera2.java

示例11: onDisconnected

import android.hardware.camera2.CameraDevice; //導入方法依賴的package包/類
@Override
public void onDisconnected(@NonNull CameraDevice cameraDevice) {
    Log.d(TAG, "Camera disconnected, closing.");
    closeCaptureSession();
    cameraDevice.close();
}
 
開發者ID:googlecodelabs,項目名稱:androidthings-imageclassifier,代碼行數:7,代碼來源:CameraHandler.java

示例12: onDisconnected

import android.hardware.camera2.CameraDevice; //導入方法依賴的package包/類
@Override
public void onDisconnected(@NonNull CameraDevice camera) {
    cameraOpenCloseLock.release();
    camera.close();
    cameraDevice = null;
}
 
開發者ID:raulh82vlc,項目名稱:Image-Detection-Samples,代碼行數:7,代碼來源:FDCamera2Presenter.java


注:本文中的android.hardware.camera2.CameraDevice.close方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。