|
StormByte C++ Library: Multimedia module 0.0.9999
StormByte-Multimedia is a StormByte library module for parsing configuration files
|
One decoded access unit. More...
#include <StormByte/multimedia/pipeline/frame.hxx>


Public Types | |
| using | PointerType = std::shared_ptr<Frame> |
Public Member Functions | |
Construction | |
| Frame () noexcept | |
| Empty frame. | |
| Frame (int track, enum StormByte::Multimedia::Type type, enum Producer producer, StormByte::Buffer::FIFO payload, std::optional< Property::Duration > pts, std::optional< Property::Duration > duration, std::optional< Property::Video > video, std::vector< class SideData > attachments, std::optional< Property::Audio > audio, std::uint64_t serial, std::uint64_t part) noexcept | |
| Builds a frame without a backend buffer. | |
| Frame (const Frame &other) noexcept | |
| Copy. | |
| Frame (Frame &&other) noexcept | |
| Move constructor. | |
| ~Frame () noexcept override | |
| Destructor. | |
| Frame & | operator= (const Frame &other) noexcept |
| Copy assignment. | |
| Frame & | operator= (Frame &&other) noexcept |
| Move assignment. | |
Timing and identity | |
| const std::optional< Property::Duration > & | Pts () const noexcept |
| Presentation timestamp on the stream clock. | |
| const std::optional< Property::Duration > & | Dts () const noexcept |
| Decode timestamp on the stream clock. | |
| const std::optional< Property::Duration > & | Duration () const noexcept |
| Frame duration on the stream clock. | |
| const std::optional< std::string > & | Language () const noexcept |
| Stream language tag copied from File metadata. | |
| const std::optional< std::string > & | Title () const noexcept |
| Stream title tag copied from File metadata. | |
Lineage | |
| const std::optional< std::uint64_t > & | Serial () const noexcept |
| Monotonic lineage id assigned when the unit enters the pipe. | |
| std::uint64_t | Part () const noexcept |
| Sub-id inside Serial when one demuxed unit yields several frames. | |
Properties | |
| const std::optional< Property::Video > & | Video () const noexcept |
| Video properties (includes HDR10 when set). | |
| const std::optional< Property::Audio > & | Audio () const noexcept |
| Audio properties (layout, rate, channels). | |
| const std::vector< class SideData > & | Attachments () const noexcept |
| Raw side data captured at receive. | |
Payload | |
| StormByte::Buffer::FIFO & | Payload () noexcept |
| Payload. | |
| const StormByte::Buffer::FIFO & | Payload () const noexcept |
| Payload already materialised, or empty. | |
| Public Member Functions inherited from StormByte::Multimedia::Pipeline::Item | |
| Kind | Kind () const noexcept |
| Whether this unit is a frame or a packet. | |
| enum StormByte::Multimedia::Type | Type () const noexcept |
| Media of this access unit. | |
| int | Track () const noexcept |
| Origin track index. | |
| enum Producer | Producer () const noexcept |
| Stage that created this unit. | |
| virtual | ~Item () noexcept=default |
| Destructor. | |
Friends | |
| class | Backend::Pipeline::Frame |
| class | Decoder |
| class | Encoder |
| class | Filter::FFmpeg |
| Decoder & | operator>> (Decoder &decoder, Frame &frame) noexcept |
| Frame & | operator>> (Frame &frame, Encoder &encoder) noexcept |
Additional Inherited Members | |
| Item (const Item &other) noexcept=default | |
| Copy constructor. | |
| Item (Item &&other) noexcept=default | |
| Move constructor. | |
| Item & | operator= (const Item &other) noexcept=default |
| Copy assignment. | |
| Item & | operator= (Item &&other) noexcept=default |
| Move assignment. | |
One decoded access unit.
In libav that is an AVFrame: one picture or one block of samples after decode. In Multimedia it is what process and analytics filters, and Encoder, see — pixels or samples, timestamps and the stream tags the decoder copied across.
Copy and Clone reference libav plane buffers (av_frame_ref). They are not a deep copy of planes. Filter::FFmpeg::Save emits a new frame when a filter paints.
| using StormByte::Multimedia::Pipeline::Frame::PointerType = std::shared_ptr<Frame> |
|
noexcept |
Empty frame.
Item::Type is StormByte::Multimedia::Type::Unknown. Item::Track is -1. Item::Kind is Kind::Frame.
|
noexcept |
Builds a frame without a backend buffer.
| track | Origin container stream index. |
| type | Media of this unit (Video, Audio or Subtitle). |
| producer | Step that created this unit. |
| payload | Owned sample / plane bytes. |
| pts | Presentation timestamp, if known. |
| duration | Frame duration, if known. |
| video | Video properties, if this is a video frame. |
| attachments | Raw side-data blobs. |
| audio | Audio properties, if this is an audio frame. |
| serial | Lineage id born at the demuxer for this origin track. |
| part | Sub-id inside serial. Zero when the demuxed unit did not split. |
Dts starts empty. Decoder stamps it from the packet that produced this frame. There is no public setter.
|
noexcept |
Copy.
Metadata and FIFO handle are copied; the libav frame is referenced (av_frame_ref).
| other | Source frame. |
Not a deep copy of planes. Clone uses this constructor. Filter::FFmpeg::Save still emits a new frame when a filter paints.
|
noexcept |
Move constructor.
| other | Frame to take. |
Container-safe: other becomes the empty sentinel (Item::Type Unknown, track -1, no backend). ~Frame on a moved-from object is a no-op.
|
overridenoexcept |
Destructor.
|
inlinenoexcept |
Raw side data captured at receive.
Read-only.
|
inlinenoexcept |
Audio properties (layout, rate, channels).
|
inlinenoexcept |
Decode timestamp on the stream clock.
Copied by Decoder from the compressed packet that produced this frame. Empty when that packet had no Dts, or when the unit was not stamped. There is no public setter; friendship writes m_dts.
|
inlinenoexcept |
Frame duration on the stream clock.
|
inlinenoexcept |
Copy assignment.
Same as the copy constructor.
| other | Source frame. |
Move assignment.
| other | Frame to take. |
Same as the move constructor: other is left empty.
|
inlinenoexcept |
Sub-id inside Serial when one demuxed unit yields several frames.
Downstream stages copy this value. It is not a pipe-wide counter.
|
inlinenoexcept |
Payload already materialised, or empty.
|
noexcept |
Payload.
Materialises planes on first call if a backend frame is held.
After materialisation the backend stays alive; a later filter Save replaces it and this FIFO is cleared.
|
inlinenoexcept |
Presentation timestamp on the stream clock.
|
inlinenoexcept |
Monotonic lineage id assigned when the unit enters the pipe.
This is not a decoded-frame count and not an FFmpeg nb_frames / nb_read_frames figure. It identifies one demuxed access unit as it travels Demuxer → … → Muxer. Downstream stages copy it. Part distinguishes several frames born from the same serial.
|
inlinenoexcept |
|
inlinenoexcept |
Video properties (includes HDR10 when set).
|
friend |
|
friend |
|
friend |
|
friend |