avcpp
2.0
Wrapper for the FFmpeg that simplify usage from C++ projects.
|
Go to the documentation of this file.
3 #include <system_error>
72 operator bool()
const;
77 std::error_code *m_ec =
nullptr;
89 using std::system_error::system_error;
100 virtual const char *
name()
const noexcept
override;
101 virtual std::string
message(
int ev)
const override;
110 virtual const char *name()
const noexcept
override;
111 virtual std::string message(
int ev)
const override;
148 return std::error_condition(
static_cast<int>(code),
avcpp_category());
163 template<
typename Exception = av::Exception>
169 template<
typename Exception = av::Exception>
187 template<
typename Category,
typename Exception = av::Exception>
191 *ec = std::error_code(errcode, cat);
193 throw Exception(std::error_code(errcode, cat));
196 template<
typename T,
typename Exception = av::Exception>
221 return static_cast<bool>(*ec);
229 template<>
struct is_error_condition_enum<
av::
Errors> :
public true_type {};
@ IncorrectBufferSinkMediaType
@ FormatInvalidStreamIndex
The FfmpegCategory class Describers FFmpeg internal errors.
Definition: averror.h:108
bool is_error(OptionalErrorCode ec)
Definition: averror.h:218
FfmpegCategory & ffmpeg_category()
Definition: averror.h:121
std::error_code make_ffmpeg_error(int code)
Definition: averror.h:152
@ IncorrectBufferSrcMediaType
std::error_code & operator*()
Definition: averror.cpp:88
@ IncorrectBufferSinkFilter
const AvcppCategory & avcpp_category()
Definition: averror.h:115
@ IncorrectBufferSrcFilter
@ RescalerInternalSwsError
void throw_error_code(const std::error_code &ec)
Definition: averror.h:164
std::error_condition make_error_condition(av::Errors errc) noexcept
Definition: averror.h:128
void clear_if(OptionalErrorCode ec)
clear_if - clear error code if it is not av::throws()
Definition: averror.h:211
std::error_condition make_ffmpeg_condition(int code)
Definition: averror.h:158
void throws_if(OptionalErrorCode ec, int errcode, const Category &cat)
Throws exception if ec is av::throws() or fill error code.
Definition: averror.h:188
@ CodecDecodingOffsetToLarge
Errors
Definition: averror.h:9
static OptionalErrorCode null()
Definition: averror.cpp:83
std::error_condition make_avcpp_condition(Errors code)
Definition: averror.h:146
The AvcppCategory class Describes internal AvCpp errors.
Definition: averror.h:96
virtual const char * name() const noexcept override
Definition: averror.cpp:9
The AvException class Default exception that thows from function that does not accept error code stor...
Definition: averror.h:86
std::error_code make_error_code(av::Errors errc) noexcept
Definition: averror.h:134
Definition: audioresampler.cpp:8
Definition: averror.h:228
@ FormatWrongCountOfStreamOptions
virtual std::string message(int ev) const override
Definition: averror.cpp:14
@ FilterGraphDescriptionEmpty
@ ResamplerInvalidParameters
@ RescalerInvalidParameters
std::error_code make_avcpp_error(Errors code)
Definition: averror.h:140