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

Facade that maps tracks and runs one reader-to-writer job. More...

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

Classes

class  Track
 Fluent handle for one origin stream in this job. More...

Public Member Functions

const StormByte::Safe::Shared< StormByte::Logger::Log > & Logger () const noexcept
 Logger used by this job after InstallLog.
const StormByte::Safe::Shared< class Plan > & Plan () const noexcept
 Intention built for this job, if any.
Lifecycle
 Transcoder (const StormByte::Safe::String &source, const StormByte::Safe::String &destination, StormByte::Safe::Shared< StormByte::Logger::Log > logger, StormByte::Safe::Optional< std::int64_t > duration={})
 Builds reader and writer from paths.
 Transcoder (const StormByte::Safe::String &source, StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > writer, StormByte::Safe::Shared< StormByte::Logger::Log > logger, StormByte::Safe::Optional< std::int64_t > duration={})
 Builds a local reader and takes writer.
 Transcoder (StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > reader, const StormByte::Safe::String &destination, StormByte::Safe::Shared< StormByte::Logger::Log > logger, StormByte::Safe::Optional< std::int64_t > duration={})
 Takes reader and builds a local writer.
 Transcoder (StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > reader, StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > writer, StormByte::Safe::Shared< StormByte::Logger::Log > logger, StormByte::Safe::Optional< std::int64_t > duration={})
 Takes both location owners without slicing.
 Transcoder (const StormByte::Safe::String &source, const StormByte::Safe::String &destination, const class Container &container, StormByte::Safe::Shared< StormByte::Logger::Log > logger, StormByte::Safe::Optional< std::int64_t > duration={})
 Builds local locations with an authoritative borrowed container.
 Transcoder (const StormByte::Safe::String &source, StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > writer, const class Container &container, StormByte::Safe::Shared< StormByte::Logger::Log > logger, StormByte::Safe::Optional< std::int64_t > duration={})
 Builds a local reader and takes the writer with an explicit container.
 Transcoder (StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > reader, const StormByte::Safe::String &destination, const class Container &container, StormByte::Safe::Shared< StormByte::Logger::Log > logger, StormByte::Safe::Optional< std::int64_t > duration={})
 Takes the reader and builds a writer with an explicit container.
 Transcoder (StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > reader, StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > writer, const class Container &container, StormByte::Safe::Shared< StormByte::Logger::Log > logger, StormByte::Safe::Optional< std::int64_t > duration={})
 Takes both locations with an authoritative borrowed container.
 Transcoder (const Transcoder &other)=delete
 Copy constructor.
 Transcoder (Transcoder &&other)=delete
 Move constructor.
virtual ~Transcoder () noexcept
 Destructor.
Transcoder & operator= (const Transcoder &other)=delete
 Copy assignment.
Transcoder & operator= (Transcoder &&other) noexcept=delete
 Move assignment.
Map
Track Video (int in) noexcept
 Maps a video origin stream.
Track Audio (int in) noexcept
 Maps an audio origin stream.
Track Subtitle (int in) noexcept
 Maps a subtitle origin stream.
Transcoder & Attachments () noexcept
 Keeps every source attachment.
Transcoder & Attachments (std::string_view pattern) noexcept
 Keeps source attachments whose MIME matches pattern.
Transcoder & Tag (StormByte::Multimedia::Metadata::FileTag tag, StormByte::Safe::String value) noexcept
 Replaces a file-level tag in the output.
Transcoder & RemoveTag (StormByte::Multimedia::Metadata::FileTag tag) noexcept
 Writes the output without file tag tag.
ResourceUsage Resources () const noexcept
 Resource policy selected for this job.
void Resources (ResourceUsage usage) noexcept
 Selects a resource policy before Run.
BufferingPolicy Buffering () const noexcept
 Queue capacity overrides used by the Plan built on Run.
void Buffering (const BufferingPolicy &policy) noexcept
 Configure queue element caps before Run.
Transcoder & Ignore (int in) noexcept
 Drops an origin stream (omit from the Plan).
template<typename FilterType, typename... Args>
Transcoder & Filter (Args &&... args)
 Appends a global analytics filter.
Run
void Run () noexcept
 Builds the Plan, starts the coordinator and returns.
void Cancel () noexcept
 Requests abort.
void Pause () noexcept
 Pauses the job.
void Resume () noexcept
 Resumes after Pause.
enum Status Status () const noexcept
 Current lifecycle value.
