Reads interleaved compressed packets from the Plan reader. More...
#include <StormByte/multimedia/pipeline/demuxer.hxx>


Public Member Functions | |
| operator bool () const noexcept | |
| true if open, not failed and not at EOF. | |
Lifecycle | |
| Demuxer (StormByte::Safe::Shared< StormByte::Logger::Log > log) | |
| Demuxer. | |
| Demuxer (StormByte::Safe::Shared< StormByte::Logger::Log > log, StormByte::Safe::Shared< class Progress > progress) | |
| Launch with a clock already used by duration resolution. | |
| Demuxer (const Demuxer &other)=delete | |
| Copy constructor. | |
| Demuxer (Demuxer &&other) noexcept=delete | |
| Move constructor. | |
| ~Demuxer () noexcept override | |
| Destructor. | |
| Demuxer & | operator= (const Demuxer &other)=delete |
| Copy assignment. | |
| Demuxer & | operator= (Demuxer &&other) noexcept=delete |
| Move assignment. | |
Source | |
| bool | Eof () const noexcept |
| Whether the last read hit EOF. | |
| StormByte::Safe::Optional< Property::Duration > | Position () const |
| Presentation time of the last emitted packet. | |
| Progress::Pointer | Progress () const noexcept |
| Job clock for this tube (measure, analytics, All). | |
| 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. | |
| virtual bool | Ready () const noexcept |
| Whether this step can take work. | |
| void | Stop () noexcept |
| Requests shutdown and notifies connected stages. | |
| virtual StormByte::Size | InputCeiling () const noexcept |
| Maximum number of queued input items. | |
| 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::Demuxer |
| class | Backend::Pipeline::Detail::Worker::Demux |
| class | Decoder |
| class | Filters |
| class | Muxer |
| Decoder & | operator>> (Demuxer &demuxer, Decoder &decoder) |
Binds one origin track of demuxer to decoder. | |
| Demuxer & | operator>> (class Plan &&plan, Demuxer &demuxer) noexcept |
| Demuxer & | operator>> (StormByte::Safe::Shared< class Plan > plan, Demuxer &demuxer) |
| Transfers a shared intention without slicing its dynamic type. | |
| Muxer & | operator>> (Demuxer &demuxer, Muxer &muxer) |
Binds demuxer as remux origin and forwards Plan attachments. | |
| Remuxer & | operator>> (Demuxer &demuxer, Remuxer &remuxer) |
Binds origin track remuxer.In() from demuxer onto remuxer. | |
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 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. | |
Reads interleaved compressed packets from the Plan reader.
Only tracks listed in the bound Plan are emitted. Binding a second Plan fails the stage. Input comes from the Plan's seekable StormByte::Buffer::IO::BufferedLocationReader.
With Filter::ProcessTwoPasses filters, the required tracks are read for measurement first. Once measurement completes, the source is rewound and read again for the output pass.
Progress() returns a shared, read-only progress handle that remains usable after the pipeline has been destroyed. It includes filtering and output progress for the same job.
Each packet receives a serial number within its origin track and part zero. This identifies source lineage, not frame count.
| StormByte::Multimedia::Pipeline::Demuxer::Demuxer | ( | StormByte::Safe::Shared< StormByte::Logger::Log > | log, |
| StormByte::Safe::Shared< class Progress > | progress ) |
Launch with a clock already used by duration resolution.
| log | Shared logger. |
| progress | Shared job clock; empty creates a fresh clock. |
|
delete |
Copy constructor.
| other | Source demuxer. |
|
deletenoexcept |
Move constructor.
| other | Demuxer to take. |
|
overridenoexcept |
Destructor.
Step::Join Halt s before backends die.
|
noexcept |
Whether the last read hit EOF.
Measurement end-of-file is cleared before the output pass.
|
explicitnoexcept |
true if open, not failed and not at EOF.
Copy assignment.
| other | Source demuxer. |
| StormByte::Safe::Optional< Property::Duration > StormByte::Multimedia::Pipeline::Demuxer::Position | ( | ) | const |
Presentation time of the last emitted packet.
|
noexcept |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Binds one origin track of demuxer to decoder.
| demuxer | Origin demuxer. |
| decoder | Destination decoder. |
decoder. Binds demuxer as remux origin and forwards Plan attachments.
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. Binds origin track remuxer.In() from demuxer onto remuxer.
| demuxer | Origin demuxer. |
| remuxer | Destination remuxer. |
remuxer.
|
friend |
Transfers a shared intention without slicing its dynamic type.
| plan | Provider-created intention owner. |
| demuxer | Destination stage. |