class
MyRandomAccessStreamerContents
- Reference
A simple FAST random access streamer which runs in its own thread. By random access it is meant that it can move to any given frame index, thus facilitating playback with for instance PlaybackWidget. This streamer reads a series of MHD images on disk. This can be done easily with the ImageFileStreamer, but this is just an example.
Public functions
- auto __init__(self) -> def
- auto getNrOfFrames(self) -> def
- auto generateStream(self) -> def
Function documentation
def python_random_access_streamer:: MyRandomAccessStreamer:: __init__(self)
Constructor, remember to create the output port here
def python_random_access_streamer:: MyRandomAccessStreamer:: getNrOfFrames(self)
This function must return how many frames the streamer has. :return: nr of frames
def python_random_access_streamer:: MyRandomAccessStreamer:: generateStream(self)
This method runs in its own thread. Run you streaming loop here. Remember to call self.addOutputData and self.frameAdded for each frame. If these calls return and exception, it means the streaming should stop, thus you need to exit your streaming loop.