6 #if AVCPP_CXX_STANDARD >= 20
75 std::
size_t size() const noexcept;
80 const uint8_t*
data() const noexcept;
85 const uint8_t*
constData() const noexcept;
94 #if AVCPP_CXX_STANDARD >= 20
99 std::span<const uint8_t> span() const noexcept;
104 std::span<const uint8_t> constSpan() const noexcept;
138 BufferRef(std::size_t
size,
bool keepUninit =
true) noexcept;
157 BufferRef(uint8_t *
data,
size_t size,
void (*free)(
void *opaque, uint8_t *
data),
void *opaque,
int flags = 0) noexcept;
169 BufferRef(const uint8_t *
data,
size_t size,
void (*free)(
void *opaque, uint8_t *
data),
void *opaque,
int flags = 0) noexcept;
182 #if AVCPP_CXX_STANDARD
192 BufferRef(std::span<uint8_t>
data,
void (*free)(
void *opaque, uint8_t *
data),
void *opaque,
int flags = 0) noexcept;
244 static
BufferRef wrap(const AVBufferRef *buf,
int flags = 0) noexcept;
271 AVBufferRef*
release() noexcept;
276 void reset() noexcept;
Non-owning view for the nested AVBufferRef.
Definition: buffer.h:25
BufferRefView()=default
Construct null buffer.
int refCount() const noexcept
Report current reference counter of the buffer.
Definition: buffer.cpp:58
std::size_t size() const noexcept
Nested buffer size.
Definition: buffer.cpp:63
BufferRef ref()
Create reference to the view data, refCount() will be increased.
Definition: buffer.cpp:39
AVBufferRef * makeRef(iam_sure_what_i_do_tag) const noexcept
Make an reference of the exsting buffer.
Definition: buffer.cpp:35
bool isWritable() const noexcept
Report writable flag.
Definition: buffer.cpp:53
const uint8_t * data() const noexcept
Pointer to the data block start.
Definition: buffer.cpp:68
const uint8_t * constData() const noexcept
Force request const data.
Definition: buffer.cpp:73
BufferRef clone(int flags=0) const noexcept
Make deep copy of the existing buffer.
Definition: buffer.cpp:46
Light weight wrapper for the FFmpeg AVBufferRef functionality.
Definition: buffer.h:119
BufferRef ref()
Create reference to the view data, refCount() will be increased.
Definition: buffer.cpp:39
BufferRef()=default
Construct null buffer.
void makeWritable(OptionalErrorCode ec=throws())
Make buffer writable.
Definition: buffer.cpp:211
~BufferRef() noexcept
Unref nested AVBufferRef.
Definition: buffer.cpp:170
void resize(std::size_t size, OptionalErrorCode ec=throws())
Resize given buffer.
Definition: buffer.cpp:224
void swap(BufferRef &other) noexcept
Swap nested data with other.
Definition: buffer.cpp:237
static BufferRef wrap(const AVBufferRef *buf, int flags=0) noexcept
Wrap constant raw buffer reference.
Definition: buffer.cpp:182
void reset() noexcept
Force to unref nested data.
Definition: buffer.cpp:202
AVBufferRef * release() noexcept
Release owning of the buffer and return existing raw AVBufferRef.
Definition: buffer.cpp:197
void null_deleter(void *, uint8_t *)
Buffer deleter that do nothing.
Definition: buffer.cpp:15
Definition: audioresampler.cpp:8
OptionalErrorCode throws()
Helper to construct null OptionalErrorCode object.
Definition: averror.h:181
Definition: averror.h:230
Tag to confirm usage of the Low Level functionality.
Definition: buffer.h:40