OMIDIV
VideoRecorder Class Reference

A component that bridges FFmpegWrapper2 into Unity and the OMIDIV environment. More...

Inheritance diagram for VideoRecorder:
OmidivComponent

Public Types

enum  Status { Standby , Recording , Processing , ProcessingBackground }
 

Public Member Functions

void StartIfEnabled ()
 
void StopIfEnabled ()
 
void StartRecording ()
 
void StopRecording ()
 

Static Public Member Functions

static Status GetStatus ()
 

Protected Member Functions

override void OnEnable ()
 
override void OnDisable ()
 
override void OnDestroy ()
 
override void OnPlayStart ()
 Override this. Called when the visualization starts playing. May be starting from the beginning or resuming.
 
override void OnPlayStop ()
 Override this. Called when the visualization stops playing.
 
override void Restart ()
 Override this. Called when the visualization restarts (R is pressed).
 
override void DrawGUI ()
 Override this. Use ImGui to draw most UI elements here.
 
- Protected Member Functions inherited from OmidivComponent
virtual void Awake ()
 
virtual void ReadConfig ()
 Override this. Read from Config here.
Don't forget to include ConfigTag in your config keys.
 
virtual void WriteConfig ()
 Override this. Write to Config here.
Don't forget to include ConfigTag in your config keys.
 
virtual void Reset_ ()
 Override this. Called when SceneController.OnReset is fired. LoadAudio and LoadMidi will also be called afterwards, so don't do any of that here, but do reload any other resources your component needs.
 
virtual void LoadMidi ()
 Override this. Called when the midi information needs to be loaded from the file. LoadVisuals will also be called afterwards, so don't do any of that here.
 
virtual void LoadVisuals ()
 Override this. Called when the visuals need to be recreated (like when something in the MIDI Controls window is changed).
 
virtual void LoadAudio ()
 Override this. Called when the audio needs to be loaded from the file.
 

Properties

static double FrameDeltaTime_src [get]
 This is the source of the custom frame delta used by Omidiv.
 
static bool RecordingEnabled = false [get, set]
 
static double FrameRate [get]
 
bool AutoHideUI [get, set]
 Whether to disable the UI when recording begins.
 
- Properties inherited from OmidivComponent
static bool IsPlaying [get]
 Is the visualization currently playing.
 
static double FrameDeltaTime [get]
 Time.deltaTime when not recording, 1/recording framerate when recording. In most cases, use this instead of Time.deltaTime so that recordings work properly.
 

Events

static Action OnRecordingBegin
 
static Action OnBeforeFrame
 
static Action OnAfterFrame
 
static Action OnRecordingEnd
 

Additional Inherited Members

- Public Attributes inherited from OmidivComponent
string ConfigTag = "def"
 Use this to give different instances in difference scenes different saved config.

 

Detailed Description

A component that bridges FFmpegWrapper2 into Unity and the OMIDIV environment.

Member Function Documentation

◆ DrawGUI()

override void VideoRecorder.DrawGUI ( )
protectedvirtual

Override this. Use ImGui to draw most UI elements here.

Subscribe to ImGuiManager.DrawMainMenuItems to add to main menu bar menus instead of here.

Reimplemented from OmidivComponent.

◆ OnDestroy()

override void VideoRecorder.OnDestroy ( )
protectedvirtual

Please call base.OnDestroy() if overriding this, unless you really know what you're doing.

Reimplemented from OmidivComponent.

◆ OnDisable()

override void VideoRecorder.OnDisable ( )
protectedvirtual

Please call base.OnDisable() if overriding this, unless you really know what you're doing.

Reimplemented from OmidivComponent.

◆ OnEnable()

override void VideoRecorder.OnEnable ( )
protectedvirtual

Please call base.OnEnable() if overriding this, unless you really know what you're doing.

Reimplemented from OmidivComponent.

◆ OnPlayStart()

override void VideoRecorder.OnPlayStart ( )
protectedvirtual

Override this. Called when the visualization starts playing. May be starting from the beginning or resuming.

Reimplemented from OmidivComponent.

◆ OnPlayStop()

override void VideoRecorder.OnPlayStop ( )
protectedvirtual

Override this. Called when the visualization stops playing.

Reimplemented from OmidivComponent.

◆ Restart()

override void VideoRecorder.Restart ( )
protectedvirtual

Override this. Called when the visualization restarts (R is pressed).

Reimplemented from OmidivComponent.

Property Documentation

◆ FrameDeltaTime_src

double VideoRecorder.FrameDeltaTime_src
staticget

This is the source of the custom frame delta used by Omidiv.

See also
OmidivComponent.FrameDeltaTime, SceneController.FrameDeltaTime

The documentation for this class was generated from the following file: