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)

Handle the callable interface for this object. For more information, see the send method.

send(source, send_eos=True)

Send source data to ZeroMQ socket.

Parameters:
  • source (FrameSource | Tuple[VideoFrame, bytes] | Tuple[VideoFrameBatch, str]) – Source of the frame to send. Can be an instance of FrameSource or a tuple of VideoFrame and content, or a batch of frames with topic name. NB: If the source is used to send a stream of batches, the topic name must remain the same for all batches to maintain their order.

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

Returns:

Result of sending the source.

Return type:

SourceResult

send_iter(sources, send_eos=True)

Send multiple sources to ZeroMQ socket.

Parameters:
Returns:

Results of sending the sources.

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(zmq_topic, auth)

Send Shutdown message for a source to ZeroMQ socket.

Parameters:
  • zmq_topic (str) – ZeroMQ topic name.

  • auth (str) – Authentication key.

Returns:

Result of sending Shutdown.

Return type:

SourceResult