AsyncSourceRunner
- class savant.client.runner.source.AsyncSourceRunner(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 asynchronously.
- async __call__(source, send_eos=True)
Handle the callable interface for this object. For more information, see the send method.
- async 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:
- async send_iter(sources, send_eos=True)
Send multiple sources to ZeroMQ socket.
- Parameters:
sources (Iterable[FrameSource | Tuple[VideoFrame, bytes] | Tuple[VideoFrameBatch, str] | EndOfStream] | AsyncIterable[FrameSource | Tuple[VideoFrame, bytes] | Tuple[VideoFrameBatch, str] | EndOfStream]) – Frame sources to send.
send_eos (bool) – Whether to send EOS after sending sources.
- Returns:
Results of sending the sources.
- Return type:
- async 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:
- async send_shutdown(zmq_topic, auth)
Send Shutdown message for a source to ZeroMQ socket.
- Parameters:
- Returns:
Result of sending Shutdown.
- Return type: