use of org.webrtc.CapturerObserver in project Signal-Android by signalapp.
the class WebRtcVideoUtil method initializeVanityCamera.
@NonNull
public static WebRtcServiceState initializeVanityCamera(@NonNull WebRtcServiceState currentState) {
Camera camera = currentState.getVideoState().requireCamera();
VideoSink sink = currentState.getVideoState().requireLocalSink();
if (camera.hasCapturer()) {
camera.initCapturer(new CapturerObserver() {
@Override
public void onFrameCaptured(VideoFrame videoFrame) {
sink.onFrame(videoFrame);
}
@Override
public void onCapturerStarted(boolean success) {
}
@Override
public void onCapturerStopped() {
}
});
camera.setEnabled(true);
}
return currentState.builder().changeLocalDeviceState().cameraState(camera.getCameraState()).build();
}
use of org.webrtc.CapturerObserver in project Signal-Android by WhisperSystems.
the class WebRtcVideoUtil method initializeVanityCamera.
@NonNull
public static WebRtcServiceState initializeVanityCamera(@NonNull WebRtcServiceState currentState) {
Camera camera = currentState.getVideoState().requireCamera();
VideoSink sink = currentState.getVideoState().requireLocalSink();
if (camera.hasCapturer()) {
camera.initCapturer(new CapturerObserver() {
@Override
public void onFrameCaptured(VideoFrame videoFrame) {
sink.onFrame(videoFrame);
}
@Override
public void onCapturerStarted(boolean success) {
}
@Override
public void onCapturerStopped() {
}
});
camera.setEnabled(true);
}
return currentState.builder().changeLocalDeviceState().cameraState(camera.getCameraState()).build();
}
Aggregations