OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 Logging.e(TAG, "Camera state was not STOPPING in onClosed. Most likely c
amera didn't stop " | 568 Logging.e(TAG, "Camera state was not STOPPING in onClosed. Most likely c
amera didn't stop " |
569 + "within timelimit and this method was invoked twice."); | 569 + "within timelimit and this method was invoked twice."); |
570 return; | 570 return; |
571 } | 571 } |
572 | 572 |
573 cameraThreadHandler.removeCallbacksAndMessages(STOP_TIMEOUT_RUNNABLE_TOKEN
); | 573 cameraThreadHandler.removeCallbacksAndMessages(STOP_TIMEOUT_RUNNABLE_TOKEN
); |
574 setCameraState(CameraState.IDLE); | 574 setCameraState(CameraState.IDLE); |
575 if (eventsHandler != null) { | 575 if (eventsHandler != null) { |
576 eventsHandler.onCameraClosed(); | 576 eventsHandler.onCameraClosed(); |
577 } | 577 } |
| 578 capturerObserver.onCapturerStopped(); |
578 } | 579 } |
579 } | 580 } |
580 | 581 |
581 final class CaptureSessionCallback extends CameraCaptureSession.StateCallback
{ | 582 final class CaptureSessionCallback extends CameraCaptureSession.StateCallback
{ |
582 @Override | 583 @Override |
583 public void onConfigureFailed(CameraCaptureSession session) { | 584 public void onConfigureFailed(CameraCaptureSession session) { |
584 checkIsOnCameraThread(); | 585 checkIsOnCameraThread(); |
585 captureSession = session; | 586 captureSession = session; |
586 reportError("Failed to configure capture session."); | 587 reportError("Failed to configure capture session."); |
587 } | 588 } |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 rotation = (360 + rotation % 360) % 360; | 881 rotation = (360 + rotation % 360) % 360; |
881 | 882 |
882 // Undo camera orientation - we report it as rotation instead. | 883 // Undo camera orientation - we report it as rotation instead. |
883 transformMatrix = RendererCommon.rotateTextureMatrix(transformMatrix, -camer
aOrientation); | 884 transformMatrix = RendererCommon.rotateTextureMatrix(transformMatrix, -camer
aOrientation); |
884 | 885 |
885 cameraStatistics.addFrame(); | 886 cameraStatistics.addFrame(); |
886 capturerObserver.onTextureFrameCaptured(captureFormat.width, captureFormat.h
eight, oesTextureId, | 887 capturerObserver.onTextureFrameCaptured(captureFormat.width, captureFormat.h
eight, oesTextureId, |
887 transformMatrix, rotation, timestampNs); | 888 transformMatrix, rotation, timestampNs); |
888 } | 889 } |
889 } | 890 } |
OLD | NEW |