updateDetails method
- CameraDetails newDetails
Updates the camera's details, which will take effect on the next sendFrame call.
Implementation
void updateDetails(CameraDetails newDetails) {
final shouldRestart = (newDetails.hasFps() && newDetails.fps != details.fps)
|| (newDetails.hasResolutionHeight() && newDetails.resolutionHeight != details.resolutionHeight)
|| (newDetails.hasResolutionWidth() && newDetails.resolutionWidth != details.resolutionWidth);
details.mergeFromMessage(newDetails);
if (shouldRestart) {
stop();
if (details.status == CameraStatus.CAMERA_ENABLED) start();
}
}