SourceRunner

Inheritance diagram of SourceRunner

SourceRunner inheritance diagram

class savant.client.runner.source.SourceRunner(socket, log_provider, retries, module_health_check_url, module_health_check_timeout, module_health_check_interval, telemetry_enabled, send_hwm=50, receive_timeout=5000)

Sends messages to ZeroMQ socket.

__call__(source, send_eos=True)

Send a single frame to ZeroMQ socket.

Parameters:
  • source (FrameSource | Tuple[VideoFrame, bytes]) – Source of the frame to send. Can be an instance of FrameSource or a tuple of VideoFrame and content.

  • send_eos (bool) – Whether to send EOS after sending the frame.

Returns:

Result of sending the frame.

Return type:

SourceResult

send(source, send_eos=True)

Send a single frame to ZeroMQ socket.

Parameters:
  • source (FrameSource | Tuple[VideoFrame, bytes]) – Source of the frame to send. Can be an instance of FrameSource or a tuple of VideoFrame and content.

  • send_eos (bool) – Whether to send EOS after sending the frame.

Returns:

Result of sending the frame.

Return type:

SourceResult

send_iter(sources, send_eos=True)

Send multiple frames to ZeroMQ socket.

Parameters:
  • sources (Iterable[FrameSource | Tuple[VideoFrame, bytes] | EndOfStream]) – Sources of the frames to send.

  • send_eos (bool) – Whether to send EOS after sending the frames.

Returns:

Results of sending the frames.

Return type:

Iterable[SourceResult]

send_eos(source_id)

Send EOS for a source to ZeroMQ socket.

Parameters:

source_id (str) – Source ID.

Returns:

Result of sending EOS.

Return type:

SourceResult

send_shutdown(source_id, auth)

Send Shutdown message for a source to ZeroMQ socket.

Parameters:
  • source_id (str) – Source ID.

  • auth (str) – Authentication key.

Returns:

Result of sending Shutdown.

Return type:

SourceResult