Merge pull request #843 from thegobot/patch-9

adjusting timestamps when hot switching the camera
camera2
Leo Ma 4 years ago committed by GitHub
commit ad4bd90762
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -309,6 +309,11 @@ public class SrsPublisher {
}
public void switchCameraFace(int id) {
if (mEncoder != null && mEncoder.isEnabled()) {
mEncoder.pause();
}
mCameraView.stopCamera();
mCameraView.setCameraId(id);
if (id == 0) {
@ -320,6 +325,11 @@ public class SrsPublisher {
mCameraView.enableEncoding();
}
mCameraView.startCamera();
if (mEncoder != null && mEncoder.isEnabled()) {
mEncoder.resume();
}
}
public void setRtmpHandler(RtmpHandler handler) {

Loading…
Cancel
Save