Handler object for a single stream. More...
Inherits MultiStreamHandler.
Public Member Functions | |
None | handle_async_stream (self, cvb.Stream stream) |
Asynchronously called for the registered stream. More... | |
None | handle_async_wait_result (self, cvb.StreamImage image, int status) |
Asynchronously called for all acquired images. More... | |
None | setup (self, cvb.Stream stream) |
Setup the stream for acquisition. More... | |
None | tear_down (self, cvb.Stream stream) |
Tear down the stream after acquisition. More... | |
Public Member Functions inherited from MultiStreamHandler | |
None | finish (self) |
Stop the handler. More... | |
None | handle_async_stream (self, List[cvb.Stream] stream_list) |
Asynchronously called for all registered streams. More... | |
None | handle_async_wait_result (self, List[Tuple[cvb.StreamImage, int]] wait_result_list) |
Asynchronously called for all acquired images. More... | |
bool | handle_error (self, Type[Exception] type, Exception value, Any traceback) |
Asynchronously called for all acquired images. More... | |
None | run (self) |
Start the handler. More... | |
bool | try_finish (self) |
Stop the handler. More... | |
Additional Inherited Members | |
Properties inherited from MultiStreamHandler | |
is_active = property | |
bool: Check if the acquisition thread is running. | |
Handler object for a single stream.
This handler provides a convenient way to acquire images from a single stream within a dedicated thread.
For a multiple synchronous stream see cvb.MultiStreamHandler.
Create a stream handler object.
stream : cvb.Stream Stream to handle.
None handle_async_stream | ( | self, | |
cvb.Stream | stream | ||
) |
Asynchronously called for the registered stream.
The default implementation just waits for the next image.
This method is called from a dedicated thread!
stream : cvb.Stream Stream to handle (provided at creation).
Reimplemented from MultiStreamHandler.
None handle_async_wait_result | ( | self, | |
cvb.StreamImage | image, | ||
int | status | ||
) |
Asynchronously called for all acquired images.
The default implementation does nothing.
This method is called from a dedicated thread!
image : cvb.StreamImage The acquired image (might be None).
status : int Wait status for the acquired image (see cvb.WaitStatus).
Reimplemented from MultiStreamHandler.
None setup | ( | self, | |
cvb.Stream | stream | ||
) |
Setup the stream for acquisition.
The default implementation just calls Stream.start().
stream : cvb.Stream Stream to handle(provided at creation).
None tear_down | ( | self, | |
cvb.Stream | stream | ||
) |
Tear down the stream after acquisition.
The default implemntation just calls Stream.try_abort().
stream : cvb.Stream Stream to handle (provided at creation).