StormByte-Multimedia 3.3.2
C++26 multimedia processing module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Multimedia::Pipeline Namespace Reference

Demux / decode / filter / encode / mux types. More...

Namespaces

namespace  Filter
 Frame and packet steps attached to a job or a raw pipeline.
namespace  Config
 Per-track intention stored by Plan.
namespace  Detail
 Internal route and filter binding records.

Classes

struct  WorkerActivitySnapshot
 Coherent, allocation-free value for one worker execution. More...
struct  StageActivitySnapshot
 Activity coverage and independent workers of a stage. More...
class  WorkerActivity
 Provider-owned clock for one execution thread. More...
class  QueueLimit
 Automatic, explicitly bounded, or unlimited queue element cap. More...
class  BufferingPolicy
 Queue element-cap overrides shared by Plans and Transcoders. More...
class  DecoderFlags
 Bitmask of DecoderFlag. More...
class  Decoder
 Decodes packets of one origin track into frames. More...
class  Demuxer
 Reads interleaved compressed packets from the Plan reader. 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 the Plan writer. More...
class  Packet
 One compressed access unit. More...
class  Plan
 Closed job intention: owned location reader, writer and tracks. 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
 A pipeline stage that receives and emits media items. More...
class  StageTelemetry
 Thread-safe counters and timings for one pipeline worker. More...
struct  TelemetryStage
 Named stage telemetry retained past worker teardown. More...
struct  TopologyQueueRef
 Stage-to-queue link in a topology snapshot. More...
struct  TopologyStage
 Structured identity of one real pipeline stage. More...
struct  TopologyQueue
 One real queue and its Buffer accounting. More...
struct  TopologyBudget
 Shared byte budget reported once for every queue that charges it. More...
struct  TopologySnapshot
 Owned, coherent-per-queue view of the pipeline stages and queues. More...
class  JobTelemetry
 Retained job telemetry with per-stage snapshots and RSS samples. 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 reader-to-writer job. More...
class  Kinds
 Bitmask of Kind. More...

Typedefs

using CheckResult = StormByte::Expected<void, PlanException>
 Outcome of Plan::Check.

Enumerations

enum class  ActivityState : std::uint8_t {
  Unknown , Preparing , Processing , WaitingInput ,
  WaitingOutput , WaitingBudget , Paused , Finished ,
  Failed
}
 Exclusive wall-clock activity of one instrumented worker, not CPU use. More...
enum class  ActivityRole : std::uint8_t { Main , DemuxFeeder }
 Concurrent execution domains; codec-internal threads are not observed. More...
enum class  DecoderFlag : std::uint8_t { HeuristicsHDR10 = 1u << 0 }
 Decoder behaviour bits. More...
enum class  ResourceUsage : unsigned char { ResourceUsage::Full , ResourceUsage::Medium , ResourceUsage::Low }
 Relative CPU policy and automatic queue-capacity profile. 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  TopologyStageKind : std::uint8_t {
  Demuxer , Decoder , Filter , Encoder ,
  Remuxer , Muxer , InspectionDecoder
}
 Kind of real pipeline stage reported by JobTelemetry::Topology. More...
enum class  TopologyFilterKind : std::uint8_t {
  None , Process , Packet , Analytics ,
  Other
}
 Filter family of a TopologyStageKind::Filter stage. More...
enum class  TopologyQueueRole : std::uint8_t { Input , Output , Pending }
 Relation between a stage and one queue. More...
enum class  TopologyQueueKind : std::uint8_t { Pipe , DemuxPending }
 Storage that backs a TopologyQueue. More...
enum class  TopologySnapshotState : std::uint8_t { Live , Final , Unfrozen }
 Whether values are read live or are frozen copies. More...
enum class  ImplementationSide { ImplementationSide::Decoder , ImplementationSide::Encoder }
 Codec stage selected by a track implementation pin. More...
enum class  Status {
  Status::Stopped , Status::Running , Status::Paused , Status::Done ,
  Status::Error , Status::Aborted
}
 Lifecycle of a Transcoder instance. More...
enum class  Kind : std::uint8_t { Kind::Packet = 1 << 0 , Kind::Frame = 1 << 1 }
 Whether an Item is a decoded frame or a compressed packet. More...
enum class  Producer : std::uint8_t {
  Producer::Demuxer , Producer::Decoder , Producer::Remuxer , Producer::Filter ,
  Producer::Route , Producer::Filters , Producer::Encoder , Producer::Muxer
}
 Named stage of the tube. More...
