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

Demux, decode, filter, encode, and mux types for multimedia jobs. More...

Namespaces

namespace  StormByte::Multimedia::Backend::Pipeline
 Multimedia-owned pipeline stages and unit holders.
namespace  Pipeline
 Pipeline Demux / decode / filter / encode / mux types.
namespace  StormByte::Multimedia::Backend::Pipeline::Detail::Worker
 Internal pipeline workers.
namespace  StormByte
 Root namespace of the StormByte C++ suite.
namespace  StormByte::Multimedia
 Multimedia module of the StormByte suite.
namespace  StormByte::Multimedia::Pipeline
 Demux / decode / filter / encode / mux types.
namespace  StormByte::Multimedia::Pipeline::Filter
 Frame and packet steps attached to a job or a raw pipeline.
namespace  StormByte::Multimedia::Pipeline::Config
 Per-track intention stored by Plan.

Classes

class  StormByte::Multimedia::FFmpeg::AVFrame
 RAII owner of a libav AVFrame. More...
class  StormByte::Multimedia::FFmpeg::AVPacket
 RAII owner of a libav AVPacket. More...
class  StormByte::Multimedia::Pipeline::Config::Attachment
 Attachment-track intention. More...
class  StormByte::Multimedia::Pipeline::Config::Audio
 Audio-track encoding intention, or Remux without a codec. More...
struct  StormByte::Multimedia::Pipeline::Config::Implementation
 Optional decoder / encoder names for this track. More...
class  StormByte::Multimedia::Pipeline::Config::Base
 Common destination-stream identity. More...
class  StormByte::Multimedia::Pipeline::Decoder
 Decodes packets of one origin track into frames. More...
class  StormByte::Multimedia::Pipeline::Demuxer
 Reads interleaved compressed packets from the Plan reader. More...
class  StormByte::Multimedia::Pipeline::Encoder
 Encodes frames of one output track into packets. More...
class  StormByte::Multimedia::Pipeline::PlanException
 Thrown when Plan::Check finds a malformed plan. More...
class  StormByte::Multimedia::Pipeline::Filters
 Optional facade: Between stretches, Add filters, Close. More...
class  StormByte::Multimedia::Pipeline::Filter::Video::CountFrames
 Counts dest-look units (Encoder / Remuxer). More...
class  StormByte::Multimedia::Pipeline::Frame
 One decoded access unit. More...
class  StormByte::Multimedia::Pipeline::Item
 Facade shared by Frame and Packet. More...
class  StormByte::Multimedia::Pipeline::Muxer
 Writes interleaved packets to the Plan writer. More...
class  StormByte::Multimedia::Pipeline::Packet
 One compressed access unit. More...
class  StormByte::Multimedia::Pipeline::Plan
 Closed job intention: owned location reader, writer and tracks. More...
class  StormByte::Multimedia::Pipeline::Progress
 Job clock for one tube. More...
class  StormByte::Multimedia::Pipeline::Remuxer
 Forwards compressed packets of one origin track to the muxer. More...
class  StormByte::Multimedia::Pipeline::SideData
 One side-data blob attached to a Frame or Packet. More...
class  StormByte::Multimedia::Pipeline::Step
 A pipeline stage that receives and emits media items. More...
class  StormByte::Multimedia::Pipeline::StageTelemetry
 Thread-safe counters and timings for one pipeline worker. More...
class  StormByte::Multimedia::Pipeline::JobTelemetry
 Retained job telemetry with per-stage snapshots and RSS samples. More...
class  StormByte::Multimedia::Pipeline::Track
 One source stream that enters the tube. More...
class  StormByte::Multimedia::Pipeline::Tracks
 Ordered tube tracks. More...
class  StormByte::Multimedia::Pipeline::TrackSettled
 What an encoder actually opened. More...
class  StormByte::Multimedia::Pipeline::Transcoder
 Facade that maps tracks and runs one reader-to-writer job. More...
class  StormByte::Multimedia::Pipeline::Transcoder::Track
 Fluent handle for one origin stream in this job. More...
class  StormByte::Multimedia::Pipeline::Kinds
 Bitmask of Kind. More...
class  StormByte::Multimedia::Pipeline::Filter::FFmpeg
 Abstract base for every StormByte Multimedia filter. More...
class  StormByte::Multimedia::Pipeline::Filter::Process
 One-pass filter that mutates decoded frames. More...
class  StormByte::Multimedia::Pipeline::Filter::ProcessTwoPasses
 Process that measures the origin before it rewrites. More...

Enumerations

enum class  StormByte::Multimedia::Pipeline::ResourceUsage : unsigned char { StormByte::Multimedia::Pipeline::ResourceUsage::Full , StormByte::Multimedia::Pipeline::ResourceUsage::Medium , StormByte::Multimedia::Pipeline::ResourceUsage::Low }
 Relative CPU policy and automatic queue-capacity profile. More...
enum class  StormByte::Multimedia::Pipeline::ImplementationSide { StormByte::Multimedia::Pipeline::ImplementationSide::Decoder , StormByte::Multimedia::Pipeline::ImplementationSide::Encoder }
 Codec stage selected by a track implementation pin. More...
