Writes interleaved packets to the Plan writer. More...
#include <StormByte/multimedia/pipeline/muxer.hxx>


Public Member Functions | |
| operator bool () const noexcept | |
| true if the muxer has not failed and is Ready. | |
| bool | Closed () const noexcept |
| true after Finish flushed the trailer, or after Fail. | |
| StormByte::Safe::Optional< Property::Duration > | Position () const |
| Presentation time of the last packet written. | |
| const Container & | Destination () const noexcept |
| Destination container. | |
| bool | Armed () const noexcept |
| Whether every muxable Plan track has an output connection. | |
| bool | Ready () const noexcept override |
| Open finished without Fail or Stop, and Armed. | |
| StormByte::Size | InputCeiling () const noexcept override |
| Maximum number of queued input packets. | |
Lifecycle | |
| Muxer (StormByte::Safe::Shared< StormByte::Logger::Log > log) | |
| Muxer. | |
| Muxer (const Muxer &other)=delete | |
| Copy constructor (deleted). | |
| Muxer (Muxer &&other) noexcept=delete | |
| Move constructor (deleted). | |
| ~Muxer () noexcept override | |
| Destructor. | |
| Muxer & | operator= (const Muxer &other)=delete |
| Copy assignment (deleted). | |
| Muxer & | operator= (Muxer &&other) noexcept=delete |
| Move assignment (deleted). | |
Stream tags | |
| StormByte::Safe::Optional< StormByte::Safe::String > | Language (int output_index) const |
Language tag for mux output output_index. | |
| void | Language (int output_index, StormByte::Safe::String language) |
Sets the language tag for mux output output_index. | |
| void | RemoveLanguage (int output_index) |
Writes mux output output_index without a language tag. | |
| StormByte::Safe::Optional< StormByte::Safe::String > | Title (int output_index) const |
Title tag for mux output output_index. | |
| void | Title (int output_index, StormByte::Safe::String title) |
Sets the title tag for mux output output_index. | |
| void | RemoveTitle (int output_index) |
Writes mux output output_index without a title. | |
| StormByte::Safe::Optional< StormByte::Multimedia::Metadata::Disposition > | Disposition (int output_index) const |
Disposition for mux output output_index. | |
| void | Disposition (int output_index, StormByte::Multimedia::Metadata::Disposition disposition) |
Sets the disposition for mux output output_index. | |
File tags | |
Tags without an edit are copied from the source. | |
| StormByte::Safe::Optional< StormByte::Safe::String > | Tag (StormByte::Multimedia::Metadata::FileTag tag) const |
Edit of file tag tag. | |
| void | Tag (StormByte::Multimedia::Metadata::FileTag tag, StormByte::Safe::String value) |
Replaces file tag tag. | |
| void | RemoveTag (StormByte::Multimedia::Metadata::FileTag tag) |
Writes the output without file tag tag. | |
| Public Member Functions inherited from StormByte::Multimedia::Pipeline::Step | |
| Step (const Step &other)=delete | |
| Copy construction is disabled. | |
| Step (Step &&other) noexcept=delete | |
| Move construction is disabled. | |
| virtual | ~Step () noexcept |
| Destructor. | |
| Step & | operator= (const Step &other)=delete |
| Copy assignment is disabled. | |
| Step & | operator= (Step &&other) noexcept=delete |
| Move assignment is disabled. | |
| void | Wake () noexcept |
| Notifies all waiters of this step. | |
| StormByte::Safe::Shared< class Plan > | Plan () const noexcept |
| Bound job intention, if any. | |
| const Kinds & | Receives () const noexcept |
| Kinds this step consumes. | |
| const Kinds & | Produces () const noexcept |
| Kinds this step emits. | |
| State | Status () const noexcept |
| Current lifecycle value. | |
| StormByte::Safe::Shared< const StageTelemetry > | Telemetry () const |
| Shared stage counters, retained independently of this Step. | |
| StormByte::Buffer::QueueSnapshot | QueueSnapshot (int track) const noexcept |
| Reads effective queue limits and logical-byte accounting. | |
| void | Stop () noexcept |
| Requests shutdown and notifies connected stages. | |
| bool | Failed () const noexcept |
| Whether this step has failed. | |
| StormByte::Safe::Optional< StormByte::Safe::String > | Error () const |
| Failure text. | |
| void | Fail (StormByte::Safe::String reason) noexcept |
| Marks the stage as failed and notifies connected stages. | |
| void | Fail () noexcept |
| Marks failure without storing a message or allocating. | |
| STORMBYTE_FORCE_INLINE void | Fail (const char *reason) noexcept |
| Copies a null-terminated failure literal into Safe storage. | |
| void | Fail (std::string_view reason) noexcept |
| Copies borrowed failure text before calling the DLL-safe overload. | |
Friends | |
| class | Backend::Pipeline::Detail::Muxer::FFmpeg::Container |
| Allows the FFmpeg container backend to access mux state. | |
| class | Backend::Pipeline::Muxer |
| Allows the mux backend to access its owning stage. | |
| class | Backend::Pipeline::Detail::Worker::Mux |
| Allows the mux worker to drive output and progress. | |
| Encoder & | operator>> (Encoder &encoder, Muxer &muxer) |
| Allows encoder connections to reserve output tracks. | |
| Muxer & | operator>> (Demuxer &demuxer, Muxer &muxer) |
| Allows demuxer connections to bind the remux origin. | |
| Remuxer & | operator>> (Remuxer &remuxer, Muxer &muxer) |
| Allows remuxer connections to reserve output tracks. | |
Additional Inherited Members | |
| Protected Member Functions inherited from StormByte::Multimedia::Pipeline::Step | |
| bool | Connect (Step &downstream) noexcept |
| Registers a borrowed downstream stage and shares any bound plan. | |
| bool | WaitPlan () noexcept |
| Waits interruptibly for the shared plan to enter Running. | |
| Backend::Pipeline::Pipe & | pipe () noexcept |
| const Backend::Pipeline::Pipe & | pipe () const noexcept |
| Step (StormByte::Safe::Shared< StormByte::Logger::Log > log, enum Producer name, Kinds receives, Kinds produces) | |
| Constructs a stage in State::Created. | |
| void | Emit (Item::PointerType item) noexcept |
Sends item to connected consumers. | |
| Item::PointerType | CloneItem (const Item &item) const |
| Creates a distinct item through Item::Clone. | |
| virtual void | Wait () noexcept |
| Waits until input is available, the stage fails or stops, or WakeNow. | |
| virtual bool | WakeNow () const noexcept |
| Extra reason to leave Wait. | |
| virtual void | AfterWait () noexcept |
| Work on the waiting worker after Wait unblocks. | |
| void | Launch () noexcept |
| Starts stage initialization and processing. | |
| void | Halt () noexcept |
| Stops the stage and waits for execution to finish. | |
| bool | Stopping () const noexcept |
| Worker must return (Stop, Halt or Fail). | |
| void | RecordWork (std::int64_t microseconds) noexcept |
| Adds one Process duration to the step summary. | |
| std::int64_t | LastWork () const noexcept |
| Duration of the last timed Process, or 0. | |
| void | DumpWork () noexcept |
| Writes min/max Process time at Debug. | |
| Backend::Pipeline::Host & | Face () noexcept |
| void | Mount (StormByte::Safe::Unique< Backend::Pipeline::Pumper > pumper, StormByte::Safe::Unique< Backend::Pipeline::Worker > worker) |
| virtual StormByte::Safe::String | Label () const |
| Display name of this step. | |
| Protected Attributes inherited from StormByte::Multimedia::Pipeline::Step | |
| StormByte::Safe::Shared< StormByte::Logger::Log > | m_log |
| Scoped logger retained through Base-heap shared ownership. | |
| enum Producer | m_name |
| UseLog leaf / default Label. | |
| Kinds | m_receives |
| Receives. | |
| Kinds | m_produces |
| Produces. | |
Writes interleaved packets to the Plan writer.
Destination is the seekable writer owned by StormByte::Multimedia::Pipeline::Plan. The writer's path extension determines the destination container.
Does not write the container header until Armed is true. Armed is reserved muxable tracks versus the Plan, not a bound path. Ready is Status Ready and Armed.
Shares the Demuxer's Progress. Written packets advance output progress; completion includes the container trailer and flushing the destination writer.
|
delete |
Copy constructor (deleted).
| other | Source muxer. |
|
deletenoexcept |
Move constructor (deleted).
| other | Source muxer. |
|
overridenoexcept |
Destructor.
Step::Join Halts before backends die.
|
noexcept |
Whether every muxable Plan track has an output connection.
Counts Video, Audio and Subtitle entries in Plan::Tracks. Attachments are written with the header, not as packet streams. true when connected tracks equal that count. false with no Plan, or while operator>> is still running.
Does not Fail. The owner of the graph (Filters::Close or Transcoder) checks this after wiring and Fails the Muxer if it is still false.
|
noexcept |
true after Finish flushed the trailer, or after Fail.
|
noexcept |
| StormByte::Safe::Optional< StormByte::Multimedia::Metadata::Disposition > StormByte::Multimedia::Pipeline::Muxer::Disposition | ( | int | output_index | ) | const |
Disposition for mux output output_index.
| output_index | Mux destination order key. |
| void StormByte::Multimedia::Pipeline::Muxer::Disposition | ( | int | output_index, |
| StormByte::Multimedia::Metadata::Disposition | disposition ) |
Sets the disposition for mux output output_index.
| output_index | Mux destination order key. |
| disposition | Flags written verbatim (default, forced, ...). |
|
overridevirtualnoexcept |
Maximum number of queued input packets.
The first muxable Plan track determines the limit. Returns zero before a Plan supplies a muxable track.
Reimplemented from StormByte::Multimedia::Pipeline::Step.
| StormByte::Safe::Optional< StormByte::Safe::String > StormByte::Multimedia::Pipeline::Muxer::Language | ( | int | output_index | ) | const |
Language tag for mux output output_index.
| output_index | Mux destination order key. |
| void StormByte::Multimedia::Pipeline::Muxer::Language | ( | int | output_index, |
| StormByte::Safe::String | language ) |
Sets the language tag for mux output output_index.
| output_index | Mux destination order key. |
| language | BCP-47 / ISO tag. Empty clears. |
|
explicitnoexcept |
true if the muxer has not failed and is Ready.
Copy assignment (deleted).
| other | Source muxer. |
Move assignment (deleted).
| other | Source muxer. |
| StormByte::Safe::Optional< Property::Duration > StormByte::Multimedia::Pipeline::Muxer::Position | ( | ) | const |
Presentation time of the last packet written.
|
overridevirtualnoexcept |
Open finished without Fail or Stop, and Armed.
Reimplemented from StormByte::Multimedia::Pipeline::Step.
| void StormByte::Multimedia::Pipeline::Muxer::RemoveLanguage | ( | int | output_index | ) |
Writes mux output output_index without a language tag.
| output_index | Mux destination order key. |
| void StormByte::Multimedia::Pipeline::Muxer::RemoveTag | ( | StormByte::Multimedia::Metadata::FileTag | tag | ) |
Writes the output without file tag tag.
| tag | File tag. |
| void StormByte::Multimedia::Pipeline::Muxer::RemoveTitle | ( | int | output_index | ) |
Writes mux output output_index without a title.
| output_index | Mux destination order key. |
| StormByte::Safe::Optional< StormByte::Safe::String > StormByte::Multimedia::Pipeline::Muxer::Tag | ( | StormByte::Multimedia::Metadata::FileTag | tag | ) | const |
Edit of file tag tag.
| tag | File tag. |
| void StormByte::Multimedia::Pipeline::Muxer::Tag | ( | StormByte::Multimedia::Metadata::FileTag | tag, |
| StormByte::Safe::String | value ) |
| StormByte::Safe::Optional< StormByte::Safe::String > StormByte::Multimedia::Pipeline::Muxer::Title | ( | int | output_index | ) | const |
Title tag for mux output output_index.
| output_index | Mux destination order key. |
| void StormByte::Multimedia::Pipeline::Muxer::Title | ( | int | output_index, |
| StormByte::Safe::String | title ) |
Sets the title tag for mux output output_index.
| output_index | Mux destination order key. |
| title | Stream title. Empty clears. |
|
friend |
Allows the FFmpeg container backend to access mux state.
|
friend |
Allows the mux worker to drive output and progress.
|
friend |
Allows the mux backend to access its owning stage.
Allows demuxer connections to bind the remux origin.
| demuxer | Origin demuxer. |
| muxer | Destination. |
Required when any remux track is reserved. Without it the muxer cannot clone origin codec parameters. Also shares the tube Progress clock. Does not open the writer during connection. There is no file >> muxer and no muxer >> path.
| demuxer | Origin demuxer. Must outlive header write. |
| muxer | Destination. |
muxer. Allows encoder connections to reserve output tracks.
| encoder | Live encoder. |
| muxer | Destination. |
| encoder | Live encoder. |
| muxer | Destination. |
encoder. Registers a borrowed graph edge and binds the typed packet lane, even without a Plan. Backend reservation and writer opening are deferred until Setup observes a running Plan.
Allows remuxer connections to reserve output tracks.
| remuxer | Live remuxer. |
| muxer | Destination. |
| remuxer | Live remuxer. |
| muxer | Destination. |
remuxer. Registers a borrowed graph edge and binds the typed packet lane, even without a Plan. Backend reservation and writer opening are deferred until Setup observes a running Plan.