setLocation support for videos

pull/1/head
Mattia Iavarone 7 years ago
parent 51147e88ef
commit 55af71c646
  1. 9
      camerakit/src/main/api16/com/flurgle/camerakit/Camera1.java

@ -242,6 +242,10 @@ class Camera1 extends CameraImpl {
params.setGpsLongitude(mLongitude); params.setGpsLongitude(mLongitude);
params.setGpsTimestamp(System.currentTimeMillis()); params.setGpsTimestamp(System.currentTimeMillis());
params.setGpsProcessingMethod("Unknown"); params.setGpsProcessingMethod("Unknown");
if (mIsCapturingVideo && mMediaRecorder != null) {
mMediaRecorder.setLocation((float) mLatitude, (float) mLongitude);
}
} }
return true; return true;
} }
@ -585,7 +589,10 @@ class Camera1 extends CameraImpl {
mMediaRecorder.setCamera(mCamera); mMediaRecorder.setCamera(mCamera);
mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT); mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
if (mLatitude != 0 && mLongitude != 0) {
mMediaRecorder.setLocation((float) mLatitude, (float) mLongitude);
}
mMediaRecorder.setProfile(getCamcorderProfile(mVideoQuality)); mMediaRecorder.setProfile(getCamcorderProfile(mVideoQuality));
mMediaRecorder.setOutputFile(mVideoFile.getAbsolutePath()); mMediaRecorder.setOutputFile(mVideoFile.getAbsolutePath());

Loading…
Cancel
Save