bool Failed () const noexcept
 Whether the job failed.
StormByte::Safe::Optional< StormByte::Safe::String > Error () const
 Failure text.
StormByte::Safe::Shared< StormByte::Buffer::ReadTelemetry > InputTelemetry () const noexcept
 Shared telemetry for the original input reader.
StormByte::Safe::Shared< StormByte::Buffer::WriteTelemetry > OutputTelemetry () const noexcept
 Shared telemetry for the destination writer.
StormByte::Safe::Shared< const class Progress > Progress () const noexcept
 Shared tube clock.
StormByte::Safe::Vector< StormByte::Safe::Pair< StormByte::Safe::String, Filter::Report > > Reports () const
 Analytics snapshots after the job is Idle.
StormByte::Safe::Shared< const JobTelemetry > Telemetry () const noexcept
 Shared job and stage telemetry, available before Run.
 operator bool () const noexcept
 true if not failed.

Protected Member Functions

virtual void InstallLog ()
 Scopes this job's own logger.
const StormByte::Safe::Shared< StormByte::Logger::Log > & ApplicationLog () const noexcept
 Application logger passed to the constructor.
virtual StormByte::Safe::Shared< class Plan > EmptyPlan (StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > reader, StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > writer, StormByte::Safe::Optional< std::int64_t > duration={}, const class Container *container=nullptr) const
 Allocates the Plan type for this job.
StormByte::Safe::Function< void(double)> DurationProgress () const
 Observer for duration resolution in custom EmptyPlan implementations.
virtual StormByte::Safe::Unique< TrackSettled > EmptySettled () const
 Allocates the settled-row type.
virtual void OnConfigure () noexcept
 Last chance to raise ceilings before the job starts.
virtual enum Status OnStart () noexcept
 Gate after the Plan is filled.
virtual void OnPlan (const class Plan &plan) noexcept
 Intention, just before plan >> demuxer.
virtual void OnSettled (const TrackSettled &track) noexcept
 One encode lane finished Encoder open.
virtual void OnMeasureDone () noexcept
 Measure pass closed.
virtual void OnAnalyticsDone () noexcept
 Analytics taps idle.
virtual void OnProgress () noexcept
 Progress tick.
virtual void OnDone () noexcept
 Successful flush.
virtual void OnError (const StormByte::Safe::String &message) noexcept
 Hard error.
virtual void OnAborted () noexcept
 Cancel completed.

Friends

class Backend::Pipeline::Transcoder
 Backend coordinator that runs this job's pipeline.
class Track
 Fluent handle that configures this job's mapped tracks.

Detailed Description

Facade that maps tracks and runs one reader-to-writer job.

File-to-file job facade.

Connects operator>> and Filters for you. The stock class is a complete job: own reader/writer locations, choose origin streams, remux or encode each one, write through the Plan writer. You do not have to derive anything to transcode.

Four input/output combinations are accepted: path/path, path/writer, reader/path, and reader/writer. Path arguments create local file locations; supplied location owners preserve their dynamic type. The job takes ownership of the reader and writer. Source analysis supplies stream information, attachments and metadata for the Plan.

It is also the extension point. Mix what you need:

  • Hooks only. Keep the stock Plan and override OnConfigure, OnStart, OnPlan, OnSettled, OnMeasureDone, OnAnalyticsDone, OnProgress, OnDone, OnError, OnAborted.
  • A richer intention. Override EmptyPlan and return a type derived from Plan. Plan::Check is virtual on that type.
  • A richer settled row. Override EmptySettled and return a type derived from TrackSettled.
  • Logging. Override InstallLog so this job's own lines use another component path. Tube stages keep the Multimedia defaults.

EmptyPlan / EmptySettled only pick the dynamic type. This class still fills tracks from the fluent map and settled fields from the opened Encoder. One instance is one Run. Another job is another instance.

Assembly uses the same connections as a manual pipeline. Filters close before the shared Plan is sent to Demuxer, then the Plan enters Running. Finished is published only after every stage and analytics complete. Failures and cancellation publish Failed.

Mux order is the order of Video / Audio / Subtitle / Attachments calls. There is no output-index argument and no Destination setter: the container is the writer extension.

Analytics attach with Filter. After the job reaches Status::Done, Reports returns the same snapshots a hand tube reads with Filter::Analytics::Report on the leaf pointer.

Progress provides shared job progress. The handle remains usable after the job has been destroyed.

