One compressed access unit.
More...
#include <StormByte/multimedia/pipeline/packet.hxx>
|
|
| 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 |
| | Packet duration on the stream clock.
|
| |
| bool | KeyFrame () const noexcept |
| | Whether this is a key frame / key packet.
|
| |
|
| 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.
|
| |
|
| const StormByte::Multimedia::Codec * | Codec () const noexcept |
| | Registry codec of this access unit.
|
| |
|
| const StormByte::Buffer::FIFO & | Payload () const noexcept |
| | Owned compressed payload.
|
| |
| StormByte::Buffer::FIFO & | Payload () noexcept |
| | Owned compressed payload (mutable).
|
| |
| const std::vector< SideData > & | Attachments () const noexcept |
| | Side-data blobs bound to this access unit.
|
| |
| std::vector< SideData > & | Attachments () noexcept |
| | Side-data blobs bound to this access unit (mutable).
|
| |
| 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.
|
| |
|
| | Packet () noexcept |
| | Empty packet (no payload, track -1, type Unknown).
|
| |
| | Packet (int track, enum Type type, enum Producer producer, StormByte::Buffer::FIFO payload, std::optional< Property::Duration > pts, std::optional< Property::Duration > dts, std::optional< Property::Duration > duration, bool key_frame, std::vector< SideData > attachments, const StormByte::Multimedia::Codec *codec, std::uint64_t serial, std::uint64_t part) noexcept |
| | Builds a packet.
|
| |
| | Packet (Packet &&other) noexcept |
| | Move constructor.
|
| |
| | ~Packet () noexcept override |
| | Destructor.
|
| |
| Packet & | operator= (Packet &&other) noexcept |
| | Move assignment.
|
| |
|
| | 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 compressed access unit.
In libav that is an AVPacket: compressed bytes for one picture, one audio block or one subtitle event. In Multimedia it is what packet filters, Remuxer and Muxer see — origin track, timestamps, payload, side data and the Registry StormByte::Multimedia::Codec of that AU. The Packet does not open a codec.
- See also
- Item
-
Frame
◆ PointerType
◆ Packet() [1/3]
Empty packet (no payload, track -1, type Unknown).
◆ Packet() [2/3]
| StormByte::Multimedia::Pipeline::Packet::Packet |
( |
int |
track, |
|
|
enum Type |
type, |
|
|
enum Producer |
producer, |
|
|
StormByte::Buffer::FIFO |
payload, |
|
|
std::optional< Property::Duration > |
pts, |
|
|
std::optional< Property::Duration > |
dts, |
|
|
std::optional< Property::Duration > |
duration, |
|
|
bool |
key_frame, |
|
|
std::vector< SideData > |
attachments, |
|
|
const StormByte::Multimedia::Codec * |
codec, |
|
|
std::uint64_t |
serial, |
|
|
std::uint64_t |
part |
|
) |
| |
|
noexcept |
Builds a packet.
- Parameters
-
| track | Origin container stream index. |
| type | Media of this access unit. |
| producer | Step that created this unit. |
| payload | Owned compressed bytes. |
| pts | Presentation timestamp, if known. |
| dts | Decode timestamp, if known. |
| duration | Packet duration, if known. |
| key_frame | Whether this is a key frame. |
| attachments | Side-data blobs that must reach the muxer. |
| codec | Registry codec of this AU, or nullptr. |
| serial | Lineage id born at the demuxer for this origin track. |
| part | Sub-id inside serial. Zero when the demuxed unit did not split. |
Encoder stamps the destination codec. Demuxer stamps the source stream codec. There is no public setter.
◆ Packet() [3/3]
Move constructor.
- Parameters
-
other becomes the empty sentinel.
◆ ~Packet()
| StormByte::Multimedia::Pipeline::Packet::~Packet |
( |
| ) |
|
|
overridenoexcept |
◆ Attachments() [1/2]
| const std::vector< SideData > & StormByte::Multimedia::Pipeline::Packet::Attachments |
( |
| ) |
const |
|
inlinenoexcept |
Side-data blobs bound to this access unit.
- Returns
- Blobs (HdrPlus, captions, …). Empty when none.
◆ Attachments() [2/2]
| std::vector< SideData > & StormByte::Multimedia::Pipeline::Packet::Attachments |
( |
| ) |
|
|
inlinenoexcept |
Side-data blobs bound to this access unit (mutable).
- Returns
- Blobs.
◆ Codec()
Registry codec of this access unit.
- Returns
- Pointer owned by Registry, or nullptr on the sentinel.
◆ Dts()
| const std::optional< Property::Duration > & StormByte::Multimedia::Pipeline::Packet::Dts |
( |
| ) |
const |
|
inlinenoexcept |
Decode timestamp on the stream clock.
- Returns
- Dts, or empty.
◆ Duration()
| const std::optional< Property::Duration > & StormByte::Multimedia::Pipeline::Packet::Duration |
( |
| ) |
const |
|
inlinenoexcept |
Packet duration on the stream clock.
- Returns
- Duration, or empty.
◆ KeyFrame()
| bool StormByte::Multimedia::Pipeline::Packet::KeyFrame |
( |
| ) |
const |
|
inlinenoexcept |
Whether this is a key frame / key packet.
- Returns
- true if marked as a key frame.
◆ operator=()
| Packet & StormByte::Multimedia::Pipeline::Packet::operator= |
( |
Packet && |
other | ) |
|
|
noexcept |
Move assignment.
- Parameters
-
- Returns
- *this.
other becomes the empty sentinel.
◆ Part()
| std::uint64_t StormByte::Multimedia::Pipeline::Packet::Part |
( |
| ) |
const |
|
inlinenoexcept |
Sub-id inside Serial when one demuxed unit yields several frames.
- Returns
- Zero when the unit did not split; 0, 1, … after a split.
Downstream stages copy this value. It is not a pipe-wide counter.
◆ Payload() [1/2]
| const StormByte::Buffer::FIFO & StormByte::Multimedia::Pipeline::Packet::Payload |
( |
| ) |
const |
|
inlinenoexcept |
Owned compressed payload.
- Returns
- FIFO (not thread-safe).
◆ Payload() [2/2]
| StormByte::Buffer::FIFO & StormByte::Multimedia::Pipeline::Packet::Payload |
( |
| ) |
|
|
inlinenoexcept |
Owned compressed payload (mutable).
- Returns
- FIFO (not thread-safe).
◆ Pts()
| const std::optional< Property::Duration > & StormByte::Multimedia::Pipeline::Packet::Pts |
( |
| ) |
const |
|
inlinenoexcept |
Presentation timestamp on the stream clock.
- Returns
- Pts, or empty.
◆ Serial()
| const std::optional< std::uint64_t > & StormByte::Multimedia::Pipeline::Packet::Serial |
( |
| ) |
const |
|
inlinenoexcept |
Monotonic lineage id assigned when the unit enters the pipe.
- Returns
- Serial born at the demuxer for this origin track; empty on the sentinel.
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.
◆ Backend::Pipeline::Packet
| friend class Backend::Pipeline::Packet |
|
friend |
◆ Decoder
◆ Demuxer
◆ Encoder
◆ Filter::FFmpeg
◆ Muxer
The documentation for this class was generated from the following file:
- lib/public/StormByte/multimedia/pipeline/packet.hxx