There seems to be TVideoCaptureDevice in FireMonkey (Delphi XE6), but on official documentation, capturing process ends up on lines:
if(VideoCam
Here is how it is done on Android using native API:
var
texture : JSurfaceTexture;
surface: JSurface;
recorder: JMediaRecorder;
begin
texture := TJSurfaceTexture.JavaClass.init(1);
surface := TJSurface.JavaClass.init(texture);
recorder := TJMediaRecorder.Create();
recorder.setPreviewDisplay(surface);
recorder.setAudioSource(AUDIO_MIC);
recorder.setVideoSource(VIDEO_CAMERA);
recorder.setOutputFormat(FORMAT_THREE_GPP);
recorder.setAudioEncoder(AFORMAT_AMR_NB);
recorder.setVideoEncoder(VFORMAT_MPEG_4_SP);
recorder.setMaxDuration(1800000); // 30 minutes
recorder.setVideoSize(320, 240);
recorder.setVideoFrameRate(15);
recorder.setOutputFile(StringToJString(TPath.GetSharedCameraPath + OUTPUT_FILE));
recorder.prepare();
recorder.start();
end;
File will be recorded, just don't forget to send recorder.stop() when you wish to stop recording.