Each constructor calls InstallLog after the most-derived constructor body of this class. A derived constructor that constructs a subclass must call InstallLog itself after that constructor.

Constructor & Destructor Documentation

◆ Transcoder() [1/10]

Builds reader and writer from paths.

Parameters
sourceInput path.
destinationOutput path.
loggerShared log for the job and the tube.
durationAuthoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable.

Stores logger as-is. InstallLog runs at the end of this constructor.

◆ Transcoder() [2/10]

Builds a local reader and takes writer.

Parameters
sourceInput path.
writerOwned output location (moved).
loggerShared log for the job and the tube.
durationAuthoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable.

◆ Transcoder() [3/10]

Takes reader and builds a local writer.

Parameters
readerOwned input location (moved).
destinationOutput path.
loggerShared log for the job and the tube.
durationAuthoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable.

◆ Transcoder() [4/10]

Takes both location owners without slicing.

Parameters
readerOwned input location (moved).
writerOwned output location (moved).
loggerShared log for the job and the tube.
durationAuthoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable.

◆ Transcoder() [5/10]

Builds local locations with an authoritative borrowed container.

Parameters
sourceInput path.
destinationOutput path; its suffix does not select the muxer.
containerRegistered identity, borrowed through job and Plan destruction.
loggerShared application log.
durationAuthoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable.

◆ Transcoder() [6/10]

Builds a local reader and takes the writer with an explicit container.

Parameters
sourceInput path.
writerOwned output location.
containerRegistered identity, borrowed through job and Plan destruction.
loggerShared application log.
durationAuthoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable.

◆ Transcoder() [7/10]

Takes the reader and builds a writer with an explicit container.

Parameters
readerOwned input location.
destinationOutput path; its suffix does not select the muxer.
containerRegistered identity, borrowed through job and Plan destruction.
loggerShared application log.
durationAuthoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable.

◆ Transcoder() [8/10]

Takes both locations with an authoritative borrowed container.

Parameters
readerOwned input location.
writerOwned output location.
containerRegistered identity; its registry must outlive the job and Plan.
loggerShared application log.
durationAuthoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable.

◆ Transcoder() [9/10]

Copy constructor.

Parameters
otherSource job.

◆ Transcoder() [10/10]

Move constructor.

Parameters
otherJob to take.

◆ ~Transcoder()

virtual StormByte::Multimedia::Pipeline::Transcoder::~Transcoder ( )
virtualnoexcept

Destructor.

Stops the coordinator and joins.

Member Function Documentation

◆ ApplicationLog()

const StormByte::Safe::Shared< StormByte::Logger::Log > & StormByte::Multimedia::Pipeline::Transcoder::ApplicationLog ( ) const
inlineprotectednoexcept

Application logger passed to the constructor.

Returns
Logger given to the constructor, not the job facade.

Hand this to a Step or filter. Those apply the Multimedia stage path themselves.

◆ Attachments() [1/2]

Transcoder & StormByte::Multimedia::Pipeline::Transcoder::Attachments ( )
noexcept

Keeps every source attachment.

Returns
*this.

Alias of Attachments with the star-star MIME pattern. Default is drop (do not call this).

◆ Attachments() [2/2]

Transcoder & StormByte::Multimedia::Pipeline::Transcoder::Attachments ( std::string_view pattern)
noexcept

Keeps source attachments whose MIME matches pattern.

Parameters
patternExact type/subtype, type-star category, or star-star (all). Same matcher as Plan::Check.
Returns
*this.

◆ Audio()

Track StormByte::Multimedia::Pipeline::Transcoder::Audio ( int in)
noexcept

Maps an audio origin stream.

Mux order is Add order.

Note
Each call adds an independent output, even for the same origin.
Parameters
inOrigin stream index.
Returns
Fluent handle.

◆ Buffering() [1/2]

BufferingPolicy StormByte::Multimedia::Pipeline::Transcoder::Buffering ( ) const
noexcept

Queue capacity overrides used by the Plan built on Run.

Returns
Configured queue policy.

◆ Buffering() [2/2]

void StormByte::Multimedia::Pipeline::Transcoder::Buffering ( const BufferingPolicy & policy)
noexcept

Configure queue element caps before Run.

Parameters
policyAutomatic, bounded, or unlimited caps.

Invalid minima fail the Transcoder. This policy does not alter CPU threading selected by Resources.

◆ Cancel()

void StormByte::Multimedia::Pipeline::Transcoder::Cancel ( )
noexcept

Requests abort.

