|
|
| | Transcoder (std::shared_ptr< StormByte::Logger::Log > logger, File &&file) noexcept |
| | Constructs an empty job.
|
| |
| | Transcoder (const Transcoder &other)=delete |
| | Copy constructor.
|
| |
| | Transcoder (Transcoder &&other) noexcept=delete |
| | Move constructor.
|
| |
| virtual | ~Transcoder () noexcept |
| | Destructor.
|
| |
| Transcoder & | operator= (const Transcoder &other)=delete |
| | Copy assignment.
|
| |
| Transcoder & | operator= (Transcoder &&other) noexcept=delete |
| | Move assignment.
|
| |
|
| const File & | Source () const noexcept |
| | Opened source file.
|
| |
| const std::shared_ptr< StormByte::Logger::Log > & | Logger () const noexcept |
| | Logger used by this job after InstallLog.
|
| |
| const std::shared_ptr< class Plan > & | Plan () const noexcept |
| | Intention built for this job, if any.
|
| |
|
| 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 attachment from the source File.
|
| |
| Transcoder & | Attachments (std::string_view mime) noexcept |
| | Keeps source attachments whose MIME equals mime.
|
| |
| Transcoder & | Ignore (int in) noexcept |
| | Drops an origin stream (omit from the Plan).
|
| |
| template<typename FilterType , typename... Args> |
| Transcoder & | Filter (Args &&... args) noexcept |
| | Appends a global analytics filter.
|
| |
| Transcoder & | Destination (const Container &container, std::filesystem::path path) noexcept |
| | Sets the destination container and path.
|
| |
|
| void | Run () noexcept |
| | Builds the Plan, starts the coordinator and returns.
|
| |
| void | Cancel () noexcept |
| | Requests abort.
|
| |
| void | Pause () noexcept |
| | Pauses the coordinator.
|
| |
| void | Resume () noexcept |
| | Resumes after Pause.
|
| |
| enum Status | Status () const noexcept |
| | Current lifecycle value.
|
| |
| bool | Failed () const noexcept |
| | Whether the job failed.
|
| |
| std::optional< std::string > | Error () const noexcept |
| | Failure text.
|
| |
| std::optional< unsigned > | Progress () const noexcept |
| | Last published percent.
|
| |
| std::vector< std::pair< std::string, Filter::Report > > | Reports () const noexcept |
| | Analytics snapshots after the job is Idle.
|
| |
| | operator bool () const noexcept |
| | true if not failed.
|
| |
|
| virtual void | InstallLog () noexcept |
| | Scopes this job's own logger.
|
| |
| const std::shared_ptr< StormByte::Logger::Log > & | ApplicationLog () const noexcept |
| | Application logger passed to Open.
|
| |
| virtual std::unique_ptr< class Plan > | EmptyPlan (File &&source, const Container &container, std::filesystem::path destination) const noexcept |
| | Allocates the Plan type for this job.
|
| |
| virtual std::unique_ptr< TrackSettled > | EmptySettled () const noexcept |
| | 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 and Destination is set.
|
| |
| 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 | OnProgress (unsigned percent) noexcept |
| | Progress tick.
|
| |
| virtual void | OnDone () noexcept |
| | Successful flush.
|
| |
| virtual void | OnError (const std::string &message) noexcept |
| | Hard error.
|
| |
| virtual void | OnAborted () noexcept |
| | Cancel completed.
|
| |
Facade that maps tracks and runs one file-to-file job.
Connects operator>> and Filters for you. The stock class is a complete job: open a File, choose origin streams, remux or encode each one, write another file. You do not have to derive anything to transcode.
It is also the extension point. Nothing in the extra surface is required. Mix what you need:
- Hooks only. Keep the stock Plan and override OnConfigure, OnStart, OnPlan, OnSettled, 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.
- Both. Derived Plan plus derived TrackSettled plus the hooks you care about.
- Logging. Override InstallLog so this job's own lines use another component path and other throttle rules. Tube stages (Demuxer, Decoder, filters, …) keep the Multimedia defaults: StormByte/Multimedia/<stage>. That path is not overridable from a derived Transcoder.
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 source and one destination; another job is another instance.
Mux order is the order of Video / Audio / Subtitle / Attachments calls. There is no output-index argument.
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. The Notice line from a leaf is log, not the API.
Open applies InstallLog after the most-derived constructor. Stock InstallLog scopes this job at StormByte/Multimedia/Transcoder and applies the Multimedia format ([L] T c) and throttle (Window on LowLevel, Drop on Debug and Notice). There is no STMM component. A derived Open that constructs a subclass must call InstallLog itself after that constructor.