NRSDKApiForUnity
Classes
XRXREALXREALVideoCapture

Classes

struct  VideoCaptureResult
 

Public Member Functions

 XREALVideoCapture ()
 
FrameCaptureContext GetContext ()
 
void Dispose ()
 
void StartRecordingAsync (string filename, OnStartedRecordingVideoCallback onStartedRecordingVideoCallback)
 
void StartRecordingAsync (string filename, OnStartedRecordingVideoCallback onStartedRecordingVideoCallback, float volumeFactorMic, float volumeFactorApp)
 
void StartVideoModeAsync (CameraParameters setupParams, OnVideoModeStartedCallback onVideoModeStartedCallback, bool autoAdaptBlendMode=false)
 
void StopRecordingAsync (OnStoppedRecordingVideoCallback onStoppedRecordingVideoCallback)
 
void StopVideoModeAsync (OnVideoModeStoppedCallback onVideoModeStoppedCallback)
 
delegate void OnStartedRecordingVideoCallback (VideoCaptureResult result)
 
delegate void OnVideoCaptureResourceCreatedCallback (XREALVideoCapture captureObject)
 
delegate void OnVideoModeStartedCallback (VideoCaptureResult result)
 
delegate void OnVideoModeStoppedCallback (VideoCaptureResult result)
 
delegate void OnStoppedRecordingVideoCallback (VideoCaptureResult result)
 

Static Public Member Functions

static void CreateAsync (bool showHolograms, OnVideoCaptureResourceCreatedCallback onCreatedCallback)
 
static IEnumerable< int > GetSupportedFrameRatesForResolution (Resolution resolution)
 

Properties

static IEnumerable< Resolution > SupportedResolutions [get]
 
bool IsRecording [get]
 

Detailed Description

Records a video from the MR images directly to disk. MR images comes from rgb camera or rgb camera image and virtual image blending. The final video recording will be stored on the file system in the MP4 format.

Member Function Documentation

◆ CreateAsync()

static void Unity.XR.XREAL.XREALVideoCapture.CreateAsync ( bool showHolograms,
OnVideoCaptureResourceCreatedCallback onCreatedCallback )
static

Creates an asynchronous.

Parameters
showHologramsTrue to show, false to hide the holograms.
onCreatedCallbackThe on created callback.

◆ GetContext()

FrameCaptureContext Unity.XR.XREAL.XREALVideoCapture.GetContext ( )

Gets the context.

Returns
The context.

◆ GetSupportedFrameRatesForResolution()

static IEnumerable< int > Unity.XR.XREAL.XREALVideoCapture.GetSupportedFrameRatesForResolution ( Resolution resolution)
static

Returns the supported frame rates at which a video can be recorded given a resolution.

Parameters
resolutionA recording resolution.
Returns
The frame rates at which the video can be recorded.

◆ OnStartedRecordingVideoCallback()

delegate void Unity.XR.XREAL.XREALVideoCapture.OnStartedRecordingVideoCallback ( VideoCaptureResult result)

Called when the web camera begins recording the video.

Parameters
resultIndicates whether or not video recording started successfully.

◆ OnStoppedRecordingVideoCallback()

delegate void Unity.XR.XREAL.XREALVideoCapture.OnStoppedRecordingVideoCallback ( VideoCaptureResult result)

Called when the video recording has been saved to the file system.

Parameters
resultIndicates whether or not video recording was saved successfully to the file system.

◆ OnVideoCaptureResourceCreatedCallback()

delegate void Unity.XR.XREAL.XREALVideoCapture.OnVideoCaptureResourceCreatedCallback ( XREALVideoCapture captureObject)

Called when a VideoCapture resource has been created.

Parameters
captureObjectThe VideoCapture instance.

◆ OnVideoModeStartedCallback()

delegate void Unity.XR.XREAL.XREALVideoCapture.OnVideoModeStartedCallback ( VideoCaptureResult result)

Called when video mode has been started.

Parameters
resultIndicates whether or not video mode was successfully activated.

◆ OnVideoModeStoppedCallback()

delegate void Unity.XR.XREAL.XREALVideoCapture.OnVideoModeStoppedCallback ( VideoCaptureResult result)

Called when video mode has been stopped.

Parameters
resultIndicates whether or not video mode was successfully deactivated.

◆ StartRecordingAsync() [1/2]

void Unity.XR.XREAL.XREALVideoCapture.StartRecordingAsync ( string filename,
OnStartedRecordingVideoCallback onStartedRecordingVideoCallback )

Starts recording asynchronous.

Parameters
filenameFilename of the file.
onStartedRecordingVideoCallbackThe on started recording video callback.

◆ StartRecordingAsync() [2/2]

void Unity.XR.XREAL.XREALVideoCapture.StartRecordingAsync ( string filename,
OnStartedRecordingVideoCallback onStartedRecordingVideoCallback,
float volumeFactorMic,
float volumeFactorApp )

Starts recording asynchronous.

Parameters
filenameFilename of the file.
onStartedRecordingVideoCallbackThe on started recording video callback.
volumeFactorMicThe volume factor of mic.
volumeFactorAppThe volume factor of application.

◆ StartVideoModeAsync()

void Unity.XR.XREAL.XREALVideoCapture.StartVideoModeAsync ( CameraParameters setupParams,
OnVideoModeStartedCallback onVideoModeStartedCallback,
bool autoAdaptBlendMode = false )

Starts video mode asynchronous.

Parameters
setupParamsOptions for controlling the setup.
onVideoModeStartedCallbackThe on video mode started callback.
autoAdaptBlendModeAuto adaption for BlendMode based on supported feature on current device.

◆ StopRecordingAsync()

void Unity.XR.XREAL.XREALVideoCapture.StopRecordingAsync ( OnStoppedRecordingVideoCallback onStoppedRecordingVideoCallback)

Stops recording asynchronous.

Parameters
onStoppedRecordingVideoCallbackThe on stopped recording video callback.

◆ StopVideoModeAsync()

void Unity.XR.XREAL.XREALVideoCapture.StopVideoModeAsync ( OnVideoModeStoppedCallback onVideoModeStoppedCallback)

Stops video mode asynchronous.

Parameters
onVideoModeStoppedCallbackThe on video mode stopped callback.

Property Documentation

◆ IsRecording

bool Unity.XR.XREAL.XREALVideoCapture.IsRecording
get

Indicates whether or not the VideoCapture instance is currently recording video.

True if this object is recording, false if not.

◆ SupportedResolutions

IEnumerable<Resolution> Unity.XR.XREAL.XREALVideoCapture.SupportedResolutions
staticget

A list of all the supported device resolutions for recording videos.

The supported resolutions.