Coordinator ends in Status::Aborted unless a genuine failure occurs.

Note
Cancellation wakes paused stages and joins in-flight work before OnAborted.

◆ DurationProgress()

StormByte::Safe::Function< void(double)> StormByte::Multimedia::Pipeline::Transcoder::DurationProgress ( ) const
protected

Observer for duration resolution in custom EmptyPlan implementations.

Returns
Provider-owned observer to borrow during Plan construction.
Note
The callback borrows this job; it must not outlive the Transcoder. It waits while paused and returns Failure on cancellation, causing File::Duration to stop scanning and rewind its reader.

◆ EmptyPlan()

virtual StormByte::Safe::Shared< class Plan > StormByte::Multimedia::Pipeline::Transcoder::EmptyPlan ( StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationReader > reader,
StormByte::Safe::Unique< StormByte::Buffer::IO::BufferedLocationWriter > writer,
StormByte::Safe::Optional< std::int64_t > duration = {},
const class Container * container = nullptr ) const
protectedvirtual

Allocates the Plan type for this job.

Parameters
readerOwned origin location, transferred from this Transcoder.
writerOwned destination location, transferred from this Transcoder.
durationAuthoritative nanoseconds; otherwise use the container estimate, scanning only if unavailable.
containerBorrowed authoritative registry identity; null guesses from the writer path.
Returns
Plan of the desired dynamic type, with no tracks yet.

Override to return a type derived from Plan. Tracks are filled from the fluent map after this returns. After the call this Transcoder no longer owns the leaves. Allocation failures propagate to the coordinator, which fails the job. Construct Shared<Plan>::MakePointer<Derived> in the provider module so the exact payload is released there. Keep a local DurationProgress() observer and pass its address to the observing Plan constructor.

◆ EmptySettled()

virtual StormByte::Safe::Unique< TrackSettled > StormByte::Multimedia::Pipeline::Transcoder::EmptySettled ( ) const
protectedvirtual

Allocates the settled-row type.

Returns
Empty row of the desired dynamic type.

Override to return a type derived from TrackSettled. MarkSettled fills it and calls OnSettled. Construct Unique<TrackSettled>::MakePointer<Derived> in the provider module.

◆ Error()

StormByte::Safe::Optional< StormByte::Safe::String > StormByte::Multimedia::Pipeline::Transcoder::Error ( ) const

Failure text.

Returns
Message, or empty.

◆ Failed()

bool StormByte::Multimedia::Pipeline::Transcoder::Failed ( ) const
noexcept

Whether the job failed.

Returns
true after Status::Error.

◆ Filter()

template<typename FilterType, typename... Args>
Transcoder & StormByte::Multimedia::Pipeline::Transcoder::Filter ( Args &&... args)
inline

Appends a global analytics filter.

One node, every matching stretch.

Template Parameters
FilterTypeChild of Filter::Analytics.
ArgsFilter constructor argument types.
Parameters
argsConstructor arguments, forwarded.
Returns
*this.

Track-scoped analytics attach on Track::Filter. Both are allowed; there is no dedup.

◆ Ignore()

Transcoder & StormByte::Multimedia::Pipeline::Transcoder::Ignore ( int in)
noexcept

Drops an origin stream (omit from the Plan).

Parameters
inOrigin stream index.
Returns
*this.

◆ InputTelemetry()

StormByte::Safe::Shared< StormByte::Buffer::ReadTelemetry > StormByte::Multimedia::Pipeline::Transcoder::InputTelemetry ( ) const
noexcept

Shared telemetry for the original input reader.

Returns
Shared handle. Retain it to inspect final I/O counters after this job dies.

◆ InstallLog()

virtual void StormByte::Multimedia::Pipeline::Transcoder::InstallLog ( )
protectedvirtual

Scopes this job's own logger.

Stock path is StormByte/Multimedia/Transcoder with the Multimedia format and throttle. Override to use another path and other rules. Tube stages still use the StormByte/Multimedia/ prefix followed by the stage name. Do not call from a constructor. Each stock constructor calls this after the most-derived constructor of this class.

◆ Logger()

const StormByte::Safe::Shared< StormByte::Logger::Log > & StormByte::Multimedia::Pipeline::Transcoder::Logger ( ) const
noexcept

Logger used by this job after InstallLog.

Returns
Job facade, or empty.

Stock path is StormByte/Multimedia/Transcoder. Do not pass this pointer to a Step or filter; those use the application logger and the Multimedia stage path.

