public void release() { if (mCameraSource != null) { mCameraSource.release(); mCameraSource = null; } }
public void release() { if (mCameraSource != null) { mCameraSource.release(); mCameraSource = null; } }
public void release() { if (mCameraSource != null) { mCameraSource.release(); mCameraSource = null; } }
public void onClick(View v) { mIsFrontFacing = !mIsFrontFacing; if (mCameraSource != null) { mCameraSource.release(); mCameraSource = null; } createCameraSource(); startCameraSource(); } };
/** * Releases the resources associated with the camera source, the associated detectors, and the * rest of the processing pipeline. */ @Override protected void onDestroy() { super.onDestroy(); if (mCameraSource != null) { mCameraSource.release(); } }
/** * Releases the resources associated with the camera source, the associated detector, and the * rest of the processing pipeline. */ @Override protected void onDestroy() { super.onDestroy(); if (mCameraSource != null) { mCameraSource.release(); } }
/** * Releases the resources associated with the camera source, the associated detector, and the * rest of the processing pipeline. */ @Override protected void onDestroy() { super.onDestroy(); if (mCameraSource != null) { mCameraSource.release(); } }
/** * Starts or restarts the camera source, if it exists. If the camera source doesn't exist yet * (e.g., because onResume was called before the camera source was created), this will be called * again when the camera source is created. */ private void startCameraSource() { // check that the device has play services available. int code = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable( getApplicationContext()); if (code != ConnectionResult.SUCCESS) { Dialog dlg = GoogleApiAvailability.getInstance().getErrorDialog(this, code, RC_HANDLE_GMS); dlg.show(); } if (mCameraSource != null) { try { mPreview.start(mCameraSource, mGraphicOverlay); } catch (IOException e) { Log.e(TAG, "Unable to start camera source.", e); mCameraSource.release(); mCameraSource = null; } } }
/** * Starts or restarts the camera source, if it exists. If the camera source doesn't exist yet * (e.g., because onResume was called before the camera source was created), this will be called * again when the camera source is created. */ private void startCameraSource() { // check that the device has play services available. int code = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable( getApplicationContext()); if (code != ConnectionResult.SUCCESS) { Dialog dlg = GoogleApiAvailability.getInstance().getErrorDialog(this, code, RC_HANDLE_GMS); dlg.show(); } if (mCameraSource != null) { try { mPreview.start(mCameraSource, mGraphicOverlay); } catch (IOException e) { Log.e(TAG, "Unable to start camera source.", e); mCameraSource.release(); mCameraSource = null; } } } }
/** * Starts or restarts the camera source, if it exists. If the camera source doesn't exist yet * (e.g., because onResume was called before the camera source was created), this will be called * again when the camera source is created. */ private void startCameraSource() { // check that the device has play services available. int code = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable( getApplicationContext()); if (code != ConnectionResult.SUCCESS) { Dialog dlg = GoogleApiAvailability.getInstance().getErrorDialog(this, code, RC_HANDLE_GMS); dlg.show(); } if (mCameraSource != null) { try { mPreview.start(mCameraSource, mGraphicOverlay); } catch (IOException e) { Log.e(TAG, "Unable to start camera source.", e); mCameraSource.release(); mCameraSource = null; } } } }
public void release() { if (mCameraSource != null) { mCameraSource.release(); mCameraSource = null; } }
public void release() { if (mCameraSource != null) { mCameraSource.release(); mCameraSource = null; } }
public void release() { if (mCameraSource != null) { mCameraSource.release(); mCameraSource = null; } }
@Override protected void onDestroy() { super.onDestroy(); cameraSource.release(); } }
/** * Releases the resources associated with the camera source, the associated detector, and the * rest of the processing pipeline. */ @Override protected void onDestroy() { super.onDestroy(); if (mCameraSource != null) { mCameraSource.release(); } }
@Override protected void onDestroy() { super.onDestroy(); if (null != cameraSource) { cameraSource.release(); } if (null != barcodeDetector) { barcodeDetector.release(); } Log.i(LOG_TAG, "onDestroy"); }
/** * Starts or restarts the camera source, if it exists. If the camera source doesn't exist yet * (e.g., because onResume was called before the camera source was created), this will be called * again when the camera source is created. */ private void startCameraSource() { // check that the device has play services available. int code = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable( getApplicationContext()); if (code != ConnectionResult.SUCCESS) { Dialog dlg = GoogleApiAvailability.getInstance().getErrorDialog(this, code, RC_HANDLE_GMS); dlg.show(); } if (mCameraSource != null) { try { mPreview.start(mCameraSource, mGraphicOverlay); } catch (IOException e) { Log.e(TAG, "Unable to start camera source.", e); mCameraSource.release(); mCameraSource = null; } } }
Log.d("startTracking",e.getMessage()); mUserAwareVideoView.onErrorOccurred(); mCameraSource.release(); mCameraSource = null;
/** * Initialize and start the eye tracking. */ void startEyeTracker() { //initialize the camera resource creteCameraTracker(); // check that the device has play services available. int statusCode = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mActivity.getApplicationContext()); if (statusCode != ConnectionResult.SUCCESS) { Dialog dlg = GoogleApiAvailability.getInstance().getErrorDialog(mActivity, statusCode, RC_HANDLE_GMS); dlg.show(); mScreenListener.onErrorOccurred(Errors.PLAY_SERVICE_NOT_AVAILABLE); return; } if (mCameraSource != null) { try { mPreview.start(mCameraSource); } catch (IOException e) { Log.e(getClass().getSimpleName(), "Unable to start camera source.", e); mCameraSource.release(); mCameraSource = null; mScreenListener.onErrorOccurred(Errors.UNDEFINED); } } isTrackingRunning = true; mScreenListener.onScreenMonitoringStart(); }