enum class  StormByte::Multimedia::Pipeline::Status {
  StormByte::Multimedia::Pipeline::Status::Stopped , StormByte::Multimedia::Pipeline::Status::Running , StormByte::Multimedia::Pipeline::Status::Paused , StormByte::Multimedia::Pipeline::Status::Done ,
  StormByte::Multimedia::Pipeline::Status::Error , StormByte::Multimedia::Pipeline::Status::Aborted
}
 Lifecycle of a Transcoder instance. More...
enum class  StormByte::Multimedia::Pipeline::Kind : std::uint8_t { StormByte::Multimedia::Pipeline::Kind::Packet = 1 << 0 , StormByte::Multimedia::Pipeline::Kind::Frame = 1 << 1 }
 Whether an Item is a decoded frame or a compressed packet. More...
enum class  StormByte::Multimedia::Pipeline::Producer : std::uint8_t {
  StormByte::Multimedia::Pipeline::Producer::Demuxer , StormByte::Multimedia::Pipeline::Producer::Decoder , StormByte::Multimedia::Pipeline::Producer::Remuxer , StormByte::Multimedia::Pipeline::Producer::Filter ,
  StormByte::Multimedia::Pipeline::Producer::Route , StormByte::Multimedia::Pipeline::Producer::Filters , StormByte::Multimedia::Pipeline::Producer::Encoder , StormByte::Multimedia::Pipeline::Producer::Muxer
}
 Named stage of the tube. More...
enum class  StormByte::Multimedia::Pipeline::State : std::uint8_t {
  StormByte::Multimedia::Pipeline::State::Created , StormByte::Multimedia::Pipeline::State::Ready , StormByte::Multimedia::Pipeline::State::Stopping , StormByte::Multimedia::Pipeline::State::Stopped ,
  StormByte::Multimedia::Pipeline::State::Failed
}
 Lifecycle of the stage thread. More...

Detailed Description

Demux, decode, filter, encode, and mux types for multimedia jobs.

The pipeline connects track processing and analytics through shared jobs, progress clocks, and retained telemetry. Transcoder provides the fluent coordinator, while individual stages support hand-built processing routes.

Enumeration Type Documentation

◆ ImplementationSide

Codec stage selected by a track implementation pin.

Enumerator
Decoder 

Source decoder implementation.

Encoder 

Destination encoder implementation.

◆ Kind

enum class StormByte::Multimedia::Pipeline::Kind : std::uint8_t
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 

Compressed StormByte::Multimedia::Pipeline::Packet.

Frame 

Decoded StormByte::Multimedia::Pipeline::Frame.

◆ Producer

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

Named stage of the tube.

Used as Item origin and as Step display name for logs. Filter covers Filter::FFmpeg and its Process / Packet / Analytics leaves.

Enumerator
Demuxer 

Demuxer stage.

Decoder 

Decoder stage.

Remuxer 

Remuxer stage.

Filter 

Filter::FFmpeg stage.

Route 

A configured connection between pipeline stages.

Filters 

Filters stage.

Encoder 

Encoder stage.

Muxer 

Muxer stage.

◆ ResourceUsage

enum class StormByte::Multimedia::Pipeline::ResourceUsage : unsigned char
strong

Relative CPU policy and automatic queue-capacity profile.

These settings guide codec thread counts, automatic frame/packet queue limits, filter queues and VMAF's memory-intensive analysis worker pool. Explicit BufferingPolicy overrides queue element caps independently of this CPU policy. They are best-effort hints: FFmpeg, encoder libraries, filters and hardware drivers may create workers outside Multimedia's control.

Enumerator
Full 

Keep native codec threading and all requested VMAF workers, with bounded queues.

Medium 

Target approximately half of available process CPUs.

Low 

Target at most two available process CPUs.

◆ State

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

Lifecycle of the stage thread.

Values are mutually exclusive.

Describes an individual stage, not the whole job or its neighbors. Inspect it through Step::Status.

  • Created: constructed and available for configuration, but not ready to process media. Binding a Plan, connecting stages, stopping and reporting failure are permitted.
  • Ready: initialized and processing media. End of input leads to Stopped; cancellation or failure may also end processing.
  • Stopping: shutdown has been requested but has not completed. This is not a failure; pending output may still be flushed.
  • Stopped: processing has ended, naturally or after a stop request.
  • Failed: processing failed; Step::Error provides the reason.

Legal transitions are Created to Ready, Failed or Stopping; Ready to Stopping, Failed or Stopped; and Stopping to Stopped. Failed and Stopped are terminal: stages cannot be restarted. Source end-of-file is reported separately by Demuxer::Eof.

Enumerator
Created 

Constructed and available for configuration.

Ready 

Initialized and processing media.

Stopping 

Shutdown requested but not completed.

Stopped 

Processing has ended.

Failed 

Processing failed; Step::Error provides the reason.

◆ Status

Lifecycle of a Transcoder instance.

The constructor leaves the job Stopped. Run starts the coordinator. OnStart may return Stopped / Error / Aborted to bail without starting the job. A second Run fails. Pause does not require a new instance. After Stop the job is spent.

Enumerator
Stopped 

Constructed; 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.