All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
Session Recorder Controller

Classes

struct  VuRecordingConfig
 Configuration options for a recording session. More...
 

Typedefs

typedef struct VuRecording_ VuRecording
 Recording instance.
 
typedef struct VuRecordingList_ VuRecordingList
 Recording list handle.
 
typedef VuFlags VuRecordingDataFlags
 Bitflag defining a collection of data flags.
 

Enumerations

enum  VuRecordingCreationError : int32_t {
  VU_RECORDING_CREATION_ERROR_NONE = 0x0 ,
  VU_RECORDING_CREATION_ERROR_DATA_FLAGS_NOT_SUPPORTED ,
  VU_RECORDING_CREATION_ERROR_AUTOSTART_FAILED = 0x2
}
 Recording creation error. More...
 
enum  VuRecordingStartError : int32_t {
  VU_RECORDING_START_ERROR_NONE = 0x0 ,
  VU_RECORDING_START_ERROR_INTERNAL ,
  VU_RECORDING_START_ERROR_ANOTHER_RECORDING_RUNNING = 0x2 ,
  VU_RECORDING_START_ERROR_ENGINE_NOT_RUNNING = 0x3 ,
  VU_RECORDING_START_ERROR_INVALID_STATUS ,
  VU_RECORDING_START_ERROR_FILE_CREATION = 0x5 ,
  VU_RECORDING_START_ERROR_UNKNOWN_ORIENTATION = 0x6 ,
  VU_RECORDING_START_ERROR_DATA_SOURCE ,
  VU_RECORDING_START_ERROR_INSUFFICIENT_FREE_SPACE
}
 Recording start error. More...
 
enum  VuRecordingStatus : int32_t {
  VU_RECORDING_STATUS_INITIALIZED = 0x1 ,
  VU_RECORDING_STATUS_RUNNING = 0x2 ,
  VU_RECORDING_STATUS_STOPPED = 0x3
}
 Session recording status. More...
 
enum  VuRecordingStatusInfo : int32_t {
  VU_RECORDING_STATUS_INFO_NORMAL = 0x0 ,
  VU_RECORDING_STATUS_INFO_SUCCESS = 0x1 ,
  VU_RECORDING_STATUS_INFO_ERROR_INTERNAL ,
  VU_RECORDING_STATUS_INFO_ERROR_ORIENTATION_CHANGED = 0x3 ,
  VU_RECORDING_STATUS_INFO_ERROR_DATA_SOURCE = 0x4 ,
  VU_RECORDING_STATUS_INFO_ERROR_INSUFFICIENT_FREE_SPACE
}
 Session recording status info. More...
 
enum  VuRecordingDataFlagBits : int32_t {
  VU_RECORDING_DATA_VIDEO_BIT = 0x01 ,
  VU_RECORDING_DATA_CAMERA_METADATA_BIT = 0x02 ,
  VU_RECORDING_DATA_SENSORS_BIT = 0x04 ,
  VU_RECORDING_DATA_DEVICE_POSE_BIT = 0x08 ,
  VU_RECORDING_DATA_AUDIO_BIT = 0x10
}
 Flags that specify which data should be recorded. More...
 
enum  VuRecordingFrameRate : int32_t {
  VU_RECORDING_FRAME_RATE_AUTO = 0x1 ,
  VU_RECORDING_FRAME_RATE_FULL = 0x2 ,
  VU_RECORDING_FRAME_RATE_HALF = 0x3
}
 The frame rate at which camera images are recorded. More...
 
enum  VuRecordingImageScale : int32_t {
  VU_RECORDING_IMAGE_SCALE_AUTO = 0x1 ,
  VU_RECORDING_IMAGE_SCALE_FULL = 0x2 ,
  VU_RECORDING_IMAGE_SCALE_HALF = 0x3
}
 The scale factor to be applied to camera images before recording. More...
 
enum  VuRecordingVideoEncodingQuality : int32_t {
  VU_RECORDING_VIDEO_ENCODING_QUALITY_HIGH = 0x1 ,
  VU_RECORDING_VIDEO_ENCODING_QUALITY_MEDIUM = 0x2
}
 Quality settings used for encoding the recorded video. More...
 
