|
StormByte C++ Library: Multimedia module 0.0.9999
StormByte-Multimedia is a StormByte library module for parsing configuration files
|
Demux / decode / filter / encode / mux types. More...
Namespaces | |
| namespace | Filter |
| Forward so this RAII type can friend the filter base. | |
| namespace | Config |
| Per-track intention stored by Plan. | |
Classes | |
| class | DecoderFlags |
| Bitmask of DecoderFlag. More... | |
| class | Decoder |
| Decodes packets of one origin track into frames. More... | |
| class | Demuxer |
| Reads interleaved packets from a File origin. More... | |
| class | Encoder |
| Encodes frames of one output track into packets. More... | |
| class | PlanException |
| Thrown when Plan::Check finds a malformed plan. More... | |
| class | Filters |
| Optional facade: Between stretches, Add filters, Close. More... | |
| class | Frame |
| One decoded access unit. More... | |
| class | Item |
| Facade shared by Frame and Packet. More... | |
| class | Muxer |
| Writes interleaved packets to a destination container. More... | |
| class | Packet |
| One compressed access unit. More... | |
| class | Plan |
| Closed job intention: source File, destination container and tracks that enter the tube. More... | |
| class | Progress |
| Job clock for one tube. More... | |
| class | Remuxer |
| Forwards compressed packets of one origin track to the muxer. More... | |
| class | SideData |
| One side-data blob attached to a Frame or Packet. More... | |
| class | Step |
| One stage with a Backend::Pipeline::Pipe (in / out). More... | |
| class | Track |
| One source stream that enters the tube. More... | |
| class | Tracks |
| Ordered tube tracks. More... | |
| class | TrackSettled |
| What an encoder actually opened. More... | |
| class | Transcoder |
| Facade that maps tracks and runs one file-to-file job. More... | |
| class | Kinds |
| Bitmask of Kind. More... | |
Typedefs | |
| using | CheckResult = StormByte::Expected<void, PlanException> |
| Outcome of Plan::Check. | |
Enumerations | |
| enum class | DecoderFlag : std::uint8_t { HeuristicsHDR10 = 1u << 0 } |
| Decoder behaviour bits. More... | |
| enum class | SideDataKind { MasteringDisplay , ContentLight , HdrPlus , HdrVivid , A53CC , Stereo3D , DisplayMatrix , IccProfile , S12MTimecode , Spherical , SeiUnregistered , FilmGrain , DolbyVisionRpu , DolbyVision , AmbientViewing , Other } |
| Known libav side-data kinds on a Frame or Packet. More... | |
| enum class | Status { Stopped , Running , Paused , Done , Error , Aborted } |
| Lifecycle of a Transcoder instance. More... | |
| enum class | Kind : std::uint8_t { Packet = 1 << 0 , Frame = 1 << 1 } |
| Whether an Item is a decoded frame or a compressed packet. More... | |
| enum class | Producer : std::uint8_t { Demuxer , Decoder , Remuxer , Filter , Route , Filters , Encoder , Muxer } |
| Named stage of the tube. More... | |
| enum class | State : std::uint8_t { Created , Ready , Stopping , Stopped , Failed } |
| Lifecycle of the stage thread. More... | |
Functions | |
| Decoder & | operator>> (Demuxer &demuxer, Decoder &decoder) |
Binds one origin track of demuxer to decoder. | |
| Encoder & | operator>> (Encoder &encoder, Muxer &muxer) |
Reserves encoder as an output track of muxer. | |
| Remuxer & | operator>> (Remuxer &remuxer, Muxer &muxer) |
Reserves remuxer as an output track of muxer. | |
| Muxer & | operator>> (Muxer &muxer, const std::filesystem::path &path) |
Binds the output path of muxer. | |
| Muxer & | operator>> (const File &file, Muxer &muxer) |
Snapshots attachments of file onto muxer. | |
| Muxer & | operator>> (Demuxer &demuxer, Muxer &muxer) |
Binds demuxer as remux origin and forwards its attachments. | |
| Demuxer & | operator>> (Plan &&plan, Demuxer &demuxer) |
Hands plan to demuxer. | |
| Remuxer & | operator>> (Demuxer &demuxer, Remuxer &remuxer) |
Binds origin track remuxer.In() from demuxer onto remuxer. | |
| class Step & | operator>> (Step &from, Step &to) |
Shares Plan and binds every output hopper of from onto to. | |
| constexpr const char * | ToString (Kind kind) noexcept |
| Converts a single Kind flag to a string literal. | |
| constexpr const char * | ToString (Producer producer) noexcept |
| Converts a Producer to a string literal. | |
Variables | |
| const DecoderFlags | Heuristics {DecoderFlag::HeuristicsHDR10} |
| All current heuristic bits. | |
Demux / decode / filter / encode / mux types.
| using StormByte::Multimedia::Pipeline::CheckResult = StormByte::Expected<void, PlanException> |
Outcome of Plan::Check.
|
strong |
|
strong |
Whether an Item is a decoded frame or a compressed packet.
Distinct from StormByte::Multimedia::Type (Video / Audio / Subtitle). Values are bit flags. 0 is not a valid kind. Combine with Kinds. ToString understands a single flag only.
| Enumerator | |
|---|---|
| Packet | |
| Frame | |
|
strong |
|
strong |
Known libav side-data kinds on a Frame or Packet.
Unmapped libav types use SideDataKind::Other and keep the FFmpeg name in SideData::Name.
|
strong |
Lifecycle of the stage thread.
Values are mutually exclusive.
This is the state of this stage, not of the job and not of the bound neighbor. A neighbor learns that this stage is dead because the shared hopper is Eof, not by reading this enum.
Owned by the Pumper. A Worker has no State: it only Fail()s into the Host. Step::Status forwards to the Pumper.
Created Constructor finished. The object is usable: Plan can be bound, operator>> can wire hoppers, Stop/Fail are legal. Setup/Open has not returned. Pump must not take units from the input hopper. Launch has usually already spawned the thread; the thread is blocked inside Setup (waiting for a Plan, an origin, a path, …). This is the only state in which Setup may run to completion.
Ready Setup returned. The backend (if any) can take work. Pump may pop and call Process. There is no separate "running" value: pumping is what a Ready thread does, not a new phase. Fail or Stop may still fire from here. When the input hopper reaches Eof and Pump returns without Stop(), Launch moves Ready → Stopped. That is how a stage ends in a live tube (Analytics after the last look, Muxer after the last packet). Filters::Idle and Transcoder wait that Stopped before Reports / OnDone.
Stopping Stop() was called, or Halt() from a destructor. Hoppers are Eof and waiters are notified. The thread has not joined yet. Pump and Setup must return. This is not a failure; the last Process({}) flush may still run.
Stopped The thread has left. Hoppers stay Eof. Reached from Stopping after Halt/Stop, or from Ready after a natural hopper Eof. The tube is not reused: there is no restart back to Created.
Failed Fail() latched a reason. Hoppers are Eof. Terminal, like Stopped, but Error() is set. May be entered from Created (Setup never succeeded) or from Ready. Does not pass through Stopping.
Legal moves: Created→Ready, Created→Failed, Created→Stopping, Ready→Stopping, Ready→Failed, Ready→Stopped, Stopping→Stopped. Failed and Stopped do not leave.
Source EOF is not a State. Demuxer keeps m_eof next to this.
| Enumerator | |
|---|---|
| Created | |
| Ready | |
| Stopping | |
| Stopped | |
| Failed | |
|
strong |
Lifecycle of a Transcoder instance.
Open leaves the job Stopped. Run starts the coordinator. OnStart may return Stopped / Error / Aborted to bail without starting the job.
| Enumerator | |
|---|---|
| Stopped | Open succeeded; Run has not started, or OnStart declined. |
| Running | Coordinator is alive and not paused. |
| Paused | Pause(); coordinator blocks until Resume or Cancel. |
| Done | Finished and flushed. |
| Error | A stage failed; Error() has text. |
| Aborted | Cancel() while Running/Paused, or OnStart returned Aborted. |
Snapshots attachments of file onto muxer.
| file | Source file. |
| muxer | Destination. |
muxer.
|
noexcept |
Binds one origin track of demuxer to decoder.
| demuxer | Origin demuxer. |
| decoder | Destination decoder. |
decoder. Binds demuxer as remux origin and forwards its attachments.
Required when any remux track is reserved. Without it the muxer cannot clone origin codec parameters. Also shares the tube Progress clock.
| demuxer | Origin demuxer. Must outlive header write. |
| muxer | Destination. |
muxer.
|
noexcept |
Binds origin track remuxer.In() from demuxer onto remuxer.
| demuxer | Origin demuxer. |
| remuxer | Destination remuxer. |
remuxer. Reserves encoder as an output track of muxer.
| encoder | Live encoder. |
| muxer | Destination. |
encoder. Hands plan to demuxer.
Not a Step bind.
| plan | Intention (moved). |
| demuxer | Destination. |
demuxer.Stores the Plan on the Demuxer and wakes it. Does not call Plan::Check and does not bind hoppers.
Reserves remuxer as an output track of muxer.
| remuxer | Live remuxer. |
| muxer | Destination. |
remuxer.
|
constexprnoexcept |
|
constexprnoexcept |
Converts a Producer to a string literal.
| producer | Value to convert. |
|
inline |
All current heuristic bits.