StormByte C++ Library: Multimedia module 0.0.9999
StormByte-Multimedia is a StormByte library module for parsing configuration files
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
StormByte::Multimedia::Pipeline Namespace Reference

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

Namespaces

namespace  Config
 Per-track intention stored by Plan.
 
namespace  Filter
 Forward so this RAII type can friend the filter base.
 

Classes

class  Decoder
 Decodes packets of one origin track into frames. More...
 
class  DecoderFlags
 Bitmask of DecoderFlag. More...
 
class  Demuxer
 Reads interleaved packets from a File origin. More...
 
class  Encoder
 Encodes frames of one output track into packets. 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  Kinds
 Bitmask of Kind. 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  PlanException
 Thrown when Plan::Check finds a malformed plan. More...
 
class  Remuxer
 Forwards compressed packets of one origin track to the muxer. More...
 
class  Route
 Owns the filter chain of one origin track and two ends. 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...
 

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
}
 
enum class  Kind : std::uint8_t { Packet = 1 << 0 , Frame = 1 << 1 }
 
enum class  Producer : std::uint8_t {
  Demuxer , Decoder , Remuxer , Filter ,
  Route , Filters , Encoder , Muxer
}
 
enum class  State : std::uint8_t {
  Created , Ready , Stopping , Stopped ,
  Failed
}
 

Functions

Decoderoperator>> (Demuxer &demuxer, Decoder &decoder) noexcept
 Binds one origin track of demuxer to decoder.
 
Encoderoperator>> (Encoder &encoder, Muxer &muxer) noexcept
 Reserves encoder as an output track of muxer.
 
Remuxeroperator>> (Remuxer &remuxer, Muxer &muxer) noexcept
 Reserves remuxer as an output track of muxer.
 
Muxeroperator>> (Muxer &muxer, const std::filesystem::path &path) noexcept
 Binds the output path of muxer.
 
Muxeroperator>> (const File &file, Muxer &muxer) noexcept
 Snapshots attachments of file onto muxer.
 
Muxeroperator>> (Demuxer &demuxer, Muxer &muxer) noexcept
 Binds demuxer as remux origin and forwards its attachments.
 
Demuxeroperator>> (Plan &&plan, Demuxer &demuxer) noexcept
 Hands plan to demuxer.
 
Remuxeroperator>> (Demuxer &demuxer, Remuxer &remuxer) noexcept
 Binds origin track remuxer.In() from demuxer onto remuxer.
 
class Stepoperator>> (Step &from, Step &to) noexcept
 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.
 

Detailed Description

Demux / decode / filter / encode / mux types.

Typedef Documentation

◆ CheckResult

using StormByte::Multimedia::Pipeline::CheckResult = typedef StormByte::Expected<void, PlanException>

Outcome of Plan::Check.

Enumeration Type Documentation

◆ DecoderFlag

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

Decoder behaviour bits.

Empty mask is passthrough.

Enumerator
HeuristicsHDR10 

◆ Kind

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

◆ Producer

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

Demuxer

Decoder 

Decoder

Remuxer 

Remuxer

Filter 

Filter::FFmpeg

Route 

Route

Filters 

Filters

Encoder 

Encoder

Muxer 

Muxer

◆ 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; Name() is set.

◆ State

enum class StormByte::Multimedia::Pipeline::State : std::uint8_t
strong
Enumerator
Created 
Ready 
Stopping 
Stopped 
Failed 

◆ Status

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.

Function Documentation

◆ operator>>() [1/9]

Muxer & StormByte::Multimedia::Pipeline::operator>> ( const File file,
Muxer muxer 
)
noexcept

Snapshots attachments of file onto muxer.

Parameters
fileSource file.
muxerDestination.
Returns
muxer.

◆ operator>>() [2/9]

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

Binds one origin track of demuxer to decoder.

Parameters
demuxerOrigin demuxer.
decoderDestination decoder.
Returns
decoder.

◆ operator>>() [3/9]

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

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.

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

◆ operator>>() [4/9]

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

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

Parameters
demuxerOrigin demuxer.
remuxerDestination remuxer.
Returns
remuxer.

◆ operator>>() [5/9]

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

Reserves encoder as an output track of muxer.

Parameters
encoderLive encoder.
muxerDestination.
Returns
encoder.

◆ operator>>() [6/9]

Muxer & StormByte::Multimedia::Pipeline::operator>> ( Muxer muxer,
const std::filesystem::path &  path 
)
noexcept

Binds the output path of muxer.

Parameters
muxerMuxer.
pathDestination file.
Returns
muxer.

◆ operator>>() [7/9]

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

Hands plan to demuxer.

Not a Step bind.

Parameters
planIntention (moved).
demuxerDestination.
Returns
demuxer.

Stores the Plan on the Demuxer and wakes it. Does not call Plan::Check and does not bind hoppers.

◆ operator>>() [8/9]

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

Reserves remuxer as an output track of muxer.

Parameters
remuxerLive remuxer.
muxerDestination.
Returns
remuxer.

◆ operator>>() [9/9]

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

Shares Plan and binds every output hopper of from onto to.

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

Does not bind the analytics tap.

Parameters
fromProducer step.
toConsumer step.
Returns
to.

◆ ToString() [1/2]

constexpr 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]

constexpr 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.