avcpp
2.0
Wrapper for the FFmpeg that simplify usage from C++ projects.
|
Namespaces | |
codec_context | |
frame | |
internal | |
v1 | |
The AvDeleter struct Unified delete functor for variois FFMPEG/libavformat/libavcodec and so on resource allocators. | |
v2 | |
Classes | |
class | AudioCodecContext |
class | AudioDecoderContext |
class | AudioEncoderContext |
class | AudioResampler |
class | AudioSamples |
class | AvcppCategory |
The AvcppCategory class Describes internal AvCpp errors. More... | |
class | BufferSinkFilterContext |
class | BufferSrcFilterContext |
class | Codec |
class | CodecContext2 |
class | CodecContextBase |
class | CodecParameters |
class | CodecParametersView |
The CodecParametersView class. More... | |
struct | CustomIO |
struct | DefaultNextElement |
This functor uses simple notation to take next element from linked list. More... | |
struct | DefaultResetPtr |
This functor used by default to set new pointer that will be wrapped by W wrapper. More... | |
struct | DefaultWrapperCast |
This functor used by default to take access to raw pointer that wrapped by W wrapper. More... | |
class | Dictionary |
Implements interface to access to the AVDictionary entity. More... | |
class | DictionaryArray |
Array of Dictinaries wrapper. More... | |
struct | EmptyDeleter |
struct | EqualComparator |
class | Exception |
The AvException class Default exception that thows from function that does not accept error code storage. More... | |
class | FfmpegCategory |
The FfmpegCategory class Describers FFmpeg internal errors. More... | |
class | Filter |
class | FilterContext |
class | FilterGraph |
class | FilterPadList |
struct | Format |
class | FormatContext |
class | Frame |
class | GenericCodecContext |
The GenericCodecContext class to copy contexts from input streams to output one. More... | |
struct | IncrementNextElement |
This functor uses increment operation to take next element in list/array. More... | |
class | InputFormat |
class | LinkedListWrapper |
Universal wrapper for one directional linked list elements. More... | |
class | noncopyable |
struct | NullDeleter |
This deleter does nothing. More... | |
class | OptionalErrorCode |
class | OutputFormat |
class | Packet |
class | PixelFormat |
The PixelFormat class is a simple wrapper for AVPixelFormat that allow to acces it it properties. More... | |
struct | PtrDeleter |
This deleter simple call 'delete' operator. More... | |
class | Rational |
class | Rect |
class | SampleFormat |
The SampleFormat class is a simple proxy class for AVSampleFormat. More... | |
class | ScopedValue |
Functor to take next element in list/array. More... | |
class | ScopeOutAction |
The ScopeOutAction class - guard-type class that allows points callback that will be called at the scope out. More... | |
struct | SmartDeleter |
class | Stream |
class | Timestamp |
The Timestamp class represents timestamp value and it timebase. More... | |
class | VideoCodecContext |
class | VideoDecoderContext |
class | VideoEncoderContext |
class | VideoFrame |
class | VideoRescaler |
Typedefs | |
template<typename T > | |
using | avcpp_format_const = typename std::conditional< std::is_const< typename std::remove_pointer< decltype(AVFormatContext::iformat) >::type >::value, const T, T >::type |
using | FmtCodec = class Codec |
using | AvioInterruptCb = std::function< int()> |
Functions | |
void | init () |
Init all subsustems needed by avcpp. More... | |
const AvcppCategory & | avcpp_category () |
FfmpegCategory & | ffmpeg_category () |
std::error_condition | make_error_condition (av::Errors errc) noexcept |
std::error_code | make_error_code (av::Errors errc) noexcept |
std::error_code | make_avcpp_error (Errors code) |
std::error_condition | make_avcpp_condition (Errors code) |
std::error_code | make_ffmpeg_error (int code) |
std::error_condition | make_ffmpeg_condition (int code) |
template<typename Exception = av::Exception> | |
void | throw_error_code (const std::error_code &ec) |
template<typename Exception = av::Exception> | |
void | throw_error_code (Errors errc) |
OptionalErrorCode | throws () |
Helper to construct null OptionalErrorCode object. More... | |
template<typename Category , typename Exception = av::Exception> | |
void | throws_if (OptionalErrorCode ec, int errcode, const Category &cat) |
Throws exception if ec is av::throws() or fill error code. More... | |
template<typename T , typename Exception = av::Exception> | |
void | throws_if (OptionalErrorCode ec, T errcode) |
void | clear_if (OptionalErrorCode ec) |
clear_if - clear error code if it is not av::throws() More... | |
bool | is_error (OptionalErrorCode ec) |
int64_t | gettime () |
Get the current time in microseconds. More... | |
int | usleep (unsigned usec) |
Sleep for a period of time. More... | |
void | set_logging_level (int32_t level) |
This method can be used to turn up or down FFmpeg's logging level. More... | |
void | set_logging_level (const string &level) |
void | dumpBinaryBuffer (uint8_t *buffer, int buffer_size, int width=16) |
dump_binary_buffer Dump binary buffer to std out in HEX view More... | |
static int | avcpp_lockmgr_cb (void **ctx, enum AVLockOp op) |
string | error2string (int error) |
C++ verstion of the av_err2str() More... | |
template<typename R , typename T > | |
R | lexical_cast (const T &v) |
void | set_logging_level (const std::string &level) |
Like. More... | |
template<typename T > | |
std::unique_ptr< T, void(*)(void *)> | malloc (size_t size) |
template<typename T > | |
std::unique_ptr< T, void(*)(void *)> | mallocz (size_t size) |
template<typename T > | |
std::unique_ptr< T, void(*)(void *)> | memdup (const void *p, size_t size) |
template<typename T , typename L , typename C > | |
T | guessValue (const T &value, const L *list, C endListComparator) |
Select more approptiate value from given value list. More... | |
template<typename T , typename Container > | |
void | array_to_container (const T *array, std::size_t nelements, Container &container) |
template<typename T , typename Container , typename Callable > | |
void | array_to_container (const T *array, std::size_t nelements, Container &container, Callable convert) |
template<typename T , typename Container , typename Compare > | |
void | array_to_container (const T *array, Container &container, Compare isEnd) |
template<typename T , typename Container , typename Compare , typename Callable > | |
void | array_to_container (const T *array, Container &container, Compare isEnd, Callable convert) |
Codec | findEncodingCodec (AVCodecID id) |
Codec | findEncodingCodec (const string &name) |
Codec | findDecodingCodec (AVCodecID id) |
Codec | findDecodingCodec (const string &name) |
Codec | guessEncodingCodec (OutputFormat format, const char *name, const char *url, const char *mime, AVMediaType mediaType) |
Codec | findEncodingCodec (const OutputFormat &format, bool isVideo) |
Codec | findEncodingCodec (const std::string &name) |
Codec | findDecodingCodec (const std::string &name) |
bool | operator== (const Dictionary::Entry &lhs, const Dictionary::Entry &rhs) |
bool | operator!= (const Dictionary::Entry &lhs, const Dictionary::Entry &rhs) |
static size_t | get_pad_count (const AVFilter *filter, bool output) |
OutputFormat | guessOutputFormat (const std::string &name, const std::string &url, const std::string &mime) |
static void | dummy_buffer_free (void *, uint8_t *) |
template<typename T > | |
auto | operator/ (T num, Rational value) -> std::enable_if_t< std::is_floating_point_v< T >||std::is_integral_v< T >, Rational > |
template<typename T > | |
auto | operator/ (Rational value, T num) -> std::enable_if_t< std::is_floating_point_v< T >||std::is_integral_v< T >, Rational > |
std::ostream & | operator<< (std::ostream &stream, const Rational &value) |
std::istream & | operator>> (std::istream &stream, Rational &value) |
Timestamp | operator+ (const Timestamp &left, const Timestamp &right) noexcept |
Timestamp | operator- (const Timestamp &left, const Timestamp &right) noexcept |
Timestamp | operator* (const Timestamp &left, const Timestamp &right) noexcept |
Timestamp | operator/ (const Timestamp &left, const Timestamp &right) noexcept |
bool | operator> (const Timestamp &left, const Timestamp &right) noexcept |
bool | operator< (const Timestamp &left, const Timestamp &right) noexcept |
bool | operator== (const Timestamp &left, const Timestamp &right) noexcept |
bool | operator!= (const Timestamp &left, const Timestamp &right) noexcept |
bool | operator>= (const Timestamp &left, const Timestamp &right) noexcept |
bool | operator<= (const Timestamp &left, const Timestamp &right) noexcept |
std::ostream & | operator<< (std::ostream &ost, const Timestamp &ts) |
Variables | |
constexpr auto | NoPts = static_cast<int64_t>(AV_NOPTS_VALUE) |
constexpr auto | TimeBase = static_cast<int>(AV_TIME_BASE) |
constexpr auto | TimeBaseQ = AVRational{1, AV_TIME_BASE} |
using av::avcpp_format_const = typedef typename std::conditional< std::is_const< typename std::remove_pointer< decltype(AVFormatContext::iformat) >::type >::value, const T, T>::type |
using av::AvioInterruptCb = typedef std::function<int()> |
using av::FmtCodec = typedef class Codec |
|
strong |
|
strong |
|
strong |
enum av::SwsFlags |
void av::array_to_container | ( | const T * | array, |
Container & | container, | ||
Compare | isEnd | ||
) |
void av::array_to_container | ( | const T * | array, |
Container & | container, | ||
Compare | isEnd, | ||
Callable | convert | ||
) |
void av::array_to_container | ( | const T * | array, |
std::size_t | nelements, | ||
Container & | container | ||
) |
void av::array_to_container | ( | const T * | array, |
std::size_t | nelements, | ||
Container & | container, | ||
Callable | convert | ||
) |
|
inline |
|
static |
|
inline |
clear_if - clear error code if it is not av::throws()
ec | error code to clear |
|
static |
void av::dumpBinaryBuffer | ( | uint8_t * | buffer, |
int | buffer_size, | ||
int | width = 16 |
||
) |
dump_binary_buffer Dump binary buffer to std out in HEX view
buffer | pointer to buffer start |
buffer_size | buffer size |
width | output width in hex values (real text screen with is: sw = width * 3 - 1) |
std::string av::error2string | ( | int | error | ) |
C++ verstion of the av_err2str()
error | - error code to convert to string |
|
inline |
Codec av::findDecodingCodec | ( | AVCodecID | id | ) |
Codec av::findDecodingCodec | ( | const std::string & | name | ) |
Codec av::findDecodingCodec | ( | const string & | name | ) |
Codec av::findEncodingCodec | ( | AVCodecID | id | ) |
Codec av::findEncodingCodec | ( | const OutputFormat & | format, |
bool | isVideo | ||
) |
Codec av::findEncodingCodec | ( | const std::string & | name | ) |
Codec av::findEncodingCodec | ( | const string & | name | ) |
|
static |
int64_t av::gettime | ( | ) |
Get the current time in microseconds.
Codec av::guessEncodingCodec | ( | OutputFormat | format, |
const char * | name, | ||
const char * | url, | ||
const char * | mime, | ||
AVMediaType | mediaType | ||
) |
OutputFormat av::guessOutputFormat | ( | const std::string & | name, |
const std::string & | url, | ||
const std::string & | mime | ||
) |
T av::guessValue | ( | const T & | value, |
const L * | list, | ||
C | endListComparator | ||
) |
Select more approptiate value from given value list.
Useful for AVCodec::supported_framerates, AVCodec::pix_fmts and so on.
T - type of value and (by default) list elements L - type of list elements C - end list comparator
If T and L different types, T must be have ctor from L.
value | value to set |
list | list of allowed values |
endOfListValue | end of list value, like |
void av::init | ( | ) |
Init all subsustems needed by avcpp.
Must be call before any other functionality
|
inline |
R av::lexical_cast | ( | const T & | v | ) |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
std::unique_ptr<T, void(*)(void*)> av::malloc | ( | size_t | size | ) |
std::unique_ptr<T, void(*)(void*)> av::mallocz | ( | size_t | size | ) |
std::unique_ptr<T, void(*)(void*)> av::memdup | ( | const void * | p, |
size_t | size | ||
) |
bool av::operator!= | ( | const Dictionary::Entry & | lhs, |
const Dictionary::Entry & | rhs | ||
) |
auto av::operator/ | ( | Rational | value, |
T | num | ||
) | -> std::enable_if_t<std::is_floating_point_v<T> || std::is_integral_v<T>, Rational> |
auto av::operator/ | ( | T | num, |
Rational | value | ||
) | -> std::enable_if_t<std::is_floating_point_v<T> || std::is_integral_v<T>, Rational> |
|
inline |
|
inline |
bool av::operator== | ( | const Dictionary::Entry & | lhs, |
const Dictionary::Entry & | rhs | ||
) |
|
inline |
void av::set_logging_level | ( | const std::string & | level | ) |
Like.
level | - string representation of loggin level: 'quiet', 'panic', 'fatal', 'error', 'warning', 'info', 'verbose' or 'debug', it also can be numeric (but in string representation), it it case boost::lexical_cast will be used and set_logging_level(int32_t) will be called. |
void av::set_logging_level | ( | const string & | level | ) |
void av::set_logging_level | ( | int32_t | level | ) |
This method can be used to turn up or down FFmpeg's logging level.
level | An integer value for level. Lower numbers mean less logging. A negative number tells FFmpeg to shut up. |
void av::throw_error_code | ( | const std::error_code & | ec | ) |
void av::throw_error_code | ( | Errors | errc | ) |
|
inline |
Helper to construct null OptionalErrorCode object.
void av::throws_if | ( | OptionalErrorCode | ec, |
int | errcode, | ||
const Category & | cat | ||
) |
Throws exception if ec is av::throws() or fill error code.
void av::throws_if | ( | OptionalErrorCode | ec, |
T | errcode | ||
) |
int av::usleep | ( | unsigned | usec | ) |
Sleep for a period of time.
Although the duration is expressed in microseconds, the actual delay may be rounded to the precision of the system timer.
usec | Number of microseconds to sleep. |
|
constexpr |
|
constexpr |
|
constexpr |