|
|
|
@ -294,11 +294,13 @@ class Camera1 extends CameraController { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
void setAudio(Audio audio) { |
|
|
|
|
if (mAudio != audio) { |
|
|
|
|
if (mIsCapturingVideo) { |
|
|
|
|
throw new IllegalStateException("Can't change audio while recording a video."); |
|
|
|
|
LOG.w("Changing audio mode while recording. Changes will take place starting from next video"); |
|
|
|
|
} |
|
|
|
|
mAudio = audio; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
void setFlash(Flash flash) { |
|
|
|
@ -606,7 +608,7 @@ class Camera1 extends CameraController { |
|
|
|
|
if (mAudio == Audio.ON) { |
|
|
|
|
mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER); |
|
|
|
|
mMediaRecorder.setProfile(profile); |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
// Set all values contained in profile except audio settings
|
|
|
|
|
mMediaRecorder.setOutputFormat(profile.fileFormat); |
|
|
|
|
mMediaRecorder.setVideoEncoder(profile.videoCodec); |
|
|
|
|