Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ XR Studio

Spout

  • Last UpdatedFeb 19, 2025
  • 3 minute read

The Spout node sends and receives realtime video between Windows applications (on the same machine) with near-zero latency or overhead. It is based on the SPOUT protocol.

Platform support

This node is supported on XR-Windows platform only.

XR-WIN

XR-P-WIN

XR-P-IOS

XR-P-AND

XR-P-WASM

Full support

No support

No support

No support

No support

Full support

No support

No support

No support

No support

Sending video

Each instance of a Spout node can create a sender SPOUT channel. The sendChannelName is the name given to the channel and will be used by the receiver to access streamed video.

A spout channel can be configured to send the content of a window or of a single viewport:

  • When sendMode is set to window, uses sendWindowId to identify which window to send. Typically, there’s only one window so the index has to be set to 0.

  • When sendMode is set to viewport, uses sendViewportName to the name of the desired viewport. For example, DEFAULT_VIEWPORT.

    Note: The send channel automatically deactivates when changing any of the send parameters while streaming.

Receiving videos

The Spout node can link to a Spout channel and create a movie texture to be consumed inside the XR engine. The receiveChannelName must be set to the name of the SPOUT channel to receive. Rect (Legacy) and MeshMovie nodes can consume the created movie textures.

By using receiveMode, you can specify whether to use a singlethread or multithread approach.

The name to use to reference a receive movie texture is:

  • for singlethread, use _SpoutST@receiveChannelName

  • for multithread, use _SpoutMT@receiveChannelName

Notes

  • The receive channel is automatically deactivated when changing any of the receive parameters.

  • Deactivating a receive channel is not enough to stop an incoming receive SPOUT channel, if the created texture is referenced by other nodes. All references must be removed to stop the channel.

Code example

This is a code example for the Spout node.

<Spout name="sender1" sendMode="viewport" sendChannelName="xrspout1" sendViewportName="DEFAULT_VIEWPORT" />

<Spout name="sender2" sendMode="window" sendChannelName="xrspout2" sendWindowId="0" />

Node fields

These are the fields for the Spout node. Only the node-specific fields are indicated, not fields obtained by inheritance.

Field inheritance: NodeBase > Spout

Field

Type

Use

Default value

Description

enableLog

sbool

optional

false

When set to true, enables a SPOUT log panel for reviewing the channels communication state.

receiveActive

sbool

optional

false

When set to true, creates a movie texture that can be referenced by other nodes.

When set to false, removes the reference to the texture. The texture and the corresponding channel remain active until all references are removed.

receiveChannelName

sstring

optional

Empty

The name of the SPOUT channel to receive.

receiveMode

senum

optional

singlethread

Defines the way to execute spout channel receiving as singlethread or multithread.

sendActive

sbool

optional

false

When set to true, creates a SPOUT channel and starts streaming over it.

When set to false, removes the channel

sendChannelName

sstring

optional

Empty

The name of the SPOUT channel to send.

sendMode

senum

optional

window

When set to window, sends the whole window content. When set to viewport, sends a single viewport content.

sendViewportName

sstring

optional

Empty

The name of the viewport to stream. For example, DEFAULT_VIEWPORT. Used only when send mode is set to viewport.

sendWindowId

ssint

optional

0

Index of the window to stream (usually 0). Used only when send mode is set to window.

 

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in