◆ OnAborted()

virtual void StormByte::Multimedia::Pipeline::Transcoder::OnAborted ( )
protectedvirtualnoexcept

Cancel completed.

◆ OnAnalyticsDone()

virtual void StormByte::Multimedia::Pipeline::Transcoder::OnAnalyticsDone ( )
protectedvirtualnoexcept

Analytics taps idle.

Not called if this tube did not mount analytics.

◆ OnConfigure()

virtual void StormByte::Multimedia::Pipeline::Transcoder::OnConfigure ( )
protectedvirtualnoexcept

Last chance to raise ceilings before the job starts.

◆ OnDone()

virtual void StormByte::Multimedia::Pipeline::Transcoder::OnDone ( )
protectedvirtualnoexcept

Successful flush.

◆ OnError()

virtual void StormByte::Multimedia::Pipeline::Transcoder::OnError ( const StormByte::Safe::String & message)
protectedvirtualnoexcept

Hard error.

Parameters
messageError text, possibly empty when allocation failed.

◆ OnMeasureDone()

virtual void StormByte::Multimedia::Pipeline::Transcoder::OnMeasureDone ( )
protectedvirtualnoexcept

Measure pass closed.

Not called if this tube did not mount a measure pass.

◆ OnPlan()

virtual void StormByte::Multimedia::Pipeline::Transcoder::OnPlan ( const class Plan & plan)
protectedvirtualnoexcept

Intention, just before plan >> demuxer.

Parameters
planFilled Plan (still owned by this job).

◆ OnProgress()

virtual void StormByte::Multimedia::Pipeline::Transcoder::OnProgress ( )
protectedvirtualnoexcept

Progress tick.

Read Progress.

◆ OnSettled()

virtual void StormByte::Multimedia::Pipeline::Transcoder::OnSettled ( const TrackSettled & track)
protectedvirtualnoexcept

One encode lane finished Encoder open.

Parameters
trackSettled row from EmptySettled.

◆ OnStart()

virtual enum Status StormByte::Multimedia::Pipeline::Transcoder::OnStart ( )
protectedvirtualnoexcept

Gate after the Plan is filled.

Returns
Running to proceed, Error / Aborted / Stopped to bail.

◆ operator bool()

StormByte::Multimedia::Pipeline::Transcoder::operator bool ( ) const
explicitnoexcept

true if not failed.

Returns
Not Failed.

◆ operator=() [1/2]

Transcoder & StormByte::Multimedia::Pipeline::Transcoder::operator= ( const Transcoder & other)
delete

Copy assignment.

Parameters
otherSource job.
Returns
*this.

◆ operator=() [2/2]

Transcoder & StormByte::Multimedia::Pipeline::Transcoder::operator= ( Transcoder && other)
deletenoexcept

Move assignment.

Parameters
otherJob to take.
Returns
*this.

◆ OutputTelemetry()

StormByte::Safe::Shared< StormByte::Buffer::WriteTelemetry > StormByte::Multimedia::Pipeline::Transcoder::OutputTelemetry ( ) const
noexcept

Shared telemetry for the destination writer.

Returns
Shared handle. Retain it to inspect final I/O counters after this job dies.

◆ Pause()

void StormByte::Multimedia::Pipeline::Transcoder::Pause ( )
noexcept

Pauses the job.

Every stage (demux, decode, filters, encode, mux) blocks before its next work unit, so CPU use stops once in-flight units finish. Cancel still works while paused. Duration scans also wait at their next progress checkpoint.

◆ Plan()

const StormByte::Safe::Shared< class Plan > & StormByte::Multimedia::Pipeline::Transcoder::Plan ( ) const
inlinenoexcept

Intention built for this job, if any.

Returns
Plan, or empty before Run.

◆ Progress()

StormByte::Safe::Shared< const class Progress > StormByte::Multimedia::Pipeline::Transcoder::Progress ( ) const
noexcept

Shared tube clock.

Forwards Demuxer::Progress().

Empty before Run wires the Demuxer. The user may keep the pointer after the job dies. No public setters.

Returns
Const shared handle, or empty.

◆ RemoveTag()

Transcoder & StormByte::Multimedia::Pipeline::Transcoder::RemoveTag ( StormByte::Multimedia::Metadata::FileTag tag)
noexcept

Writes the output without file tag tag.

Parameters
tagFile tag.
Returns
*this.

◆ Reports()

