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. | |
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.
User-facing handle.
Const, shared. Not a raw pointer.
|
strong |
|
noexcept |
Empty clock.
No measure, no analytics.
|
delete |
Copy constructor.
| other | Source clock. |
|
deletenoexcept |
Move constructor.
| other | Clock to take. |
|
noexcept |
Destructor.
|
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.
|
noexcept |
Dest-look percent, if analytics taps exist.
|
noexcept |
Whether analytics is finished.
|
noexcept |
Whether the duration scan owns the status line.
|
noexcept |
Duration scan percent.
|
noexcept |
Whether this tube mounted analytics taps.
|
noexcept |
Whether this tube mounted a measure pass.
|
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.
|
noexcept |
Whether the main job finished writing the destination.
|
noexcept |
First-pass percent, if the tube mounted 2-pass.
|
noexcept |
Whether the measure pass is finished.
| 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.
Copy assignment.
| other | Source clock. |
|
noexcept |
Capture phase and values atomically.
|
friend |
Allows the source stage to update progress.
|
friend |
Allows the filter coordinator to update progress.
|
friend |
Allows the destination stage to update progress.
|
friend |
Allows the internal job coordinator to update progress.
|
friend |
Allows the public job coordinator to update progress.