enum  VuRecordingFormat : int32_t { VU_RECORDING_FORMAT_DEFAULT = 0x1 }
 Session recording format. More...
 

Functions

VuRecordingConfig vuRecordingConfigDefault ()
 Default configuration for a recording session.
 
VuResult vuEngineGetSessionRecorderController (const VuEngine *engine, VuController **controller)
 Retrieve Session Recorder Controller to get access to session recording-specific functionality in Engine.
 
VuResult vuSessionRecorderControllerGetDefaultRecordingDataFlags (const VuController *controller, VuRecordingDataFlags *dataFlags)
 Get the default recording data flags that are appropriate for the current device.
 
VuResult vuSessionRecorderControllerGetSupportedRecordingDataFlags (const VuController *controller, VuRecordingDataFlags *dataFlags)
 Get all recording data flags that are supported by the current device.
 
VuResult vuSessionRecorderControllerGetDefaultRecordingFrameRate (const VuController *controller, VuRecordingFrameRate *frameRate)
 Get the default camera recording frame rate.
 
VuResult vuSessionRecorderControllerGetDefaultRecordingImageScale (const VuController *controller, VuRecordingImageScale *scale)
 Get the default recording image scale.
 
VuResult vuSessionRecorderControllerCreateRecording (VuController *controller, const VuRecordingConfig *config, VuRecording **recording, VuRecordingCreationError *error)
 Create a new recording with the specified configuration.
 
VuResult vuSessionRecorderControllerGetRecordings (const VuController *controller, VuRecordingList *recordingList)
 Get a list of all recordings from the controller.
 
VuResult vuSessionRecorderControllerDestroyRecordings (VuController *controller, VuBool deleteData)
 Destroy all recordings.
 
VuResult vuSessionRecorderControllerCleanRecordedData (VuController *controller)
 Remove all previously recorded sequences from the device storage.
 
VuResult vuRecordingStart (VuRecording *recording, VuRecordingStartError *error)
 Start the recording.
 
VuResult vuRecordingStop (VuRecording *recording)
 Stop the current recording.
 
VuResult vuRecordingGetPath (const VuRecording *recording, const char **path)
 Get the path where the data for this recording is stored.
 
VuResult vuRecordingGetStatus (const VuRecording *recording, VuRecordingStatus *status)
 Get the status of a recording.
 
VuResult vuRecordingGetStatusInfo (const VuRecording *recording, VuRecordingStatusInfo *statusInfo)
 Get additional status info about a recording.
 
VuResult vuRecordingDestroy (VuRecording *recording, VuBool deleteData)
 Destroy a recording instance.
 
VuResult vuRecordingListCreate (VuRecordingList **list)
 Create a recording list.
 
VuResult vuRecordingListGetSize (const VuRecordingList *list, int32_t *listSize)
 Get the number of elements in a recording list.
 
VuResult vuRecordingListGetElement (const VuRecordingList *list, int32_t element, VuRecording **recording)
 Get an element in a recording list.
 
VuResult vuRecordingListDestroy (VuRecordingList *list)
 Destroy a recording list.
 

Detailed Description

This controller facilitates recording data from data sources such as on-device camera and sensors while running Vuforia.

Permissions

In order to support audio recording capabilities in the Session Recorder Controller, your App must fulfill audio-related, platform-specific permission / configuration requirements. Your App is responsible for executing the following platform-specific actions prior to invoking Session Recorder Controller API functions relying on information whether audio recording is enabled in the app:

If the aforementioned platform-specific permission / configuration requirements are not fulfilled by the App, then

Enumeration Type Documentation

◆ VuRecordingCreationError

enum VuRecordingCreationError : int32_t

Recording creation error.

Enumerator
VU_RECORDING_CREATION_ERROR_NONE 

No error.

VU_RECORDING_CREATION_ERROR_DATA_FLAGS_NOT_SUPPORTED 

One or more requested data flags are not supported on the current device.

VU_RECORDING_CREATION_ERROR_AUTOSTART_FAILED 

Auto-start of the recording failed.

