Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2017-12-12 22:27:41 +01:00
parent 9ef1128b59
commit e44ce6e7b4

View file

@ -369,9 +369,11 @@ public class CallActivity extends AppCompatActivity {
} }
private void startVideoCapture() { private void startVideoCapture() {
Resources r = getResources(); if (videoCapturer != null) {
int px = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 120, r.getDisplayMetrics()); Resources r = getResources();
videoCapturerAndroid.startCapture(px, px, 30); int px = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 120, r.getDisplayMetrics());
videoCapturerAndroid.startCapture(px, px, 30);
}
} }
private void joinRoomAndCall() { private void joinRoomAndCall() {
@ -796,10 +798,12 @@ public class CallActivity extends AppCompatActivity {
public void onStop() { public void onStop() {
super.onStop(); super.onStop();
eventBus.unregister(this); eventBus.unregister(this);
try { if (videoCapturer != null) {
videoCapturer.stopCapture(); try {
} catch (InterruptedException e) { videoCapturer.stopCapture();
Log.e(TAG, "Failed to stop the capturing process"); } catch (InterruptedException e) {
Log.e(TAG, "Failed to stop the capturing process");
}
} }
} }