StormByte::Safe::Vector< StormByte::Safe::Pair< StormByte::Safe::String, Filter::Report > > StormByte::Multimedia::Pipeline::Transcoder::Reports ( ) const

Analytics snapshots after the job is Idle.

Returns
Pair of flattened key (vmaf[0], vmaf[general], vmaf[0]#2 on an exact-key repeat) and Filter::Report.

Track-scoped leaves use the origin index. Global Add uses general. Same contract as Filters::Reports. Snapshots only; the leaves stay owned by the job. Meaningful after Status::Done. A low score is still Ok. Notice lines from a leaf are log, not this API.

◆ Resources() [1/2]

ResourceUsage StormByte::Multimedia::Pipeline::Transcoder::Resources ( ) const
noexcept

Resource policy selected for this job.

Returns
Policy, defaulting to ResourceUsage::Full.

◆ Resources() [2/2]

void StormByte::Multimedia::Pipeline::Transcoder::Resources ( ResourceUsage usage)
noexcept

Selects a resource policy before Run.

Parameters
usageFull, approximately half of available process CPUs, or at most two CPUs, with smaller frame queues for reduced modes.

Full keeps native codec threading defaults and all requested VMAF workers (all process-available CPUs by default). Its raw-video queues retain their 27-frame capacity and analytics input is capped at 32 looks, without shrinking either by available RAM. Medium and Low distribute a best-effort thread budget across decode/encode lanes and reduce queued frames and packets, including filter and analytics input. VMAF also reduces its memory-intensive extractor pool (a half-CPU target shared across video contexts in Medium and one worker in Low, even with an explicit worker count). Encoder options are applied only when supported. In reduced modes, raw-video queues share a RAM-aware reservation with conservative frame sizing and a two-frame floor, and VMAF workers are additionally bounded by resolution and available RAM. Explicit FineTune values that control threading conflict with Medium or Low and fail the job rather than bypassing the selected policy. This is not a hard CPU or RSS limit; codec libraries, filters and drivers may use additional resources.

◆ Resume()

void StormByte::Multimedia::Pipeline::Transcoder::Resume ( )
noexcept

Resumes after Pause.

◆ Run()

void StormByte::Multimedia::Pipeline::Transcoder::Run ( )
noexcept

Builds the Plan, starts the coordinator and returns.

A second Run fails. Calls OnConfigure, EmptyPlan (moves the BufferedFile leaves), fills tracks from the fluent map, OnPlan, OnStart, then plan >> demuxer >> muxer. Does not block until Done.

◆ Status()

enum Status StormByte::Multimedia::Pipeline::Transcoder::Status ( ) const
noexcept

Current lifecycle value.

Returns
Status.

◆ Subtitle()

Track StormByte::Multimedia::Pipeline::Transcoder::Subtitle ( int in)
noexcept

Maps a subtitle origin stream.

Mux order is Add order.

Note
Each call adds an independent output, even for the same origin.
Parameters
inOrigin stream index.
Returns
Fluent handle.

◆ Tag()

Transcoder & StormByte::Multimedia::Pipeline::Transcoder::Tag ( StormByte::Multimedia::Metadata::FileTag tag,
StormByte::Safe::String value )
noexcept

Replaces a file-level tag in the output.

Tags without an edit are copied from the source. Track and Disc are written verbatim, so "3" and "3/12" both work. Formats that cannot store tag ignore it; see Container::Stores.

Parameters
tagFile tag.
valueNew value. Empty drops the edit and keeps the source value.
Returns
*this.

◆ Telemetry()

StormByte::Safe::Shared< const JobTelemetry > StormByte::Multimedia::Pipeline::Transcoder::Telemetry ( ) const
noexcept

Shared job and stage telemetry, available before Run.

Retain the handle to inspect final counters after the worker and its pipeline stages have been destroyed. Resident memory values are sampled process RSS and are not per-stage allocations.

Returns
Shared telemetry handle, or empty without a backend.

◆ Video()

Track StormByte::Multimedia::Pipeline::Transcoder::Video ( int in)
noexcept

Maps a video origin stream.

Mux order is Add order.

Note
Each call adds an independent output, even for the same origin.
Parameters
inOrigin stream index.
Returns
Fluent handle.

◆ Backend::Pipeline::Transcoder

friend class Backend::Pipeline::Transcoder
friend

Backend coordinator that runs this job's pipeline.

◆ Track

friend class Track
friend

Fluent handle that configures this job's mapped tracks.


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