DiveFFIObslib extension

Connects to obslib using FFI. Will load the obslib library, load modules, reset video and audio, and create the streaming service.

on

Properties

inputTypes List<Map<String, String>>
Get a list of input types. Returns array of dictionaries with keys id and name.
no setter

Methods

audioInputs() List<Map<String, String>>
Get a list of video capture inputs from input type coreaudio_input_capture. @return array of dictionaries with keys id and name.
audioMonitoringDevices() List<Map<String, String>>
Get a list of the audio monitoring devices. Returns an array of maps with keys id and name.
audioSetDefaultMonitoringDevice() bool
audioSetMonitoringDevice(String name, String id) bool
Set the audio monitoring device.
changeScene(DivePointer scene) → void
Set the scene as the primary draw source.
createData() DiveObslibData
Use this convenience method to create a data object for settings.
createImageSource(String sourceUuid, String file) DivePointer?
createMediaSource({required String sourceUuid, required String name, required DiveObslibData settings}) DivePointer?
Load media source
createScene(String trackingUUID, String sceneName) DivePointer?
createSource({required String sourceUuid, required String inputTypeId, required String name, required DiveObslibData settings}) DivePointer?
Creates a source of the specified type with the specified settings.
createVideoSource(String sourceUuid, String deviceName, String deviceUid) DivePointer?
deleteScene(DivePointer scene) → void
fromDb(double value) double
Convert dB to value.
inputsFromType(String inputTypeId) List<Map<String, String>>
Get a list of inputs from input type. Returns an array of maps with keys id and name.
loadAllModules() bool
logVideoActive() → void
mediaSourceGetDuration(DivePointer source) int
Media control: get time
mediaSourceGetState(DivePointer source) int
Media control: get state
mediaSourceGetTime(DivePointer source) int
Media control: get time
mediaSourcePlayPause(DivePointer source, bool pause) → void
Media Controls TODO: implement signals from media source: obs_source_get_signal_handler Media control: play_pause
mediaSourceRestart(DivePointer source) → void
Media control: restart
mediaSourceSetTime(DivePointer source, int ms) → void
Media control: set time
mediaSourceStop(DivePointer source) → void
Media control: stop
outputGetState(DivePointerOutput output) int
Get the output state: 0 (stopped), 1 (active), 2 (paused), or 3 (reconnecting)
outputRelease(DivePointerOutput output) bool
Release the output.
outputStart(DivePointerOutput output) bool
Start the output.
outputStop(DivePointerOutput output) → void
Stop the output.
recordingOutputCreate({required String path, required String outputName, String outputType = 'ffmpeg_muxer'}) DivePointerOutput?
Recording Controls Create the recording output at the specified path, Returns a pointer or null.
releaseSource(DivePointer source) → void
Releases a reference to a source. When the last reference is released, the source is destroyed.
resetAudio() bool
resetVideo(int baseWidth, int baseHeight, int outWidth, int outHeight, int fpsNumerator, int fpsDenominator) bool
Reset OBS video.
sceneAddSource(DivePointer scene, DivePointer source) DivePointerSceneItem
Add an existing source to an existing scene, and return sceneitem id.
sceneItemGetInfo(DivePointerSceneItem item) Map
Get the transform info for a scene item. TODO: this does not work because of FFI struct issues.
sceneItemIsVisible(DivePointerSceneItem item) bool
sceneItemRemove(DivePointerSceneItem item) → void
Remove an existing scene item from a scene.
sceneItemSetOrder(DivePointerSceneItem item, int movement) → void
sceneItemSetVisible(DivePointerSceneItem item, bool visible) bool
shutdown() → void
sourceGetMonitoringType(DivePointer source) int
Get the monitoring type for a source.
sourceGetVolume(DivePointer source) double
Get the volume level (dB) for a source.
sources() → void
Print out a list of active sources.
sourceSetMonitoringType(DivePointer source, {int type = obs_monitoring_type.OBS_MONITORING_TYPE_MONITOR_AND_OUTPUT, bool muted = false}) → void
Set the monitoring type for a source.
sourceSetVolume(DivePointer source, double levelDb) → void
Set the volume level (dB) for a source.
sourceTypes() List<Map<String, String>>
streamOutputCreate({required String serviceName, required String serviceUrl, required String serviceKey, String serviceId = 'rtmp_common', String outputType = 'rtmp_output'}) DivePointerOutput?
Stream Controls Create the stream output. Returns a pointer or null.
streamOutputGetServiceNames({String serviceId = "rtmp_common", bool commonNamesOnly = true}) List<String>
Get the list of the streaming service names. When commonNamesOnly is true (default) it returns only the common services, and when false it returns all services. Returns a list of service names.
streamOutputGetServiceServers({String serviceId = "rtmp_common", required String serviceName}) Map<String, String>
Get the list of the servers for a streaming service. Returns a map with key as name and value as server url.
toDb(double value) double
Convert value to dB.
videoGetInfo() Map<String, dynamic>?
Gets the current video settings, returns null if no video.
videoInputs() List<Map<String, String>>
Get a list of video capture inputs from input type av_capture_input. Returns an array of maps with keys id and name.
volumeMeterAttachSource(DivePointer volumeMeter, DivePointer source) bool
Attache a source to a volume meter.
volumeMeterCreate({int faderType = obs_fader_type.OBS_FADER_LOG}) DivePointer
Create a volume meter.
volumeMeterDestroy(DivePointer volumeMeter) → void
Destroy a volume meter.
volumeMeterGetNumberChannels(DivePointer volumeMeter) int
Get the number of channels which are configured for this source.
volumeMeterSetPeakMeterType(DivePointer volumeMeter, {int meterType = obs_peak_meter_type.SAMPLE_PEAK_METER}) → void
Set the peak meter type for the volume meter.

Static Methods

initialize() → void