StormByte-Multimedia 3.3.2
C++26 multimedia processing module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Multimedia::Pipeline::WorkerActivity Class Referencefinal

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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ WorkerActivity() [1/3]

StormByte::Multimedia::Pipeline::WorkerActivity::WorkerActivity ( ActivityRole role = ActivityRole::Main,
int track = -1 )
explicit

Construct an unstarted worker clock.

Parameters
roleExecution domain.
trackSource track for a demux feeder, otherwise -1.

◆ WorkerActivity() [2/3]

StormByte::Multimedia::Pipeline::WorkerActivity::WorkerActivity ( const WorkerActivity & )
delete

◆ WorkerActivity() [3/3]

StormByte::Multimedia::Pipeline::WorkerActivity::WorkerActivity ( WorkerActivity && )
deletenoexcept

◆ ~WorkerActivity()

StormByte::Multimedia::Pipeline::WorkerActivity::~WorkerActivity ( )
noexcept

Destroy synchronization in the providing library.

Member Function Documentation

◆ Exchange()

ActivityState StormByte::Multimedia::Pipeline::WorkerActivity::Exchange ( ActivityState state)
noexcept

Close the current interval and open a nonterminal category.

Parameters
stateNew category; terminal values are reserved for Finish.
Returns
Previous category, for restoring a nested scope.

◆ Finish()

void StormByte::Multimedia::Pipeline::WorkerActivity::Finish ( bool failed = false)
noexcept

Freeze this generation once; subsequent transitions have no effect.

Parameters
failedWhether execution ended with a stage failure.

◆ operator=() [1/2]

WorkerActivity & StormByte::Multimedia::Pipeline::WorkerActivity::operator= ( const WorkerActivity & )
delete

◆ operator=() [2/2]

WorkerActivity & StormByte::Multimedia::Pipeline::WorkerActivity::operator= ( WorkerActivity && )
deletenoexcept

◆ Snapshot()

WorkerActivitySnapshot StormByte::Multimedia::Pipeline::WorkerActivity::Snapshot ( ) const
noexcept

Copy state, totals and reference tick under the same short lock.

Returns
Owned scalar value including the interval still open.

◆ Start()

void StormByte::Multimedia::Pipeline::WorkerActivity::Start ( )
noexcept

Begin a generation in Preparing, or leave a running generation unchanged.


The documentation for this class was generated from the following file: