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::Plan Class Reference

Closed job intention: source File, destination container and tracks that enter the tube. More...

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

Public Member Functions

std::unique_ptr< PlanClone () const =delete
 Deep copy is not supported (File is move-only).
 
std::unique_ptr< PlanMove ()
 Move into a new pointer.
 
virtual CheckResult Check () const
 Whether this intention is well formed.
 
Lifecycle
 Plan (File &&source, const Container &container, std::filesystem::path destination) noexcept
 Takes source and binds the destination.
 
 Plan (const Plan &)=delete
 
Planoperator= (const Plan &)=delete
 
 Plan (Plan &&other) noexcept=default
 Move constructor.
 
virtual ~Plan () noexcept=default
 Destructor.
 
Planoperator= (Plan &&other) noexcept=default
 Move assignment.
 
Job
const FileSource () const noexcept
 Origin snapshot owned by this Plan.
 
const ContainerContainer () const noexcept
 Destination container (registry).
 
const std::filesystem::path & Destination () const noexcept
 Output path.
 
const class TracksTracks () const noexcept
 Tube tracks.
 
void add (const Track &track)
 Appends a clone of track.
 
void add (Track &&track)
 Appends track.
 

Detailed Description

Closed job intention: source File, destination container and tracks that enter the tube.

Move-only: the File is taken at construction. After the Plan is handed to the tube it is not needed again.

Mux output order is the order of add. add is not idempotent. A track omitted from Tracks is dropped.

Check tests formation of this intention only. Success does not mean the tube will run.

Constructor & Destructor Documentation

◆ Plan() [1/3]

StormByte::Multimedia::Pipeline::Plan::Plan ( File &&  source,
const Container container,
std::filesystem::path  destination 
)
noexcept

Takes source and binds the destination.

Parameters
sourceProbed origin (moved).
containerRegistry destination container.
destinationOutput path.

◆ Plan() [2/3]

StormByte::Multimedia::Pipeline::Plan::Plan ( const Plan )
delete

◆ Plan() [3/3]

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

Move constructor.

Parameters
otherPlan to take.

◆ ~Plan()

virtual StormByte::Multimedia::Pipeline::Plan::~Plan ( )
virtualdefaultnoexcept

Destructor.

Member Function Documentation

◆ add() [1/2]

void StormByte::Multimedia::Pipeline::Plan::add ( const Track track)
inline

Appends a clone of track.

Not idempotent.

Parameters
trackTrack to copy.

◆ add() [2/2]

void StormByte::Multimedia::Pipeline::Plan::add ( Track &&  track)
inline

Appends track.

Not idempotent. Order is mux order.

Parameters
trackTrack to take.

◆ Check()

virtual CheckResult StormByte::Multimedia::Pipeline::Plan::Check ( ) const
virtual

Whether this intention is well formed.

Success means the Plan is coherent as intention. It does not guarantee the tube will work.

Fails when: the Plan was moved-from; Destination is empty; Tracks is empty; Track::In is negative or not in Source; Track::Type is Type::Unknown or does not match the origin stream (or attachment slot); a destination Config::Video / Audio / Subtitle codec has a different Codec::Type than the origin; an attachment MIME is empty or contains *. Duplicate Track::In is allowed. Encode knobs on a remux track (Codec() == nullptr) are ignored. Implementation pins, presets and container/codec pairing are not checked.

Returns
Empty value, or PlanException.

◆ Clone()

std::unique_ptr< Plan > StormByte::Multimedia::Pipeline::Plan::Clone ( ) const
delete

Deep copy is not supported (File is move-only).

◆ Container()

const Container & StormByte::Multimedia::Pipeline::Plan::Container ( ) const
inlinenoexcept

Destination container (registry).

Returns
Container.

◆ Destination()

const std::filesystem::path & StormByte::Multimedia::Pipeline::Plan::Destination ( ) const
inlinenoexcept

Output path.

Returns
Path.

◆ Move()

std::unique_ptr< Plan > StormByte::Multimedia::Pipeline::Plan::Move ( )
inline

Move into a new pointer.

Returns
Owning pointer to the moved Plan.

◆ operator=() [1/2]

Plan & StormByte::Multimedia::Pipeline::Plan::operator= ( const Plan )
delete

◆ operator=() [2/2]

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

Move assignment.

Parameters
otherPlan to take.
Returns
*this.

◆ Source()

const File & StormByte::Multimedia::Pipeline::Plan::Source ( ) const
inlinenoexcept

Origin snapshot owned by this Plan.

Returns
File.

◆ Tracks()

const class Tracks & StormByte::Multimedia::Pipeline::Plan::Tracks ( ) const
inlinenoexcept

Tube tracks.

Index is mux slot.

Returns
Track list.

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