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

Job clock for one tube. More...

#include <StormByte/multimedia/pipeline/progress.hxx>

Classes

struct  Values
 Consistent values captured under one clock lock. More...

Public Types

enum class  Phase { CalculatingDuration , Measure , Processing , Complete }
 Exclusive phase currently presented to the user. More...
using Pointer = StormByte::Safe::Shared<const Progress>
 User-facing handle.

Public Member Functions

Values Snapshot () const noexcept
 Capture phase and values atomically.
StormByte::Safe::Optional< double > DurationCalculation () const noexcept
 Duration scan percent.
bool CalculatingDuration () const noexcept
 Whether the duration scan owns the status line.
double Main () const noexcept
 Main job percent: how much of the destination is written.
bool MainComplete () const noexcept
 Whether the main job finished writing the destination.
 Progress () noexcept
 Empty clock.
 Progress (const Progress &other)=delete
 Copy constructor.
 Progress (Progress &&other) noexcept=delete
 Move constructor.
 ~Progress () noexcept
 Destructor.
Progress & operator= (const Progress &other)=delete
 Copy assignment.
Progress & operator= (Progress &&other) noexcept=delete
 Move assignment.
StormByte::Safe::Optional< double > Measure () const noexcept
 First-pass percent, if the tube mounted 2-pass.
StormByte::Safe::Optional< double > Analytics () const noexcept
 Dest-look percent, if analytics taps exist.
bool HasMeasure () const noexcept
 Whether this tube mounted a measure pass.
bool HasAnalytics () const noexcept
 Whether this tube mounted analytics taps.
bool MeasureComplete () const noexcept
 Whether the measure pass is finished.
bool AnalyticsComplete () const noexcept
 Whether analytics is finished.
double All () const noexcept
 Combined job percent.
 operator StormByte::Safe::String () const
 One CR-safe line: live axes plus All.

Friends

class Demuxer
 Allows the source stage to update progress.
class Filters
 Allows the filter coordinator to update progress.
class Muxer
 Allows the destination stage to update progress.
class Transcoder
 Allows the public job coordinator to update progress.
class StormByte::Multimedia::Backend::Pipeline::Transcoder
 Allows the internal job coordinator to update progress.

Detailed Description

Job clock for one tube.

Tracks duration resolution, measurement, analytics and output completion for one job. Standalone Demuxers also provide a progress handle. Transcoder::Progress and Demuxer::Progress return Pointer (shared, const). The user may keep that pointer after the tube dies. There are no public setters.

Duration calculation is an exclusive preliminary phase. Preparation exposes activity without a percentage; packet scanning adds its own processed-packet position estimate. It is not part of the weighted processing score. Snapshot captures a consistent phase and values for GUI consumers. Public processing axes are measure (optional 2-pass) and analytics (optional taps). Ordinary Process has no public name; its score only enters All.

All is a weighted sum of the mounted axes. Measure, when present, is 5 percent. Analytics, when present, is 10 percent and runs in parallel with Process. Process/mux takes the rest (100, 95, 90 or 85 percent). Missing axes are not in the mix. 100.00 only when the Muxer finished and every mounted phase is closed. Measurement progress reflects completed frame measurement, not merely reading the source packets.

DLL boundary
MaybeSafe is a provider responsibility declaration, not a Base certification. Shared handles and optional values use Safe ownership. Construction and destruction of the mutex-bearing clock run in the providing library. Compatible C++ ABI, including mutex layout, is required, and Base and the provider must remain loaded until all handles, snapshots and their ownership callbacks have been released. Copying and moving the clock are not supported. Text snapshots use Safe storage; the std::string conversion allocates in the caller's CRT.

Member Typedef Documentation

◆ Pointer

User-facing handle.

Const, shared. Not a raw pointer.

Member Enumeration Documentation

◆ Phase

Exclusive phase currently presented to the user.

Enumerator
CalculatingDuration 

Scanning source packet timestamps.

Measure 

Running the optional first pass.

Processing 

Processing, muxing, or draining analytics.

Complete 

Muxing and all mounted axes have finished.

Constructor & Destructor Documentation

◆ Progress() [1/3]

StormByte::Multimedia::Pipeline::Progress::Progress ( )
noexcept

Empty clock.

No measure, no analytics.

◆ Progress() [2/3]

StormByte::Multimedia::Pipeline::Progress::Progress ( const Progress & other)
delete

Copy constructor.

Parameters
otherSource clock.

◆ Progress() [3/3]

StormByte::Multimedia::Pipeline::Progress::Progress ( Progress && other)
deletenoexcept

Move constructor.

Parameters
otherClock to take.

◆ ~Progress()

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

