Interface OutputManager
public interface OutputManager
Artist-facing control, routing, and telemetry for external frame publication.
Obtain this interface from
ziviDomeLive.getOutputManager(); applications do not
construct output backends. NDI, Spout, and Syphon start disabled. Each transport keeps an
independent ViewType route while global dedicated render modes may temporarily override
the effective view.
Mutating operations are intended for the Processing frame thread. NDI publication uses a
bounded worker queue; disabling NDI requests an asynchronous stop and may temporarily report
OutputManager.OutputState.STOPPING.
API stability: Advanced Stable.
- Since:
- 2.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumObservable lifecycle state of one output transport.static enumExternal transports supported by the core output coordinator. -
Method Summary
Modifier and TypeMethodDescriptionlonglonglonglonggetOutputFailureReason(OutputManager.OutputType outputType) getOutputState(OutputManager.OutputType outputType) getViewForOutput(OutputManager.OutputType outputType) Returns the independently configured route for one transport.booleanisActive()booleanbooleanbooleanbooleanisOutputEnabled(OutputManager.OutputType outputType) booleanbooleanvoidsetLocalTextureView(ViewType view) Selects the logical view for the platform-local texture-sharing backend.voidsetNdiFrameRate(int numerator, int denominator) Sets rational frame-rate metadata for subsequently captured NDI frames.voidsetNdiView(ViewType view) voidsetOutputEnabled(OutputManager.OutputType outputType, boolean enabled) Enables or disables one transport.voidsetSpoutView(ViewType view) voidsetSyphonView(ViewType view) voidsetViewForOutput(OutputManager.OutputType outputType, ViewType viewType) Selects the logical view routed to one transport.voidtoggleOutput(OutputManager.OutputType outputType) Toggles one transport's enabled state.
-
Method Details
-
getViewForOutput
Returns the independently configured route for one transport.- Parameters:
outputType- transport to inspect- Returns:
- configured view, or
ViewType.DOMEMASTERwhenoutputTypeis null
-
setViewForOutput
Selects the logical view routed to one transport.- Parameters:
outputType- transport to configure; a null value is ignoredviewType- logical view to publish; a null value is ignored
-
setNdiView
- Parameters:
view- logical view routed to NDI;nullis ignored
-
setSpoutView
- Parameters:
view- logical view routed to Spout;nullis ignored
-
setSyphonView
- Parameters:
view- logical view routed to Syphon;nullis ignored
-
setLocalTextureView
Selects the logical view for the platform-local texture-sharing backend.- Parameters:
view- view routed to Spout on Windows or Syphon on macOS;nullis ignored
-
getLocalTextureView
ViewType getLocalTextureView()- Returns:
- Spout's configured view on Windows, Syphon's on macOS, or
ViewType.DOMEMASTERwhen no local backend exists
-
setOutputEnabled
Enables or disables one transport.- Parameters:
outputType- non-null transportenabled-trueto enable publication- Throws:
IllegalArgumentException- whenoutputTypeis null
-
isOutputEnabled
- Parameters:
outputType- non-null transport- Returns:
trueonly while that transport is enabled- Throws:
IllegalArgumentException- whenoutputTypeis null
-
toggleOutput
Toggles one transport's enabled state.- Parameters:
outputType- non-null transport- Throws:
IllegalArgumentException- whenoutputTypeis null
-
getOutputState
- Parameters:
outputType- transport to inspect- Returns:
- current lifecycle state, or
OutputManager.OutputState.UNAVAILABLEfor null
-
getOutputFailureReason
- Parameters:
outputType- transport to inspect- Returns:
- latest backend failure reason, or an empty string when none is recorded
-
isNdiEnabled
boolean isNdiEnabled()- Returns:
- whether NDI publication is enabled
-
isSpoutEnabled
boolean isSpoutEnabled()- Returns:
- whether Windows Spout publication is initialized and enabled
-
isSyphonEnabled
boolean isSyphonEnabled()- Returns:
- whether macOS Syphon publication is initialized and enabled
-
isLocalTextureAvailable
boolean isLocalTextureAvailable()- Returns:
- whether this platform has a usable Spout or Syphon backend
-
isLocalTextureInitialized
boolean isLocalTextureInitialized()- Returns:
- whether the platform-local backend has prepared native resources
-
getLocalTextureBackendName
String getLocalTextureBackendName()- Returns:
"Spout","Syphon", or"None"
-
setNdiFrameRate
void setNdiFrameRate(int numerator, int denominator) Sets rational frame-rate metadata for subsequently captured NDI frames.- Parameters:
numerator- positive frame-rate numeratordenominator- positive frame-rate denominator- Throws:
IllegalArgumentException- if either value is not positive
-
getNdiCapturedFrames
long getNdiCapturedFrames()- Returns:
- cumulative NDI frames copied into bounded capture slots
-
getNdiSentFrames
long getNdiSentFrames()- Returns:
- cumulative NDI frames sent by the dedicated worker
-
getNdiDroppedFrames
long getNdiDroppedFrames()- Returns:
- cumulative NDI frames discarded by latest-frame backpressure
-
getNdiFailedFrames
long getNdiFailedFrames()- Returns:
- cumulative NDI frames rejected by capture or sender failures
-
isActive
boolean isActive()- Returns:
- whether at least one external transport is enabled
-