Reputation: 39
is there anyway to record video without using mediaRecorder..
if there is no other way how can i preview camera into the media recorder before start video recording ..
Upvotes: 0
Views: 1066
Reputation: 13357
Using Camera google API you must set a MediaRecorder or a MediaCodec surface to be able to create a video Capture session for video. Setting the surface of the video:
createCameraPreviewSession(mMediaRecorder.getSurface(),
mFrameRate,
mVideoSize,
mSize,
mRetry);
In Android developer webpage you can see the both ways to record a video. MediaCodec or MediaRecorder:
For recording with MediaCodec: Call createInputSurface() after configuring the media codec to use one of the sizes returned by getOutputSizes(MediaCodec.class)
For recording with MediaRecorder: Call getSurface() after configuring the media recorder to use one of the sizes returned by getOutputSizes(MediaRecorder.class), or configuring it to use one of the supported CamcorderProfiles.
Upvotes: 2