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

Simple view for the AVFrameSideData elements.

#include <frame.h>

Inheritance diagram for av::FrameSideData:

Public Member Functions

std::string_view name () const noexcept
 Name of the side data type, as FFmpeg spells it.
AVFrameSideDataType 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.
BufferRefView buffer () const noexcept
 The buffer that owns the payload.
Dictionary metadata () const noexcept
 metadata
std::optional< AVSideDataDescriptor > descriptor () const noexcept
 Descriptor of this side data type, when the FFmpeg build provides one.
bool empty () const noexcept
 Whether the entry carries no payload.
 operator bool () const noexcept
 Whether the view refers to a real entry.
Public Member Functions inherited from FFWrapperPtr< AVFrameSideData >
 FFWrapperPtr ()=default
 Create an empty wrapper; isNull() is true.
const AVFrameSideData * raw () const
 Read access to the wrapped object.
void reset (AVFrameSideData *raw=nullptr)
 Replace the stored pointer.
bool isNull () const
 Whether the wrapper is empty.
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 (AVFrameSideDataType type) noexcept
 Name of a side data type.
static std::optional< AVSideDataDescriptor > descriptor (AVFrameSideDataType type) noexcept
 Descriptor of a side data type, when the FFmpeg build provides one.

Additional Inherited Members

Protected Attributes inherited from FFWrapperPtr< AVFrameSideData >
AVFrameSideData * m_raw
 The wrapped pointer; owned by the derived class, not by this template.

Member Function Documentation

◆ buffer()

BufferRefView av::FrameSideData::buffer ( ) const
noexcept
Returns
a non-owning view; empty when the entry has no buffer

◆ descriptor() [1/2]

std::optional< AVSideDataDescriptor > av::FrameSideData::descriptor ( ) const
noexcept
Returns
the descriptor, or std::nullopt for an unknown type

◆ descriptor() [2/2]

std::optional< AVSideDataDescriptor > av::FrameSideData::descriptor ( AVFrameSideDataType type)
staticnoexcept
Parameters
typethe AV_FRAME_DATA_* value
Returns
the descriptor, or std::nullopt for an unknown type

◆ empty()

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

◆ metadata()

Dictionary av::FrameSideData::metadata ( ) const
noexcept
Returns
AVFrameSideData::metadata view. Owning is not taken

◆ name() [1/2]

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

◆ name() [2/2]

std::string_view av::FrameSideData::name ( AVFrameSideDataType type)
staticnoexcept
Parameters
typethe AV_FRAME_DATA_* value
Returns
a view into a static string owned by FFmpeg, or an empty view for an unknown type

◆ operator bool()

av::FrameSideData::operator bool ( ) const
noexcept
Returns
true when the entry is present and its payload is not empty

◆ span() [1/2]

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

◆ span() [2/2]

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

◆ type()

AVFrameSideDataType av::FrameSideData::type ( ) const
noexcept
Returns
the AV_FRAME_DATA_* value

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