MythTV  master
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
MythAVBufferRef Class Reference

C++ wrapper for AVBufferRef. More...

#include <libmythtv/mythavutil.h>

Public Member Functions

 MythAVBufferRef (const AVBufferRef *buf=nullptr)
 
 ~MythAVBufferRef ()
 
 MythAVBufferRef (const MythAVBufferRef &other)
 
 MythAVBufferRef (MythAVBufferRef &&other) noexcept
 
MythAVBufferRefoperator= (MythAVBufferRef other)
 
MythAVBufferRefoperator= (MythAVBufferRef &&other) noexcept
 
bool has_buffer ()
 
const uint8_t * data ()
 
size_t size ()
 

Private Member Functions

void unref ()
 

Static Private Member Functions

static AVBufferRef * ref (const AVBufferRef *buf)
 

Private Attributes

AVBufferRef * m_buffer {nullptr}
 

Friends

void swap (MythAVBufferRef &a, MythAVBufferRef &b) noexcept
 

Detailed Description

C++ wrapper for AVBufferRef.

Using this avoids littering the code with manual memory management.

You must verify that the instance has_buffer() before calling any other function.

Definition at line 115 of file mythavutil.h.

Constructor & Destructor Documentation

◆ MythAVBufferRef() [1/3]

MythAVBufferRef::MythAVBufferRef ( const AVBufferRef *  buf = nullptr)
inlineexplicit
Parameters
bufThe AVBufferRef* to reference, may be NULL.

Definition at line 120 of file mythavutil.h.

◆ ~MythAVBufferRef()

MythAVBufferRef::~MythAVBufferRef ( )
inline

Definition at line 121 of file mythavutil.h.

◆ MythAVBufferRef() [2/3]

MythAVBufferRef::MythAVBufferRef ( const MythAVBufferRef other)
inline

Definition at line 124 of file mythavutil.h.

◆ MythAVBufferRef() [3/3]

MythAVBufferRef::MythAVBufferRef ( MythAVBufferRef &&  other)
inlinenoexcept

Definition at line 126 of file mythavutil.h.

Member Function Documentation

◆ operator=() [1/2]

MythAVBufferRef& MythAVBufferRef::operator= ( MythAVBufferRef  other)
inline

Definition at line 128 of file mythavutil.h.

◆ operator=() [2/2]

MythAVBufferRef& MythAVBufferRef::operator= ( MythAVBufferRef &&  other)
inlinenoexcept

Definition at line 134 of file mythavutil.h.

◆ has_buffer()

bool MythAVBufferRef::has_buffer ( )
inline

Definition at line 148 of file mythavutil.h.

◆ data()

const uint8_t* MythAVBufferRef::data ( )
inline

Definition at line 150 of file mythavutil.h.

◆ size()

size_t MythAVBufferRef::size ( )
inline

Definition at line 151 of file mythavutil.h.

◆ ref()

static AVBufferRef* MythAVBufferRef::ref ( const AVBufferRef *  buf)
inlinestaticprivate

Definition at line 153 of file mythavutil.h.

◆ unref()

void MythAVBufferRef::unref ( )
inlineprivate

Definition at line 166 of file mythavutil.h.

Friends And Related Function Documentation

◆ swap

void swap ( MythAVBufferRef a,
MythAVBufferRef b 
)
friend

Definition at line 142 of file mythavutil.h.

Member Data Documentation

◆ m_buffer

AVBufferRef* MythAVBufferRef::m_buffer {nullptr}
private

Definition at line 168 of file mythavutil.h.


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