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

Free functors for the FFmpeg resource types. More...

#include <avutils.h>

Public Member Functions

bool operator() (struct SwsContext *&swsContext)
 Free a swscale context.
bool operator() (struct AVCodecContext *&codecContext)
 Free a codec context.
bool operator() (struct AVOutputFormat *&format)
 Free an output format.
bool operator() (struct AVFormatContext *&formatContext)
 Close and free a format context.
bool operator() (struct AVFrame *&frame)
 Free a frame and its buffers.
bool operator() (struct AVPacket *&packet)
 Free a packet and its buffer.
bool operator() (struct AVDictionary *&dictionary)
 Free a dictionary and all its entries.
bool operator() (struct AVFilterInOut *&filterInOut)
 Free a filter input/output list.
bool operator() (struct AVBufferRef *&bufferRef)
 Drop one reference to a buffer.

Detailed Description

Each overload accepts a pointer by reference, frees the object with the matching FFmpeg call and resets the pointer, so the deleter can be used with std::unique_ptr or std::shared_ptr without leaving a dangling value.

Member Function Documentation

◆ operator()() [1/9]

bool av::v1::AvDeleter::operator() ( struct AVBufferRef *& bufferRef)
Parameters
bufferRefthe pointer to unreference; reset to null
Returns
true when a reference was dropped

◆ operator()() [2/9]

bool av::v1::AvDeleter::operator() ( struct AVCodecContext *& codecContext)
Parameters
codecContextthe pointer to free; reset to null
Returns
true when the context was freed

◆ operator()() [3/9]

bool av::v1::AvDeleter::operator() ( struct AVDictionary *& dictionary)
Parameters
dictionarythe pointer to free; reset to null
Returns
true when the dictionary was freed

◆ operator()() [4/9]

bool av::v1::AvDeleter::operator() ( struct AVFilterInOut *& filterInOut)
Parameters
filterInOutthe pointer to free; reset to null
Returns
true when the list was freed

◆ operator()() [5/9]

bool av::v1::AvDeleter::operator() ( struct AVFormatContext *& formatContext)
Parameters
formatContextthe pointer to free; reset to null
Returns
true when the context was freed

◆ operator()() [6/9]

bool av::v1::AvDeleter::operator() ( struct AVFrame *& frame)
Parameters
framethe pointer to free; reset to null
Returns
true when the frame was freed

◆ operator()() [7/9]

bool av::v1::AvDeleter::operator() ( struct AVOutputFormat *& format)
Parameters
formatthe pointer to free; reset to null
Returns
true when the format was freed

◆ operator()() [8/9]

bool av::v1::AvDeleter::operator() ( struct AVPacket *& packet)
Parameters
packetthe pointer to free; reset to null
Returns
true when the packet was freed

◆ operator()() [9/9]

bool av::v1::AvDeleter::operator() ( struct SwsContext *& swsContext)
Parameters
swsContextthe pointer to free; reset to null
Returns
true when the context was freed

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