|
|
@ -117,6 +117,7 @@ public class CameraView extends FrameLayout implements LifecycleObserver { |
|
|
|
long videoMaxSize = (long) a.getFloat(R.styleable.CameraView_cameraVideoMaxSize, 0); |
|
|
|
long videoMaxSize = (long) a.getFloat(R.styleable.CameraView_cameraVideoMaxSize, 0); |
|
|
|
int videoMaxDuration = a.getInteger(R.styleable.CameraView_cameraVideoMaxDuration, 0); |
|
|
|
int videoMaxDuration = a.getInteger(R.styleable.CameraView_cameraVideoMaxDuration, 0); |
|
|
|
int videoBitRate = a.getInteger(R.styleable.CameraView_cameraVideoBitRate, 0); |
|
|
|
int videoBitRate = a.getInteger(R.styleable.CameraView_cameraVideoBitRate, 0); |
|
|
|
|
|
|
|
int videoFrameRate = a.getInteger(R.styleable.CameraView_cameraVideoFrameRate, 0); |
|
|
|
int audioBitRate = a.getInteger(R.styleable.CameraView_cameraAudioBitRate, 0); |
|
|
|
int audioBitRate = a.getInteger(R.styleable.CameraView_cameraAudioBitRate, 0); |
|
|
|
int audioSampleRate = a.getInteger(R.styleable.CameraView_cameraAudioSampleRate, 0); |
|
|
|
int audioSampleRate = a.getInteger(R.styleable.CameraView_cameraAudioSampleRate, 0); |
|
|
|
int audioChannels = a.getInteger(R.styleable.CameraView_cameraAudioChannels, 0); |
|
|
|
int audioChannels = a.getInteger(R.styleable.CameraView_cameraAudioChannels, 0); |
|
|
@ -196,6 +197,7 @@ public class CameraView extends FrameLayout implements LifecycleObserver { |
|
|
|
setVideoMaxSize(videoMaxSize); |
|
|
|
setVideoMaxSize(videoMaxSize); |
|
|
|
setVideoMaxDuration(videoMaxDuration); |
|
|
|
setVideoMaxDuration(videoMaxDuration); |
|
|
|
setVideoBitRate(videoBitRate); |
|
|
|
setVideoBitRate(videoBitRate); |
|
|
|
|
|
|
|
setVideoFrameRate(videoFrameRate); |
|
|
|
setAudioBitRate(audioBitRate); |
|
|
|
setAudioBitRate(audioBitRate); |
|
|
|
setAudioSampleRate(audioSampleRate); |
|
|
|
setAudioSampleRate(audioSampleRate); |
|
|
|
setAudioChannels(audioChannels); |
|
|
|
setAudioChannels(audioChannels); |
|
|
@ -1488,6 +1490,16 @@ public class CameraView extends FrameLayout implements LifecycleObserver { |
|
|
|
return mCameraController.isCapturingVideo(); |
|
|
|
return mCameraController.isCapturingVideo(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Returns custom video frame rate, or 0 if no limit was set. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @see #setVideoFrameRate(int) |
|
|
|
|
|
|
|
* @return custom video frame rate |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public int getVideoFrameRate() { |
|
|
|
|
|
|
|
return mCameraController.getVideoFrameRate(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Returns custom video bitrate, or 0 if no limit was set. |
|
|
|
* Returns custom video bitrate, or 0 if no limit was set. |
|
|
|
* |
|
|
|
* |
|
|
@ -1528,6 +1540,15 @@ public class CameraView extends FrameLayout implements LifecycleObserver { |
|
|
|
mCameraController.setVideoBitRate(videoBitRate); |
|
|
|
mCameraController.setVideoBitRate(videoBitRate); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Sets custom video frame rate for recording. Use 0 or negatives to disable. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param videoFrameRate The maximum video frame rate |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public void setVideoFrameRate(int videoFrameRate) { |
|
|
|
|
|
|
|
mCameraController.setVideoFrameRate(videoFrameRate); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Sets custom audio bitrate for recording. Use 0 or negatives to disable. |
|
|
|
* Sets custom audio bitrate for recording. Use 0 or negatives to disable. |
|
|
|
* |
|
|
|
* |
|
|
|