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
  • Method Details

    • getViewForOutput

      ViewType getViewForOutput(OutputManager.OutputType outputType)
      Returns the independently configured route for one transport.
      Parameters:
      outputType - transport to inspect
      Returns:
      configured view, or ViewType.DOMEMASTER when outputType is null
    • setViewForOutput

      void setViewForOutput(OutputManager.OutputType outputType, ViewType viewType)
      Selects the logical view routed to one transport.
      Parameters:
      outputType - transport to configure; a null value is ignored
      viewType - logical view to publish; a null value is ignored
    • setNdiView

      void setNdiView(ViewType view)
      Parameters:
      view - logical view routed to NDI; null is ignored
    • setSpoutView

      void setSpoutView(ViewType view)
      Parameters:
      view - logical view routed to Spout; null is ignored
    • setSyphonView

      void setSyphonView(ViewType view)
      Parameters:
      view - logical view routed to Syphon; null is ignored
    • setLocalTextureView

      void setLocalTextureView(ViewType view)
      Selects the logical view for the platform-local texture-sharing backend.
      Parameters:
      view - view routed to Spout on Windows or Syphon on macOS; null is ignored
    • getLocalTextureView

      ViewType getLocalTextureView()
      Returns:
      Spout's configured view on Windows, Syphon's on macOS, or ViewType.DOMEMASTER when no local backend exists
    • setOutputEnabled

      void setOutputEnabled(OutputManager.OutputType outputType, boolean enabled)
      Enables or disables one transport.
      Parameters:
      outputType - non-null transport
      enabled - true to enable publication
      Throws:
      IllegalArgumentException - when outputType is null
    • isOutputEnabled

      boolean isOutputEnabled(OutputManager.OutputType outputType)
      Parameters:
      outputType - non-null transport
      Returns:
      true only while that transport is enabled
      Throws:
      IllegalArgumentException - when outputType is null
    • toggleOutput

      void toggleOutput(OutputManager.OutputType outputType)
      Toggles one transport's enabled state.
      Parameters:
      outputType - non-null transport
      Throws:
      IllegalArgumentException - when outputType is null
    • getOutputState

      Parameters:
      outputType - transport to inspect
      Returns:
      current lifecycle state, or OutputManager.OutputState.UNAVAILABLE for null
    • getOutputFailureReason

      String getOutputFailureReason(OutputManager.OutputType outputType)
      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 numerator
      denominator - 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