◆ VuRecordingStartError

enum VuRecordingStartError : int32_t

Recording start error.

Enumerator
VU_RECORDING_START_ERROR_NONE 

No error.

VU_RECORDING_START_ERROR_INTERNAL 

Starting failed due to an internal error. Please check the device logs for additional information.

VU_RECORDING_START_ERROR_ANOTHER_RECORDING_RUNNING 

Failed to start a recording because another recording is already in progress. Stop the other recording before starting a new one.

VU_RECORDING_START_ERROR_ENGINE_NOT_RUNNING 

Recording cannot be started as the engine is not running.

VU_RECORDING_START_ERROR_INVALID_STATUS 

Cannot start a recording that is not in the initialized state. The user should create a new recording.

VU_RECORDING_START_ERROR_FILE_CREATION 

Cannot start the recording because the output file could not be created.

VU_RECORDING_START_ERROR_UNKNOWN_ORIENTATION 

Device is in an unknown orientation.

VU_RECORDING_START_ERROR_DATA_SOURCE 

Failed to start recording from some of the selected data sources. This could happen if e.g. another application has exclusive access to a source, or required platform-specific permission / configuration requirements haven't been fulfilled by the App

VU_RECORDING_START_ERROR_INSUFFICIENT_FREE_SPACE 

Cannot start a recording as there isn't sufficient free space on the device to store it.

◆ VuRecordingStatus

enum VuRecordingStatus : int32_t

Session recording status.

Enumerator
VU_RECORDING_STATUS_INITIALIZED 

The recording has been created and can be started.

VU_RECORDING_STATUS_RUNNING 

The recording is in progress.

VU_RECORDING_STATUS_STOPPED 

The recording has stopped. It cannot be started again. Check the status info for error details.

◆ VuRecordingStatusInfo

enum VuRecordingStatusInfo : int32_t

Session recording status info.

Enumerator
VU_RECORDING_STATUS_INFO_NORMAL 

Normal operation. No error has occurred.

VU_RECORDING_STATUS_INFO_SUCCESS 

The recording completed successfully.

VU_RECORDING_STATUS_INFO_ERROR_INTERNAL 

Recording was aborted due to an internal error. Please check the device logs for additional information.

VU_RECORDING_STATUS_INFO_ERROR_ORIENTATION_CHANGED 

The device orientation changed during recording.

VU_RECORDING_STATUS_INFO_ERROR_DATA_SOURCE 

Recording from some of the selected data sources failed.

VU_RECORDING_STATUS_INFO_ERROR_INSUFFICIENT_FREE_SPACE 

The recording stopped as there isn't sufficient free space on the device to store it.

◆ VuRecordingDataFlagBits

enum VuRecordingDataFlagBits : int32_t

Flags that specify which data should be recorded.

Note
Use vuSessionRecorderControllerGetDefaultDataFlags() to get the default data flags that are appropriate for the current device to create a recording that can be used for AR session playback.
Enumerator
VU_RECORDING_DATA_VIDEO_BIT 

Camera images.

VU_RECORDING_DATA_CAMERA_METADATA_BIT 

Camera metadata required for AR session playback.

VU_RECORDING_DATA_SENSORS_BIT 

Data from device sensors (accelerometer, gyroscope and magnetometer) depending on which are available on the current device

VU_RECORDING_DATA_DEVICE_POSE_BIT 

Device poses generated by the platform-provided Vuforia Fusion provider.

VU_RECORDING_DATA_AUDIO_BIT 

Audio recording from the default audio input device.

◆ VuRecordingFrameRate

enum VuRecordingFrameRate : int32_t

The frame rate at which camera images are recorded.

Enumerator
VU_RECORDING_FRAME_RATE_AUTO 

Let Vuforia automatically choose the option that will provide the best performance during recording. This is the default

VU_RECORDING_FRAME_RATE_FULL 

Record camera images at the full frame rate of the camera.

VU_RECORDING_FRAME_RATE_HALF 

Record camera images at half the frame rate of the camera.

◆ VuRecordingImageScale

enum VuRecordingImageScale : int32_t