enum class  State : std::uint8_t {
  State::Created , State::Ready , State::Stopping , State::Stopped ,
  State::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>> (Demuxer &demuxer, Muxer &muxer)
 Binds demuxer as remux origin and forwards Plan attachments.
Demuxer & operator>> (StormByte::Safe::Shared< Plan > plan, Demuxer &demuxer)
 Transfers a shared intention without slicing its dynamic type.
Remuxer & operator>> (Demuxer &demuxer, Remuxer &remuxer)
 Binds origin track remuxer.In() from demuxer onto remuxer.
class Step & operator>> (Step &from, Step &to)
 Shares the Plan and connects output from from to 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.

Detailed Description

Demux / decode / filter / encode / mux types.

Pipeline Demux / decode / filter / encode / mux types.

Asynchronous pipeline telemetry.

Typedef Documentation

◆ CheckResult

Enumeration Type Documentation

◆ ActivityRole

enum class StormByte::Multimedia::Pipeline::ActivityRole : std::uint8_t
strong

Concurrent execution domains; codec-internal threads are not observed.

Enumerator
Main 

Stage's pumper thread.

DemuxFeeder 

Independent per-track demux output thread.

◆ ActivityState

enum class StormByte::Multimedia::Pipeline::ActivityState : std::uint8_t
strong

Exclusive wall-clock activity of one instrumented worker, not CPU use.

Unknown is unclassified time, never an inferred idle/inefficient state.

Enumerator
Unknown 

Unclassified worker administration or unsupported wait.

Preparing 

Executing Setup, excluding instrumented waits.

Processing 

Executing Process, excluding instrumented waits.

WaitingInput 

Waiting for upstream data or readiness.

WaitingOutput 

Waiting for downstream local capacity or pending output to drain.

WaitingBudget 

Waiting for admission to the shared byte budget.

Paused 

Actually blocked by a cooperative pause.

Finished 

Execution ended, including cancellation.

Failed 

Execution ended with a stage failure.

◆ DecoderFlag

enum class StormByte::Multimedia::Pipeline::DecoderFlag : std::uint8_t
strong

Decoder behaviour bits.

Empty mask is passthrough.

Enumerator
HeuristicsHDR10 

◆ SideDataKind

Known libav side-data kinds on a Frame or Packet.

Unmapped libav types use SideDataKind::Other and keep the FFmpeg name in SideData::Name.

Enumerator
MasteringDisplay 

Mastering display metadata.

ContentLight 

MaxCLL / MaxFALL.

HdrPlus 

HDR10+ dynamic metadata.

HdrVivid 

HDR Vivid dynamic metadata.

A53CC 

CEA-708 / A53 captions.

Stereo3D 

Stereo 3D.

DisplayMatrix 

Display matrix.

IccProfile 

ICC profile.

S12MTimecode 

SMPTE ST 12-1 timecode.

Spherical 

Spherical mapping.

SeiUnregistered 

Unregistered SEI.

FilmGrain 

Film grain parameters.

DolbyVisionRpu 

Dolby Vision RPU.

DolbyVision 

Dolby Vision metadata.

AmbientViewing 

Ambient viewing environment.

Other 

Unknown kind; Name() is set.

◆ TopologyFilterKind

enum class StormByte::Multimedia::Pipeline::TopologyFilterKind : std::uint8_t
strong

Filter family of a TopologyStageKind::Filter stage.

Enumerator
None 

Stage is not a filter.

Process 

Frame-processing filter (Filter::Process and derived).

Packet 

Packet filter (Filter::Packet and derived).

Analytics 

Observing analytics filter (Filter::Analytics and derived).

Other 

Filter of another family.

◆ TopologyQueueKind

enum class StormByte::Multimedia::Pipeline::TopologyQueueKind : std::uint8_t
strong

Storage that backs a TopologyQueue.

Enumerator
Pipe 

Buffer::Sink hopper owned by its consumer stage.

DemuxPending 

Demuxer per-track pending list; elements only, no byte accounting.

◆ TopologyQueueRole

enum class StormByte::Multimedia::Pipeline::TopologyQueueRole : std::uint8_t
strong

Relation between a stage and one queue.

Enumerator
Input 

The stage consumes this queue.

Output 

The stage is a registered producer of this queue.

Pending 

Stage-owned pending queue (demux park) before its output queues.

◆ TopologySnapshotState

Whether values are read live or are frozen copies.

Enumerator
Live 

Read from the running queue or budget when the snapshot was taken.

Final 

Captured when the owning stage or job run was torn down; never changes again.

Unfrozen 

Snapshot only: the run was torn down but its final copy could not be allocated. Queues keep their own Final captures; budgets stay Live and may still change. Complete is false.

◆ TopologyStageKind

enum class StormByte::Multimedia::Pipeline::TopologyStageKind : std::uint8_t
strong

Kind of real pipeline stage reported by JobTelemetry::Topology.

Enumerator
Demuxer 

Container reader; owns the demux pending queues.

Decoder 

Track decoder feeding a decode/encode lane.

Filter 

User or built-in filter leaf (see TopologyFilterKind).

Encoder 

Track encoder feeding the muxer.

Remuxer 

Stream-copy stage feeding the muxer.

Muxer 

Container writer.

InspectionDecoder 

Internal decoder created only to feed analytics filters.

Function Documentation

◆ operator>>() [1/7]

Decoder & StormByte::Multimedia::Pipeline::operator>> ( Demuxer & demuxer,
Decoder & decoder )
noexcept

Binds one origin track of demuxer to decoder.

Connects a demultiplexing stage to a decoding stage.

Parameters
demuxerOrigin demuxer.
decoderDestination decoder.
Returns
decoder.

◆ operator>>() [2/7]

Muxer & StormByte::Multimedia::Pipeline::operator>> ( Demuxer & demuxer,
Muxer & muxer )
noexcept

Binds demuxer as remux origin and forwards Plan attachments.

Connects a demultiplexing stage to a multiplexing stage.

Allows demuxer connections to bind the remux origin.

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.

Parameters
demuxerOrigin demuxer. Must outlive header write.
muxerDestination.
Returns
muxer.

◆ operator>>() [3/7]

Remuxer & StormByte::Multimedia::Pipeline::operator>> ( Demuxer & demuxer,
Remuxer & remuxer )
noexcept

Binds origin track remuxer.In() from demuxer onto remuxer.

Connects a demultiplexing stage to a remultiplexing stage.

Connect the origin demuxer to this remuxer.

Parameters
demuxerOrigin demuxer.
remuxerDestination remuxer.
Returns
remuxer.

◆ operator>>() [4/7]

Encoder & StormByte::Multimedia::Pipeline::operator>> ( Encoder & encoder,
Muxer & muxer )
noexcept

Reserves encoder as an output track of muxer.

Connects an encoding stage to a multiplexing stage.

Allows encoder connections to reserve output tracks.

Parameters
encoderLive encoder.
muxerDestination.
Returns
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.

◆ operator>>() [5/7]

Remuxer & StormByte::Multimedia::Pipeline::operator>> ( Remuxer & remuxer,
Muxer & muxer )
noexcept

Reserves remuxer as an output track of muxer.

Connects a remultiplexing stage to a multiplexing stage.

Connect this remuxer to the destination muxer.

Allows remuxer connections to reserve output tracks.

Parameters
remuxerLive remuxer.
muxerDestination.
Returns
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.

◆ operator>>() [6/7]

class Step & StormByte::Multimedia::Pipeline::operator>> ( Step & from,
Step & to )
noexcept

Shares the Plan and connects output from from to to.

Connects output from one step to another.

Demuxer fan-out is not this operator. A demuxer binds one origin index at a time using the corresponding operator>> overload.

Analytics are configured separately through Filters.

Parameters
fromProducer step.
toConsumer step.
Returns
to.

◆ operator>>() [7/7]

Demuxer & StormByte::Multimedia::Pipeline::operator>> ( StormByte::Safe::Shared< Plan > plan,
Demuxer & demuxer )
noexcept

Transfers a shared intention without slicing its dynamic type.

Binds a plan to a demultiplexing stage.

Parameters
planProvider-created intention owner.
demuxerDestination stage.
Returns
Destination stage.

◆ ToString() [1/2]

const char * StormByte::Multimedia::Pipeline::ToString ( Kind kind)
constexprnoexcept

Converts a single Kind flag to a string literal.

Parameters
kindValue to convert.
Returns
"Frame", "Packet", or "Invalid" for a mask or zero.

◆ ToString() [2/2]

const char * StormByte::Multimedia::Pipeline::ToString ( Producer producer)
constexprnoexcept

Converts a Producer to a string literal.

Parameters
producerValue to convert.
Returns
Null-terminated name, or "Invalid".

Variable Documentation

◆ Heuristics

const DecoderFlags StormByte::Multimedia::Pipeline::Heuristics {DecoderFlag::HeuristicsHDR10}
inline

All current heuristic bits.