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


Public Types | |
| using | PointerType = std::shared_ptr<Packet> |
Public Member Functions | |
Construction | |
| 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 (const Packet &other) noexcept | |
| Copy. | |
| Packet (Packet &&other) noexcept | |
| Move constructor. | |
| ~Packet () noexcept override | |
| Destructor. | |
| Packet & | operator= (const Packet &other) noexcept |
| Copy assignment. | |
| Packet & | operator= (Packet &&other) noexcept |
| Move assignment. | |
Timing | |
| 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. | |
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. | |
Codec | |
| const StormByte::Multimedia::Codec * | Codec () const noexcept |
| Registry codec of this access unit. | |
Payload | |
| 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). | |
| 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::Packet |
| class | Decoder |
| class | Demuxer |
| class | Encoder |
| class | Filter::FFmpeg |
| class | Muxer |
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 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.
Copy and Clone reference libav packet buffers (av_packet_ref). They are not a deep copy of compressed bytes.
| using StormByte::Multimedia::Pipeline::Packet::PointerType = std::shared_ptr<Packet> |
|
noexcept |
Empty packet (no payload, track -1, type Unknown).
|
noexcept |
Builds a packet.
| 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.
|
noexcept |
Copy.
Metadata and FIFO handle are copied; the libav packet is referenced (av_packet_ref).
| other | Source packet. |
Not a deep copy of compressed bytes. Clone uses this constructor.
|
noexcept |
|
overridenoexcept |
Destructor.
|
inlinenoexcept |
Side-data blobs bound to this access unit.
|
inlinenoexcept |
Side-data blobs bound to this access unit (mutable).
|
inlinenoexcept |
|
inlinenoexcept |
Decode timestamp on the stream clock.
|
inlinenoexcept |
Packet duration on the stream clock.
|
inlinenoexcept |
Whether this is a key frame / key packet.
Copy assignment.
Same as the copy constructor.
| other | Source packet. |
|
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 |
Owned compressed payload.
|
inlinenoexcept |
Owned compressed payload (mutable).
|
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.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |