Index: webrtc/api/android/java/src/org/webrtc/CameraCapturer.java |
diff --git a/webrtc/api/android/java/src/org/webrtc/CameraCapturer.java b/webrtc/api/android/java/src/org/webrtc/CameraCapturer.java |
index c94538bf740a256c4b60b8c51d8b91942b1a9cf3..86f5f217c1cd3dd19a8ada9bfea469e0c62d06de 100644 |
--- a/webrtc/api/android/java/src/org/webrtc/CameraCapturer.java |
+++ b/webrtc/api/android/java/src/org/webrtc/CameraCapturer.java |
@@ -119,6 +119,19 @@ public abstract class CameraCapturer implements CameraVideoCapturer { |
} |
@Override |
+ public void onCameraDisconnected(CameraSession session) { |
+ checkIsOnCameraThread(); |
+ synchronized (stateLock) { |
+ if (session != currentSession) { |
+ Logging.w(TAG, "onCameraDisconnected from another session."); |
+ return; |
+ } |
+ eventsHandler.onCameraDisconnected(); |
+ stopCapture(); |
+ } |
+ } |
+ |
+ @Override |
public void onCameraClosed(CameraSession session) { |
checkIsOnCameraThread(); |
synchronized (stateLock) { |
@@ -204,6 +217,8 @@ public abstract class CameraCapturer implements CameraVideoCapturer { |
@Override |
public void onCameraError(String errorDescription) {} |
@Override |
+ public void onCameraDisconnected() {} |
+ @Override |
public void onCameraFreezed(String errorDescription) {} |
@Override |
public void onCameraOpening(String cameraName) {} |