Destructor.

Member Function Documentation

◆ All()

double StormByte::Multimedia::Pipeline::Progress::All ( ) const
noexcept

Combined job percent.

Weighted sum of mounted axes: measure 5 percent if the tube has a 2-pass leaf, analytics 10 percent if dest-look taps exist, Process/mux the remainder. Analytics stays in the sum while measure is live; the status line only hides the analytics label then. All is monotone and stays below 100 until the Muxer finished and every mounted phase is closed. Use it to tell when the whole job is complete; use Main for the main job percent.

Returns
0..100; zero while duration calculation is active.

◆ Analytics()

StormByte::Safe::Optional< double > StormByte::Multimedia::Pipeline::Progress::Analytics ( ) const
noexcept

Dest-look percent, if analytics taps exist.

Returns
0..100, or empty if unmounted or duration calculation is active.

◆ AnalyticsComplete()

bool StormByte::Multimedia::Pipeline::Progress::AnalyticsComplete ( ) const
noexcept

Whether analytics is finished.

Returns
true if there are no taps, or they are idle.

◆ CalculatingDuration()

bool StormByte::Multimedia::Pipeline::Progress::CalculatingDuration ( ) const
noexcept

Whether the duration scan owns the status line.

Returns
true while scanning.

◆ DurationCalculation()

StormByte::Safe::Optional< double > StormByte::Multimedia::Pipeline::Progress::DurationCalculation ( ) const
noexcept

Duration scan percent.

Returns
0..100 during byte scanning; empty during preparation or when inactive.

◆ HasAnalytics()

bool StormByte::Multimedia::Pipeline::Progress::HasAnalytics ( ) const
noexcept

Whether this tube mounted analytics taps.

Returns
true after Filters wired a dest look.

◆ HasMeasure()

bool StormByte::Multimedia::Pipeline::Progress::HasMeasure ( ) const
noexcept

Whether this tube mounted a measure pass.

Returns
true after Demuxer::Measure with a non-empty track list.

◆ Main()

double StormByte::Multimedia::Pipeline::Progress::Main ( ) const
noexcept

Main job percent: how much of the destination is written.

Follows the muxer's written position and is exactly 100 once the destination trailer is written. Measure and analytics never contribute; read them from Measure and Analytics. Analytics may still be draining while Main is already 100.

Returns
0..100, monotone; zero during duration calculation.

◆ MainComplete()

bool StormByte::Multimedia::Pipeline::Progress::MainComplete ( ) const
noexcept

Whether the main job finished writing the destination.

Returns
true after the muxer wrote the trailer.

◆ Measure()

StormByte::Safe::Optional< double > StormByte::Multimedia::Pipeline::Progress::Measure ( ) const
noexcept

First-pass percent, if the tube mounted 2-pass.

Returns
0..100, or empty if unmounted or duration calculation is active.

◆ MeasureComplete()

bool StormByte::Multimedia::Pipeline::Progress::MeasureComplete ( ) const
noexcept

Whether the measure pass is finished.

Returns
true if there is no measure pass, or it has closed.

◆ operator StormByte::Safe::String()

StormByte::Multimedia::Pipeline::Progress::operator StormByte::Safe::String ( ) const

One CR-safe line: live axes plus All.

An axis is omitted when it was not mounted or already finished. While measure is live the analytics label is omitted even if taps exist. No newline. Duration preparation shows its label and activity indicator. Once packet scanning starts, the indicator freezes and the percentage is added.

Returns
Single line, no trailing newline.

◆ operator=() [1/2]

Progress & StormByte::Multimedia::Pipeline::Progress::operator= ( const Progress & other)
delete

Copy assignment.

Parameters
otherSource clock.
Returns
*this.

◆ operator=() [2/2]

Progress & StormByte::Multimedia::Pipeline::Progress::operator= ( Progress && other)
deletenoexcept

Move assignment.

Parameters
otherClock to take.
Returns
*this.

◆ Snapshot()

Values StormByte::Multimedia::Pipeline::Progress::Snapshot ( ) const
noexcept

Capture phase and values atomically.

Returns
Consistent clock values.

◆ Demuxer

friend class Demuxer
friend

Allows the source stage to update progress.

◆ Filters

friend class Filters
friend

Allows the filter coordinator to update progress.

◆ Muxer

friend class Muxer
friend

Allows the destination stage to update progress.

◆ StormByte::Multimedia::Backend::Pipeline::Transcoder

friend class StormByte::Multimedia::Backend::Pipeline::Transcoder
friend

Allows the internal job coordinator to update progress.

◆ Transcoder

friend class Transcoder
friend

Allows the public job coordinator to update progress.


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