|
avcpp 3.1.0
Wrapper for the FFmpeg that simplify usage from C++ projects.
|
Non-owning view for the nested AVBufferRef.
#include <buffer.h>
Classes | |
| struct | iam_sure_what_i_do_tag |
| Tag to confirm usage of the Low Level functionality. More... | |
Public Member Functions | |
| BufferRefView ()=default | |
| Construct null buffer. | |
| BufferRefView (BufferRef &ref) | |
| View an owning buffer. | |
| BufferRefView (const BufferRef &ref) | |
| View an owning buffer, read-only. | |
| AVBufferRef * | makeRef (iam_sure_what_i_do_tag) const noexcept |
| Make an reference of the exsting buffer. | |
| BufferRef | ref () |
| Create reference to the view data, refCount() will be increased. | |
| BufferRef | clone (int flags=0) const noexcept |
| Make deep copy of the existing buffer. | |
| int | refCount () const noexcept |
| Report current reference counter of the buffer. | |
| bool | isWritable () const noexcept |
| Report writable flag. | |
| std::size_t | size () const noexcept |
| Nested buffer size. | |
| const uint8_t * | data () const noexcept |
| Pointer to the data block start. | |
| const uint8_t * | constData () const noexcept |
| Force request const data. | |
| uint8_t * | data (OptionalErrorCode ec=throws()) |
| Pointer to the data block start. | |
| std::span< const uint8_t > | span () const noexcept |
| Span interface to obtain nested buffer data. | |
| std::span< const uint8_t > | constSpan () const noexcept |
| Force request const span. | |
| std::span< uint8_t > | span (OptionalErrorCode ec=throws()) |
| Span interface to obtain nested buffer data. | |
| Public Member Functions inherited from FFWrapperPtr< AVBufferRef > | |
| FFWrapperPtr ()=default | |
| Create an empty wrapper; isNull() is true. | |
| const AVBufferRef * | raw () const |
| Read access to the wrapped object. | |
| void | reset (AVBufferRef *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. | |
Additional Inherited Members | |
| Protected Attributes inherited from FFWrapperPtr< AVBufferRef > | |
| AVBufferRef * | m_raw |
| The wrapped pointer; owned by the derived class, not by this template. | |
|
explicit |
| ref | the buffer to view; the view borrows its pointer |
|
explicit |
| ref | the buffer to view |
|
noexcept |
Data will be copied into new buffer and owning taken.
| flags | AV_BUFFER_FLAG_* |
|
noexcept |
|
noexcept |
|
noexcept |
| uint8_t * av::BufferRefView::data | ( | OptionalErrorCode | ec = throws() | ) |
Note, write access possible only to the buffer when isWritable()==true. If buffer can't be written error code will reported or exception reised.
| ec |
|
noexcept |
Always false if refCount() == 0 or > 1. Otherwise controls by the AV_BUFFER_FLAG_READONLY.
|
noexcept |
Useful to pass to the low-level API.
| BufferRef av::BufferRefView::ref | ( | ) |
|
noexcept |
For the refCount() > 1 isWritable() always return false.
|
noexcept |
|
noexcept |
| std::span< uint8_t > av::BufferRefView::span | ( | OptionalErrorCode | ec = throws() | ) |
Like data(ec) possible only for writable buffers.
| ec |