StormByte C++ Library: Multimedia module 0.0.9999
StormByte-Multimedia is a StormByte library module for parsing configuration files
Loading...
Searching...
No Matches
Public Member Functions | List of all members
StormByte::Multimedia::Pipeline::Track Class Reference

One source stream that enters the tube. More...

#include <StormByte/multimedia/pipeline/track.hxx>

Inheritance diagram for StormByte::Multimedia::Pipeline::Track:
Inheritance graph
[legend]
Collaboration diagram for StormByte::Multimedia::Pipeline::Track:
Collaboration graph
[legend]

Public Member Functions

PointerType Clone () const override
 Deep copy.
 
PointerType Move () override
 Move into a new pointer.
 
Lifecycle
 Track (int in, enum StormByte::Multimedia::Type type) noexcept
 Track without a config leaf.
 
 Track (int in, const Config::Base &config) noexcept
 Builds a track; clones config and copies its type.
 
 Track (int in, Config::Base &&config) noexcept
 Builds a track; moves config and copies its type.
 
 Track (const Track &other)
 Copy constructor.
 
 Track (Track &&other) noexcept=default
 Move constructor.
 
virtual ~Track () noexcept override=default
 Destructor.
 
Trackoperator= (const Track &other)
 Copy assignment.
 
Trackoperator= (Track &&other) noexcept=default
 Move assignment.
 
Intention
enum StormByte::Multimedia::Type Type () const noexcept
 Media stamped at construction.
 
int In () const noexcept
 Origin stream index.
 
const Config::BaseConfig () const noexcept
 Track config leaf, if any.
 

Detailed Description

One source stream that enters the tube.

Intention only. Does not check that In exists on the origin File, nor that Type matches that stream. Consumers of Plan validate.

Mux slot is the index of this track in Tracks, not a field. Type is always stored. When a config is passed, Type is copied from the leaf. A null Config is an attachment (or no leaf). A non-null config with codec nullptr means Remux.

Constructor & Destructor Documentation

◆ Track() [1/5]

StormByte::Multimedia::Pipeline::Track::Track ( int  in,
enum StormByte::Multimedia::Type  type 
)
noexcept

Track without a config leaf.

Parameters
inOrigin stream index.
typeMedia type (typically StormByte::Multimedia::Type::Attachment).

◆ Track() [2/5]

StormByte::Multimedia::Pipeline::Track::Track ( int  in,
const Config::Base config 
)
noexcept

Builds a track; clones config and copies its type.

Parameters
inOrigin stream index.
configLeaf config.

◆ Track() [3/5]

StormByte::Multimedia::Pipeline::Track::Track ( int  in,
Config::Base &&  config 
)
noexcept

Builds a track; moves config and copies its type.

Parameters
inOrigin stream index.
configLeaf config.

◆ Track() [4/5]

StormByte::Multimedia::Pipeline::Track::Track ( const Track other)

Copy constructor.

Deep-copies Config if present.

Parameters
otherSource track.

◆ Track() [5/5]

StormByte::Multimedia::Pipeline::Track::Track ( Track &&  other)
defaultnoexcept

Move constructor.

Parameters
otherTrack to take.

◆ ~Track()

virtual StormByte::Multimedia::Pipeline::Track::~Track ( )
overridevirtualdefaultnoexcept

Destructor.

Member Function Documentation

◆ Clone()

PointerType StormByte::Multimedia::Pipeline::Track::Clone ( ) const
inlineoverride

Deep copy.

Returns
Owning pointer to a new Track.

◆ Config()

const Config::Base * StormByte::Multimedia::Pipeline::Track::Config ( ) const
inlinenoexcept

Track config leaf, if any.

Returns
Leaf, or nullptr for attachments / no config.

◆ In()

int StormByte::Multimedia::Pipeline::Track::In ( ) const
inlinenoexcept

Origin stream index.

Returns
Index in the Plan source File.

◆ Move()

PointerType StormByte::Multimedia::Pipeline::Track::Move ( )
inlineoverride

Move into a new pointer.

Returns
Owning pointer to the moved Track.

◆ operator=() [1/2]

Track & StormByte::Multimedia::Pipeline::Track::operator= ( const Track other)

Copy assignment.

Deep-copies Config if present.

Parameters
otherSource track.
Returns
*this.

◆ operator=() [2/2]

Track & StormByte::Multimedia::Pipeline::Track::operator= ( Track &&  other)
defaultnoexcept

Move assignment.

Parameters
otherTrack to take.
Returns
*this.

◆ Type()

enum StormByte::Multimedia::Type StormByte::Multimedia::Pipeline::Track::Type ( ) const
inlinenoexcept

Media stamped at construction.

Returns
Type from the no-config ctor or from the leaf.

The documentation for this class was generated from the following file: