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. | |
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. | |
![]() | |
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 | |
![]() | |
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 implementation just calls Stream.try_abort().
stream : cvb.Stream Stream to handle (provided at creation).
We use cookies to improve your experience. By using this documentation, you agree to our use of cookies.