The scale factor to be applied to camera images before recording.

Enumerator
VU_RECORDING_IMAGE_SCALE_AUTO 

Let Vuforia automatically choose the option that will provide the best performance during recording. This is the default

VU_RECORDING_IMAGE_SCALE_FULL 

Record camera images at full resolution.

VU_RECORDING_IMAGE_SCALE_HALF 

Downsample camera images to half size along both dimensions.

◆ VuRecordingVideoEncodingQuality

Quality settings used for encoding the recorded video.

Enumerator
VU_RECORDING_VIDEO_ENCODING_QUALITY_HIGH 

High quality video encoding with minimal compression artifacts. Recordings with this setting are suitable for playback as AR sessions, but will have an increased file size. This is the default. (approx. 15MBit/s video bitrate for 720p@30 video)

VU_RECORDING_VIDEO_ENCODING_QUALITY_MEDIUM 

Medium quality video encoding for general purpose video recording. (approx. 5MBit/s video bitrate for 720p@30 video)

◆ VuRecordingFormat

enum VuRecordingFormat : int32_t

Session recording format.

Note
Only one format is currently supported. Others might be added in the future.
Enumerator
VU_RECORDING_FORMAT_DEFAULT 

Default format. MP4 file with H.264 compressed video.

Function Documentation

◆ vuRecordingConfigDefault()

VuRecordingConfig vuRecordingConfigDefault ( )

Default configuration for a recording session.

Note
Use this function to initialize the VuRecordingConfig data structure with default values.

◆ vuSessionRecorderControllerGetDefaultRecordingDataFlags()

VuResult vuSessionRecorderControllerGetDefaultRecordingDataFlags ( const VuController * controller,
VuRecordingDataFlags * dataFlags )

Get the default recording data flags that are appropriate for the current device.

Note
The flags returned by this function will configure a recording with all data required for playing it back as an AR session.
The flags returned by this function depend on the current VuFusionProviderType.
Parameters
controllerSession Recorder Controller
dataFlagsOutput variable storing the default data flags bitmask
Returns
VU_SUCCESS on successful retrieval of the data flags, VU_FAILED on failure

◆ vuSessionRecorderControllerGetSupportedRecordingDataFlags()

VuResult vuSessionRecorderControllerGetSupportedRecordingDataFlags ( const VuController * controller,
VuRecordingDataFlags * dataFlags )

Get all recording data flags that are supported by the current device.

Parameters
controllerSession Recorder Controller
dataFlagsOutput variable storing the data flags bitmask
Returns
VU_SUCCESS on successful retrieval of the data flags, VU_FAILED on failure

◆ vuSessionRecorderControllerGetDefaultRecordingFrameRate()

VuResult vuSessionRecorderControllerGetDefaultRecordingFrameRate ( const VuController * controller,
VuRecordingFrameRate * frameRate )

Get the default camera recording frame rate.

Note
This function will return the recommended default recording frame rate setting.
This method can only be called while the engine is running.

The output value will always be an explicit one (i.e. never VU_RECORDING_FRAME_RATE_AUTO) so the caller can determine the specific value being used for recording.

◆ vuSessionRecorderControllerGetDefaultRecordingImageScale()

VuResult vuSessionRecorderControllerGetDefaultRecordingImageScale ( const VuController * controller,
VuRecordingImageScale * scale )

Get the default recording image scale.

Note
This function will return the recommended default recording image scale setting.
This method can only be called while the engine is running.

The output value will always be an explicit one (i.e. never VU_RECORDING_IMAGE_SCALE_AUTO) so the caller can determine the specific value being used for recording.

◆ vuSessionRecorderControllerCreateRecording()

VuResult vuSessionRecorderControllerCreateRecording ( VuController * controller,
const VuRecordingConfig * config,
VuRecording ** recording,
VuRecordingCreationError * error )

Create a new recording with the specified configuration.

Note
If "start" is set to VU_TRUE in the recording configuration and another recording is already running, this call will fail. Any previously started recording needs to be stopped first.
Parameters
controllerSession Recorder Controller
configThe configuration for the new recording
recordingOutput variable storing the newly created recording
errorOptional output variable providing additional error information. Can be NULL.
Returns
VU_SUCCESS on successfully creation of the recording, VU_FAILED on failure

