Closed job intention: owned location reader, writer and tracks. More...
#include <StormByte/multimedia/pipeline/plan.hxx>
Classes | |
| class | Policies |
| Bitmask of Policy flags. More... | |
| class | m_policies |
| Intention flags. More... | |
Public Types | |
| enum class | State : std::uint8_t { Created , Running , Finished , Failed , Aborted } |
| Shared execution state of the pipeline plan. More... | |
| enum class | Policy : std::uint32_t { None = 0 , EnforceFeatures = 1u << 0 } |
| Job-intention flags. More... | |
Public Member Functions | |
| enum State | State () const noexcept |
| Reads the synchronized execution state. | |
| StormByte::Safe::Optional< StormByte::Safe::String > | Error () const |
| Copies the synchronized first failure reason. | |
| operator bool () const | |
| Same as Check having a value. | |
| virtual CheckResult | Check () const |
| Whether this intention is well formed. | |
Lifecycle | |
| Plan (const StormByte::Safe::String &source, const StormByte::Safe::String &destination, StormByte::Safe::Optional< std::int64_t > duration={}) | |
| Builds reader and writer from paths. | |
| Plan (const StormByte::Safe::String &source, StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > writer, StormByte::Safe::Optional< std::int64_t > duration={}) | |
Builds a local reader and takes writer. | |
| Plan (StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > reader, const StormByte::Safe::String &destination, StormByte::Safe::Optional< std::int64_t > duration={}) | |
Takes reader and builds a local writer. | |
| Plan (StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > reader, StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > writer, StormByte::Safe::Optional< std::int64_t > duration={}) | |
| Takes both location owners without slicing. | |
| Plan (StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > reader, StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > writer, StormByte::Safe::Optional< std::int64_t > duration, const StormByte::Safe::Function< void(double)> *progress) | |
| Takes both owners and observes automatic duration resolution. | |
| Plan (const StormByte::Safe::String &source, const StormByte::Safe::String &destination, const class Container &container, StormByte::Safe::Optional< std::int64_t > duration={}) | |
| Builds local locations with an owned explicit container copy. | |
| Plan (const StormByte::Safe::String &source, StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > writer, const class Container &container, StormByte::Safe::Optional< std::int64_t > duration={}) | |
| Builds a local reader and owns the writer and a container copy. | |
| Plan (StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > reader, const StormByte::Safe::String &destination, const class Container &container, StormByte::Safe::Optional< std::int64_t > duration={}) | |
| Owns the reader and a container copy and builds a local writer. | |
| Plan (StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > reader, StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > writer, const class Container &container, StormByte::Safe::Optional< std::int64_t > duration={}) | |
| Owns both locations and a copy of the explicit destination identity. | |
| Plan (StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > reader, StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > writer, const class Container &container, StormByte::Safe::Optional< std::int64_t > duration, const StormByte::Safe::Function< void(double)> *progress) | |
| Owns locations and a container copy while observing duration resolution. | |
| Plan (const Plan &other)=delete | |
| Copy construction is not supported. | |
| Plan (Plan &&other) noexcept=delete | |
| Move construction is not supported; stages retain shared ownership. | |
| virtual | ~Plan () noexcept |
| Destructor. | |
| Plan & | operator= (const Plan &other)=delete |
| Copy assignment is not supported. | |
| Plan & | operator= (Plan &&other) noexcept=delete |
| Move assignment is not supported; stages retain shared ownership. | |
Job | |
| StormByte::Safe::Shared< StormByte::Buffer::ReadTelemetry > | InputTelemetry () const noexcept |
| Shared telemetry for the owned input reader. | |
| StormByte::Safe::Shared< StormByte::Buffer::WriteTelemetry > | OutputTelemetry () const noexcept |
| Shared telemetry for the owned output writer. | |
| void | add (const Track &track) |
Appends a clone of track. | |
| void | add (Track &&track) |
Appends track. | |
| const class Tracks & | Tracks () const noexcept |
| Tube tracks. | |
| const class Policies & | Policies () const noexcept |
| Active intention flags. | |
| void | Policies (enum Policy policy) noexcept |
Adds policy, or clears it when passed as ~policy. | |
| constexpr ResourceUsage | Resources () const noexcept |
| Resource policy carried by this plan. | |
| void | Resources (ResourceUsage usage) noexcept |
| Sets the resource policy before pipeline stages bind. | |
| const BufferingPolicy & | Buffering () const noexcept |
| Queue capacity policy shared with manually mounted pipelines. | |
| bool | Buffering (const BufferingPolicy &policy) noexcept |
| Set queue capacity overrides before stages start. | |
Static Public Member Functions | |
| static constexpr const char * | ToString (enum Policy policy) noexcept |
| Converts a Policy to a stable token. | |
Friends | |
| class | Demuxer |
| Allows the input stage to consume source data. | |
| class | Decoder |
| Allows decoder snapshot consultation. | |
| class | Encoder |
| Allows encoder track consultation. | |
| class | Remuxer |
| Allows remux snapshot consultation. | |
| class | Muxer |
| Allows the output stage to consume destination data. | |
| class | Filters |
| Allows filter matching against the source snapshot. | |
| class | Backend::Pipeline::Demuxer |
| Allows backend source restoration. | |
| class | Backend::Pipeline::Ceiling |
| Allows backend capacity calculation. | |
| class | Backend::Pipeline::Detail::Muxer::FFmpeg::Container |
| Allows muxing with the resolved FFmpeg identity. | |
| class | Step |
| Allows stages to register state notifications. | |
| class | Filter::FFmpeg |
| class | Route |
| Allows private route snapshot consultation. | |
| class | Transcoder |
| Allows the public facade to publish failure and cancellation. | |
| class | Backend::Pipeline::Transcoder |
| Allows the backend coordinator to publish execution state. | |
| constexpr enum Policy | operator~ (enum Policy policy) noexcept |
| Bitwise complement of one flag, for Policies(Policy). | |
Closed job intention: owned location reader, writer and tracks.
Octets are held as StormByte::Safe::Unique of the location bases. Paths build local BufferedFile leaves; supplied owners retain their dynamic types without slicing. The constructor probes the reader once into a consultation File snapshot (streams, attachments, metadata). That File is not the octet origin. Progress uses a positive explicit duration or the container estimate. Only when neither is usable is the full source scanned before pipeline stages are created. Explicit File::Duration() queries retain their full-scan behavior.
Destination container is an owned copy of an explicit identity, or the registry identity matched to FFmpeg's filename guess. Explicit identities ignore the filename when selecting the muxer. Stages retain this noncopyable, nonmovable intention exclusively through StormByte::Safe::Shared.
Mux output order is the order of add. add is not idempotent. A track omitted from Tracks is dropped.
Check tests formation of this intention only. Success does not mean the tube will run. Boolean conversion reports whether Check succeeds. Policy::EnforceFeatures, set on construction, makes Check reject an encode that would drop source features. Policies(Policy) adds a flag. Policies with ~flag clears that flag. Neither call replaces the rest of the mask.
|
strong |
|
strong |
Shared execution state of the pipeline plan.
| Enumerator | |
|---|---|
| Created | Constructed and not yet running. |
| Running | Pipeline execution has started. |
| Finished | Pipeline execution completed successfully. |
| Failed | Pipeline formation or execution failed. |
| Aborted | Intentional cancellation; a genuine in-flight failure may still win. |
| StormByte::Multimedia::Pipeline::Plan::Plan | ( | const StormByte::Safe::String & | source, |
| const StormByte::Safe::String & | destination, | ||
| StormByte::Safe::Optional< std::int64_t > | duration = {} ) |
Builds reader and writer from paths.
| source | Input path. |
| destination | Output path. |
| duration | Authoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable. |
| StormByte::Multimedia::Pipeline::Plan::Plan | ( | const StormByte::Safe::String & | source, |
| StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > | writer, | ||
| StormByte::Safe::Optional< std::int64_t > | duration = {} ) |
Builds a local reader and takes writer.
| source | Input path. |
| writer | Owned output location (moved). |
| duration | Authoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable. |
| StormByte::Multimedia::Pipeline::Plan::Plan | ( | StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > | reader, |
| const StormByte::Safe::String & | destination, | ||
| StormByte::Safe::Optional< std::int64_t > | duration = {} ) |
Takes reader and builds a local writer.
| reader | Owned input location (moved). |
| destination | Output path. |
| duration | Authoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable. |
| StormByte::Multimedia::Pipeline::Plan::Plan | ( | StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > | reader, |
| StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > | writer, | ||
| StormByte::Safe::Optional< std::int64_t > | duration = {} ) |
Takes both location owners without slicing.
| reader | Owned input location (moved). |
| writer | Owned output location (moved). |
| duration | Authoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable. |
| StormByte::Multimedia::Pipeline::Plan::Plan | ( | StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > | reader, |
| StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > | writer, | ||
| StormByte::Safe::Optional< std::int64_t > | duration, | ||
| const StormByte::Safe::Function< void(double)> * | progress ) |
Takes both owners and observes automatic duration resolution.
| reader | Owned input location. |
| writer | Owned output location. |
| duration | Authoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable. |
| progress | Borrowed observer for this call only; null disables updates. |
| StormByte::Multimedia::Pipeline::Plan::Plan | ( | const StormByte::Safe::String & | source, |
| const StormByte::Safe::String & | destination, | ||
| const class Container & | container, | ||
| StormByte::Safe::Optional< std::int64_t > | duration = {} ) |
Builds local locations with an owned explicit container copy.
| source | Input path. |
| destination | Output path; its suffix does not select the format. |
| container | Registered writable destination identity to copy. |
| duration | Authoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable. |
| StormByte::Multimedia::Pipeline::Plan::Plan | ( | const StormByte::Safe::String & | source, |
| StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > | writer, | ||
| const class Container & | container, | ||
| StormByte::Safe::Optional< std::int64_t > | duration = {} ) |
Builds a local reader and owns the writer and a container copy.
| source | Input path. |
| writer | Owned output location. |
| container | Registered writable destination identity to copy. |
| duration | Authoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable. |
| StormByte::Multimedia::Pipeline::Plan::Plan | ( | StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > | reader, |
| const StormByte::Safe::String & | destination, | ||
| const class Container & | container, | ||
| StormByte::Safe::Optional< std::int64_t > | duration = {} ) |
Owns the reader and a container copy and builds a local writer.
| reader | Owned input location. |
| destination | Output path; its suffix does not select the format. |
| container | Registered writable destination identity to copy. |
| duration | Authoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable. |
| StormByte::Multimedia::Pipeline::Plan::Plan | ( | StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > | reader, |
| StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > | writer, | ||
| const class Container & | container, | ||
| StormByte::Safe::Optional< std::int64_t > | duration = {} ) |
Owns both locations and a copy of the explicit destination identity.
| reader | Owned input location. |
| writer | Owned output location. |
| container | Registered writable destination identity to copy. |
| duration | Authoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable. |
| StormByte::Multimedia::Pipeline::Plan::Plan | ( | StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > | reader, |
| StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > | writer, | ||
| const class Container & | container, | ||
| StormByte::Safe::Optional< std::int64_t > | duration, | ||
| const StormByte::Safe::Function< void(double)> * | progress ) |
Owns locations and a container copy while observing duration resolution.
| reader | Owned input location. |
| writer | Owned output location. |
| container | Registered writable destination identity to copy. |
| duration | Authoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable. |
| progress | Borrowed duration observer; null disables updates. |
|
delete |
Copy construction is not supported.
| other | Source plan. |
|
deletenoexcept |
Move construction is not supported; stages retain shared ownership.
| other | Source plan. |
|
virtualnoexcept |
Destructor.
|
inline |
|
inline |
|
noexcept |
Queue capacity policy shared with manually mounted pipelines.
|
noexcept |
Set queue capacity overrides before stages start.
| policy | Automatic, bounded, or unlimited queue element caps. |
|
virtual |
Whether this intention is well formed.
Publishes Failed and preserves the first reason on validation failure. Construction validates locations and format separately, without tracks. Fails when: either location owner is empty; the constructor snapshot failed; no registered buffered muxer resolves; Tracks is empty; Track::In is negative; Track::Type is Type::Unknown; an attachment MIME is empty or is not an exact type/subtype, a type-star category, or star-star (all). Duplicate Track::In is allowed. Encode knobs on a remux track (Codec() == nullptr) are ignored. With Policy::EnforceFeatures, an encode whose destination codec has no implementation that keeps the source HDR10, HDR10+ or Dolby Vision features also fails. Other checks run either way.
| StormByte::Safe::Optional< StormByte::Safe::String > StormByte::Multimedia::Pipeline::Plan::Error | ( | ) | const |
Copies the synchronized first failure reason.
|
noexcept |
Shared telemetry for the owned input reader.
|
explicit |
Same as Check having a value.
Copy assignment is not supported.
| other | Source plan. |
Move assignment is not supported; stages retain shared ownership.
| other | Source plan. |
|
noexcept |
Shared telemetry for the owned output writer.
|
inlinenoexcept |
Active intention flags.
|
inlinenoexcept |
Adds policy, or clears it when passed as ~policy.
| policy | Flag to add, or the complement from operator~(Policy). |
A value that only has defined bits is added. Other flags stay set. ~Policy::EnforceFeatures clears only that flag. This does not replace the mask and does not take Policies.
|
inlineconstexprnoexcept |
Resource policy carried by this plan.
|
inlinenoexcept |
Sets the resource policy before pipeline stages bind.
| usage | Best-effort CPU and in-memory frame queue policy. |
|
noexcept |
Reads the synchronized execution state.
|
inlinestaticconstexprnoexcept |
|
inlinenoexcept |
|
friend |
Allows backend capacity calculation.
|
friend |
Allows backend source restoration.
|
friend |
Allows muxing with the resolved FFmpeg identity.
|
friend |
Allows the backend coordinator to publish execution state.
|
friend |
Allows decoder snapshot consultation.
|
friend |
Allows the input stage to consume source data.
|
friend |
Allows encoder track consultation.
|
friend |
|
friend |
Allows filter matching against the source snapshot.
|
friend |
Allows the output stage to consume destination data.
Bitwise complement of one flag, for Policies(Policy).
| policy | Flag to negate. |
Policies(~Policy::EnforceFeatures) clears that flag and leaves every other flag as it was.
|
friend |
Allows remux snapshot consultation.
|
friend |
Allows private route snapshot consultation.
|
friend |
Allows stages to register state notifications.
|
friend |
Allows the public facade to publish failure and cancellation.