Extends live source concept with emulated time algorithms
Goal
The goal of this MR is to expend live sources capabilities, with a new emulated time algorithm.
This changes allow being able to simulate real time for an algorithm (and therefore skip frames if necessary). An example for this algorithm could be: a LiveSource stream was recorded in a file, and I want to be able to replay it in the same condition / at the same speed.
Changes
- Introduce a new class
pqLiveSourceItem
, which interacts with a live source proxy and has its own pqTimer. This design allows for the management of independent pqTimers for each LiveSource, enabling them to be refreshed at different intervals. - Add a LiveSource manager that can be accessed from
pqPVApplicationCore
.pqLiveSourceBehavior
is now only used to enabled it. - Add a new vtkAlgorithm
vtkEmulatedTimeAlgorithm
, intended to be inherited by a temporal algorithm. This base class would be then used in the live source behavior to:- Get the time range of the reader with
GetTimeRange
- Update the current time with a modified
GetNeedsUpdate
that takes the shared "real" time. If the new time falls within the time range, the algorithm is updated accordingly.
- Get the time range of the reader with
- Implement the concept of a shared "real" time in live sources. This time is synchronized among vtkEmulatedTimeAlgorithm (via LiveSource mecanism) and it skip any timesteps gaps if needed.
- Update pqPauseLiveSourcePropertyWidget to only pause the current live source and add emulated time controls if the proxy is an emulated time algorithm (play/pause/reset).
Issue related
Fixes #22229 (closed)
Edited by Timothée Couble