milestonexprotectrestpython.xprstream

Module: xprstream.py

Revision History

Date Version Description
2023/07/11 1.0.0.0 Initial Version.

@export
class XPRStream:

Stream information.

Threadsafety:

This class is fully thread-safe.

More information about camera stream configuration can be found on the vendor documentation page.

XPRStream()

Initializes a new instance of the class.

DefaultPlayback: bool

If True, this stream will be delivered to the client if adaptive playback is not configured.
otherwise, False.

Returns:

The DefaultPlayback property value.

DisplayName: str

User-friendly display name used in various user-interface displays.

Returns:

The DisplayName property value.

Id: str

Globally unique identifier of the stream.

Returns:

The StreamReferenceId property value.

Note that this is a duplicate property of the StreamReferenceId property. It was added for ease-of-use, as most of the other item classes have an "Id" property.

LiveDefault: bool

If True, this stream will be used if the client does not request a specific stream and adaptive streaming is disabled; otherwise, False.

Returns:

The LiveDefault property value.

LiveMode: str

Specifies when live streaming is needed:

  • Always: the stream runs even if no XProtect Smart Client users request the stream.
  • Never: the stream is off. Only use this for recording streams, for example, if you want recordings in high quality and need the bandwidth.
  • WhenNeeded: the stream starts when requested by any client or if the stream is set to record.
Returns:

The LiveMode property value.

Name: str

Name of the stream.

Returns:

The Name property value.

ParentId: str

Globally unique identifier of the parent device.

Returns:

The ParentId property value.

ParentType: str

Parent device type ("cameras", etc).

Returns:

The ParentType property value.

RecordToId: str

Globally unique identifier of the stream.

Returns:

The RecordToId property value.

StreamReferenceId: str

Globally unique identifier of the stream.

For adaptive playback, you need to create a stream of each type.
The video that is played back is sourced from the primary video stream and secondary streaming is included when required.
There must always be a primary recording. Also, the stream that you configure as Primary is used in different contexts such as for motion detection and for export from XProtect Smart Client.

Returns:

The StreamReferenceId property value.

UseEdge: bool

True if this stream will use edge recordings; otherwise, False.

Returns:

The UseEdge property value.