Handler object for a single stream. More...
Inherits MultiStreamHandler.
Public Member Functions | |
| None | SingleStreamHandler (self, cvb.Stream stream) |
| Create a stream handler object. | |
| None | handle_async_stream (self, cvb.Stream stream) |
| Asynchronously called for the registered stream. | |
| None | handle_async_wait_result (self, cvb.StreamImage image, int status) |
| Asynchronously called for all acquired images. | |
| None | setup (self, cvb.Stream stream) |
| Setup the stream for acquisition. | |
| None | tear_down (self, cvb.Stream stream) |
| Tear down the stream after acquisition. | |
Public Member Functions inherited from MultiStreamHandler | |
| None | MultiStreamHandler (self, List[cvb.Stream] stream_list) |
| Create a stream handler object. | |
| None | finish (self) |
| Stop the handler. | |
| bool | handle_error (self, Type[Exception] type, Exception value, Any traceback) |
| Asynchronously called for all acquired images. | |
| None | run (self) |
| Start the handler. | |
| bool | try_finish (self) |
| Stop the handler. | |
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.
| None SingleStreamHandler | ( | self, | |
| cvb.Stream | stream ) |
| 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 implementation just calls Stream.try_abort().
stream : cvb.Stream Stream to handle (provided at creation).