Provider-owned clock for one execution thread. More...
#include <StormByte/multimedia/pipeline/activity.hxx>
Public Member Functions | |
| WorkerActivity (ActivityRole role=ActivityRole::Main, int track=-1) | |
| Construct an unstarted worker clock. | |
| WorkerActivity (const WorkerActivity &)=delete | |
| WorkerActivity (WorkerActivity &&) noexcept=delete | |
| ~WorkerActivity () noexcept | |
| Destroy synchronization in the providing library. | |
| WorkerActivity & | operator= (const WorkerActivity &)=delete |
| WorkerActivity & | operator= (WorkerActivity &&) noexcept=delete |
| void | Start () noexcept |
| Begin a generation in Preparing, or leave a running generation unchanged. | |
| ActivityState | Exchange (ActivityState state) noexcept |
| Close the current interval and open a nonterminal category. | |
| void | Finish (bool failed=false) noexcept |
| Freeze this generation once; subsequent transitions have no effect. | |
| WorkerActivitySnapshot | Snapshot () const noexcept |
| Copy state, totals and reference tick under the same short lock. | |
Provider-owned clock for one execution thread.
Readers may snapshot concurrently. Producer transitions must be serialized by their worker. Start begins a new generation in Preparing. Exchange closes the previous category at the same clock tick it opens the next; nested scopes restore the previous category, never add overlapping time. Finish is idempotent and terminal; Exchange cannot reopen a finished clock. Snapshots are scalar values, and all owned storage/synchronization use Safe types with provider-local destruction. Keep Multimedia and Base loaded for the lifetime of retained handles; compatible C++ ABI is required.
|
explicit |
Construct an unstarted worker clock.
| role | Execution domain. |
| track | Source track for a demux feeder, otherwise -1. |
|
delete |
|
deletenoexcept |
|
noexcept |
Destroy synchronization in the providing library.
|
noexcept |
Close the current interval and open a nonterminal category.
| state | New category; terminal values are reserved for Finish. |
|
noexcept |
Freeze this generation once; subsequent transitions have no effect.
| failed | Whether execution ended with a stage failure. |
|
delete |
|
deletenoexcept |
|
noexcept |
Copy state, totals and reference tick under the same short lock.
|
noexcept |
Begin a generation in Preparing, or leave a running generation unchanged.