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

Side by Side Diff: webrtc/api/android/java/src/org/webrtc/Camera2Capturer.java

Issue 2127893002: AndroidVideoTrackSource implementation (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@magjed-init
Patch Set: Fix cpplint errors. Created 4 years, 5 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
« no previous file with comments | « webrtc/api/OWNERS ('k') | webrtc/api/android/java/src/org/webrtc/PeerConnectionFactory.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « webrtc/api/OWNERS ('k') | webrtc/api/android/java/src/org/webrtc/PeerConnectionFactory.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698