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)
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:
- async 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:
- async send_iter(sources, send_eos=True)
Send multiple frames to ZeroMQ socket.
- Parameters:
sources (Iterable[FrameSource | Tuple[VideoFrame, bytes] | EndOfStream] | AsyncIterable[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:
- 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(source_id, auth)
Send Shutdown message for a source to ZeroMQ socket.
- Parameters:
- Returns:
Result of sending Shutdown.
- Return type: