Decodes packets of one origin track into frames. More...
#include <StormByte/multimedia/pipeline/decoder.hxx>


Public Member Functions | |
| Decoder (StormByte::Safe::Shared< StormByte::Logger::Log > log, int track, EncodeLook tag) | |
| Post-encode recon for Analytics. | |
| Decoder (StormByte::Safe::Shared< StormByte::Logger::Log > log, int track, RemuxLook tag) | |
| Post-remux recon for Analytics. | |
| Decoder (StormByte::Safe::Shared< StormByte::Logger::Log > log, int track, SourceLook tag) | |
| Packet-origin recon for Analytics (Demuxer remux stretch). | |
Lifecycle | |
| Decoder (StormByte::Safe::Shared< StormByte::Logger::Log > log, int track, DecoderFlags flags=DecoderFlags{}) | |
| Decoder for one origin track. | |
| Decoder (const Decoder &other)=delete | |
| Copy constructor. | |
| Decoder (Decoder &&other) noexcept=delete | |
| Move constructor. | |
| ~Decoder () noexcept override | |
| Destructor. | |
| Decoder & | operator= (const Decoder &other)=delete |
| Copy assignment. | |
| Decoder & | operator= (Decoder &&other) noexcept=delete |
| Move assignment. | |
| operator bool () const noexcept | |
| true if open and not failed. | |
Track | |
| int | Index () const noexcept |
| Bound origin track. | |
| StormByte::Size | InputCeiling () const noexcept override |
| Maximum number of queued input packets. | |
| const DecoderFlags & | Flags () const noexcept |
| Flags. | |
| void | Flags (DecoderFlags flags) noexcept |
| Replaces flags (before demuxer >> decoder). | |
| const StormByte::Safe::Optional< StormByte::Safe::String > & | Language () const noexcept |
| Stream language tag copied from the origin File. | |
| const StormByte::Safe::Optional< StormByte::Safe::String > & | Title () const noexcept |
| Stream title tag copied from the origin File. | |
Implementation selection | |
| const StormByte::Safe::Optional< StormByte::Safe::String > & | Implementation () const noexcept |
| Pinned FFmpeg decoder name, if any. | |
| void | Implementation (StormByte::Safe::String name) noexcept |
| Pins an FFmpeg decoder name (before demuxer >> decoder). | |
| DecodeAcceleration | Acceleration () const noexcept |
| Video decode acceleration policy, independent of encoder selection. | |
| void | Acceleration (DecodeAcceleration acceleration) noexcept |
| Sets video decode acceleration before the decoder is wired. | |
| const Features & | Require () const noexcept |
| Extra required Feature bits. | |
| void | Require (Features features) noexcept |
| Replaces extra required Feature bits. | |
| const Features & | Capabilities () const noexcept |
| Features of the opened implementation. | |
| Public Member Functions inherited from StormByte::Multimedia::Pipeline::Step | |
| Step (const Step &other)=delete | |
| Copy construction is disabled. | |
| Step (Step &&other) noexcept=delete | |
| Move construction is disabled. | |
| virtual | ~Step () noexcept |
| Destructor. | |
| Step & | operator= (const Step &other)=delete |
| Copy assignment is disabled. | |
| Step & | operator= (Step &&other) noexcept=delete |
| Move assignment is disabled. | |
| void | Wake () noexcept |
| Notifies all waiters of this step. | |
| StormByte::Safe::Shared< class Plan > | Plan () const noexcept |
| Bound job intention, if any. | |
| const Kinds & | Receives () const noexcept |
| Kinds this step consumes. | |
| const Kinds & | Produces () const noexcept |
| Kinds this step emits. | |
| State | Status () const noexcept |
| Current lifecycle value. | |
| StormByte::Safe::Shared< const StageTelemetry > | Telemetry () const |
| Shared stage counters, retained independently of this Step. | |
| StormByte::Buffer::QueueSnapshot | QueueSnapshot (int track) const noexcept |
| Reads effective queue limits and logical-byte accounting. | |
| virtual bool | Ready () const noexcept |
| Whether this step can take work. | |
| void | Stop () noexcept |
| Requests shutdown and notifies connected stages. | |
| bool | Failed () const noexcept |
| Whether this step has failed. | |
| StormByte::Safe::Optional< StormByte::Safe::String > | Error () const |
| Failure text. | |
| void | Fail (StormByte::Safe::String reason) noexcept |
| Marks the stage as failed and notifies connected stages. | |
| void | Fail () noexcept |
| Marks failure without storing a message or allocating. | |
| STORMBYTE_FORCE_INLINE void | Fail (const char *reason) noexcept |
| Copies a null-terminated failure literal into Safe storage. | |
| void | Fail (std::string_view reason) noexcept |
| Copies borrowed failure text before calling the DLL-safe overload. | |
Friends | |
| class | Backend::Pipeline::Decoder |
| class | Backend::Pipeline::Demuxer |
| class | Backend::Pipeline::Detail::Worker::Decode |
| class | Demuxer |
| class | Filters |
| class | Route |
| Decoder & | operator>> (Demuxer &demuxer, Decoder &decoder) |
Binds one origin track of demuxer to decoder. | |
Additional Inherited Members | |
| Protected Member Functions inherited from StormByte::Multimedia::Pipeline::Step | |
| bool | Connect (Step &downstream) noexcept |
| Registers a borrowed downstream stage and shares any bound plan. | |
| bool | WaitPlan () noexcept |
| Waits interruptibly for the shared plan to enter Running. | |
| Backend::Pipeline::Pipe & | pipe () noexcept |
| const Backend::Pipeline::Pipe & | pipe () const noexcept |
| Step (StormByte::Safe::Shared< StormByte::Logger::Log > log, enum Producer name, Kinds receives, Kinds produces) | |
| Constructs a stage in State::Created. | |
| void | Emit (Item::PointerType item) noexcept |
Sends item to connected consumers. | |
| Item::PointerType | CloneItem (const Item &item) const |
| Creates a distinct item through Item::Clone. | |
| virtual void | Wait () noexcept |
| Waits until input is available, the stage fails or stops, or WakeNow. | |
| void | Launch () noexcept |
| Starts stage initialization and processing. | |
| void | Halt () noexcept |
| Stops the stage and waits for execution to finish. | |
| bool | Stopping () const noexcept |
| Worker must return (Stop, Halt or Fail). | |
| void | RecordWork (std::int64_t microseconds) noexcept |
| Adds one Process duration to the step summary. | |
| std::int64_t | LastWork () const noexcept |
| Duration of the last timed Process, or 0. | |
| void | DumpWork () noexcept |
| Writes min/max Process time at Debug. | |
| Backend::Pipeline::Host & | Face () noexcept |
| void | Mount (StormByte::Safe::Unique< Backend::Pipeline::Pumper > pumper, StormByte::Safe::Unique< Backend::Pipeline::Worker > worker) |
| Protected Attributes inherited from StormByte::Multimedia::Pipeline::Step | |
| StormByte::Safe::Shared< StormByte::Logger::Log > | m_log |
| Scoped logger retained through Base-heap shared ownership. | |
| enum Producer | m_name |
| UseLog leaf / default Label. | |
| Kinds | m_receives |
| Receives. | |
| Kinds | m_produces |
| Produces. | |
Decodes packets of one origin track into frames.
Each produced frame carries the serial number and decoding timestamp of its source packet. Parts distinguish frames from the same packet; serial numbers are not decoded-frame counts.
Filters can supply decoded pictures for analytics on compressed-packet connections. Source pictures identify Producer::Decoder; destination pictures identify the supplying Producer::Encoder or Producer::Remuxer.
Two-pass processing completes the measurement pass before decoding the source again for the output pass. Logging identifies the selected decoder and origin track; the supplied logger controls throttling.
|
explicit |
Decoder for one origin track.
| log | Shared logger. Empty pointer means no log. |
| track | Origin stream index. |
| flags | Heuristics / future bits. Empty = passthrough. |
Origin mode. Frames carry Producer::Decoder. Setup waits for demuxer >> decoder.
|
delete |
Copy constructor.
| other | Source decoder. |
|
deletenoexcept |
Move constructor.
| other | Decoder to take. |
|
overridenoexcept |
Destructor.
Step::Join Halt s before backends die.
| StormByte::Multimedia::Pipeline::Decoder::Decoder | ( | StormByte::Safe::Shared< StormByte::Logger::Log > | log, |
| int | track, | ||
| EncodeLook | tag ) |
Post-encode recon for Analytics.
| log | Shared logger. |
| track | Origin stream index (same as Encoder). |
| tag | Encode-look tag. |
Not callable from user code. Open does not wait for a Demuxer. The first Packet that carries codec parameters opens the backend. Produced frames are stamped Producer::Encoder. Label is Decoder(look encode).
| StormByte::Multimedia::Pipeline::Decoder::Decoder | ( | StormByte::Safe::Shared< StormByte::Logger::Log > | log, |
| int | track, | ||
| RemuxLook | tag ) |
Post-remux recon for Analytics.
| log | Shared logger. |
| track | Origin stream index (same as Remuxer). |
| tag | Remux-look tag. |
Not callable from user code. Same open path as the encode-look constructor. Produced frames are stamped Producer::Remuxer. Label is Decoder(look remux).
| StormByte::Multimedia::Pipeline::Decoder::Decoder | ( | StormByte::Safe::Shared< StormByte::Logger::Log > | log, |
| int | track, | ||
| SourceLook | tag ) |
Packet-origin recon for Analytics (Demuxer remux stretch).
| log | Shared logger. |
| track | Origin stream index. |
| tag | Source-look tag. |
Not callable from user code. Same open path as the encode-look constructor (codecpar on first Packet). Produced frames keep Producer::Decoder.
|
inlinenoexcept |
Video decode acceleration policy, independent of encoder selection.
|
inlinenoexcept |
Sets video decode acceleration before the decoder is wired.
| acceleration | Auto attempts supported hardware then software; Software forces CPU decode. |
|
inlinenoexcept |
Features of the opened implementation.
|
inlinenoexcept |
Flags.
|
inlinenoexcept |
Replaces flags (before demuxer >> decoder).
| flags | New mask. |
|
inlinenoexcept |
Pinned FFmpeg decoder name, if any.
|
noexcept |
|
inlinenoexcept |
Bound origin track.
|
overridevirtualnoexcept |
Maximum number of queued input packets.
Reimplemented from StormByte::Multimedia::Pipeline::Step.
|
inlinenoexcept |
|
explicitnoexcept |
true if open and not failed.
Copy assignment.
| other | Source decoder. |
|
inlinenoexcept |
Extra required Feature bits.
|
inlinenoexcept |
Replaces extra required Feature bits.
| features | Bits the chosen table row must have. |
|
inlinenoexcept |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Binds one origin track of demuxer to decoder.
| demuxer | Origin demuxer. |
| decoder | Destination decoder. |
decoder.
|
friend |