◆ vuSessionRecorderControllerGetRecordings()

VuResult vuSessionRecorderControllerGetRecordings ( const VuController * controller,
VuRecordingList * recordingList )

Get a list of all recordings from the controller.

Parameters
controllerSession Recorder Controller
recordingListList that will be filled with the recordings
Returns
VU_SUCCESS on success, or VU_FAILED otherwise

◆ vuSessionRecorderControllerDestroyRecordings()

VuResult vuSessionRecorderControllerDestroyRecordings ( VuController * controller,
VuBool deleteData )

Destroy all recordings.

This call will also stop any ongoing recording.

Parameters
controllerSession Recorder Controller
deleteDataSet to VU_TRUE to delete all data generated by the recording instances before their destruction
Returns
VU_SUCCESS on success, or VU_FAILED otherwise

◆ vuSessionRecorderControllerCleanRecordedData()

VuResult vuSessionRecorderControllerCleanRecordedData ( VuController * controller)

Remove all previously recorded sequences from the device storage.

Note
This call can only be used when no recording instances exist. Stop any running recording and destroy all recording instances before calling this.
Parameters
controllerSession Recorder Controller
Returns
VU_SUCCESS if all recorded data was removed successfully, or VU_FAILED otherwise

◆ vuRecordingStart()

VuResult vuRecordingStart ( VuRecording * recording,
VuRecordingStartError * error )

Start the recording.

Note
If another recording is already running, this call will fail. Any previously started recording needs to be stopped first.
Session Recorder does not support changes in device orientation during recording. If the device orientation changes while a recording is running, it will be automatically stopped.
Calling this on a recording that is already running or has already been stopped will return VU_FAILED with error VU_RECORDING_START_ERROR_INVALID_STATUS.
Parameters
recordingThe current recording
errorOptional output variable providing additional error information. Can be NULL.
Returns
VU_SUCCESS on successfully start of the recording, VU_FAILED on failure

◆ vuRecordingStop()

VuResult vuRecordingStop ( VuRecording * recording)

Stop the current recording.

Note
The recording will be stopped automatically when vuEngineStop() is called or when it is destroyed.
Calling this on a recording that is not running will return VU_FAILED
Parameters
recordingThe current recording
Returns
VU_SUCCESS on successfully stopping the recording, VU_FAILED on failure

◆ vuRecordingGetPath()

VuResult vuRecordingGetPath ( const VuRecording * recording,
const char ** path )

Get the path where the data for this recording is stored.

Note
The recording path is only available after the recording has been started successfully.
The string returned from this function is only valid for the lifetime of the recording instance. Please create a copy of the string data if you want to keep it beyond the lifetime of the recording.
Parameters
recordingThe current recording
pathThe absolute path to where the recording is stored. The parameter will stay unmodified on failure.
Returns
VU_SUCCESS on successful retrieval of the path, VU_FAILED if no recording path is available.

◆ vuRecordingGetStatus()

VuResult vuRecordingGetStatus ( const VuRecording * recording,
VuRecordingStatus * status )

Get the status of a recording.

Parameters
recordingThe current recording
statusCurrent recording status
Returns
VU_SUCCESS on successfully getting status, VU_FAILED on failure

◆ vuRecordingGetStatusInfo()

VuResult vuRecordingGetStatusInfo ( const VuRecording * recording,
VuRecordingStatusInfo * statusInfo )

Get additional status info about a recording.

Parameters
recordingThe current recording
statusInfoCurrent recording status info
Returns
VU_SUCCESS on successfully getting status info, VU_FAILED on failure

◆ vuRecordingDestroy()

VuResult vuRecordingDestroy ( VuRecording * recording,
VuBool deleteData )

Destroy a recording instance.

Note
The recording will be stopped if it is running.
Parameters
recordingRecording instance
deleteDataIf set to VU_TRUE, the recorded data in device storage will be deleted as well
Returns
VU_SUCCESS on success, VU_FAILED on failure