avcpp 3.2.1
Wrapper for the FFmpeg that simplify usage from C++ projects.
Loading...
Searching...
No Matches
av::PacketSideData Class Reference

Simple view for the AVPacketSideData elements.

#include <packet.h>

Inheritance diagram for av::PacketSideData:

Public Member Functions

std::string_view name () const noexcept
 Name of the side data type, as FFmpeg spells it.
AVPacketSideDataType type () const noexcept
 Identifier of the side data type.
std::span< const uint8_t > span () const noexcept
 Read-only view of the payload.
std::span< uint8_t > span () noexcept
 Mutable view of the payload.
bool empty () const noexcept
 Whether the entry carries no payload.
 operator bool () const noexcept
 Whether the entry is present.
Public Member Functions inherited from FFWrapperRef< AVPacketSideData >
 FFWrapperRef ()=default
 Create a value-initialised holder.
const AVPacketSideData * raw () const
 Read access to the stored structure.
void reset (const AVPacketSideData &raw=AVPacketSideData())
 Replace the stored value.
bool isNull () const
 Whether the stored value equals a default-constructed one.
void _log (int level, const char *fmt) const
 Log through the FFmpeg log system, using this wrapper as the context.

Static Public Member Functions

static std::string_view name (AVPacketSideDataType type)
 Name of a side data type.

Additional Inherited Members

Protected Attributes inherited from FFWrapperRef< AVPacketSideData >
AVPacketSideData m_raw
 The stored value.

Member Function Documentation

◆ empty()

bool av::PacketSideData::empty ( ) const
noexcept
Returns
true when the payload size is zero

◆ name() [1/2]

std::string_view av::PacketSideData::name ( ) const
noexcept
Returns
a view into a static string owned by FFmpeg

◆ name() [2/2]

std::string_view av::PacketSideData::name ( AVPacketSideDataType type)
static
Parameters
typethe AV_PKT_DATA_* value
Returns
a view into a static string owned by FFmpeg, or an empty view for an unknown type

◆ operator bool()

av::PacketSideData::operator bool ( ) const
noexcept
Returns
true when the entry has a payload

◆ span() [1/2]

std::span< const uint8_t > av::PacketSideData::span ( ) const
noexcept
Returns
the bytes of this side data entry

◆ span() [2/2]

std::span< uint8_t > av::PacketSideData::span ( )
noexcept
Returns
the bytes of this side data entry

◆ type()

AVPacketSideDataType av::PacketSideData::type ( ) const
noexcept
Returns
the AV_PKT_DATA_* value

The documentation for this class was generated from the following file: