avcpp
2.0
Wrapper for the FFmpeg that simplify usage from C++ projects.
|
#include <formatcontext.h>
Public Member Functions | |
FormatContext () | |
~FormatContext () | |
void | setSocketTimeout (int64_t timeout) |
void | setInterruptCallback (const AvioInterruptCb &cb) |
void | setFormat (const InputFormat &format) |
void | setFormat (const OutputFormat &format) |
InputFormat | inputFormat () const |
OutputFormat | outputFormat () const |
bool | isOutput () const |
bool | isOpened () const |
void | flush () |
void | close () |
void | dump () const |
size_t | streamsCount () const |
Stream | stream (size_t idx) |
Stream | stream (size_t idx, OptionalErrorCode ec) |
Stream | addStream (const Codec &codec, OptionalErrorCode ec=throws()) |
Stream | addStream (OptionalErrorCode ec=throws()) |
Stream | addStream (const class VideoEncoderContext &encCtx, OptionalErrorCode ec=throws()) |
Stream | addStream (const class AudioEncoderContext &encCtx, OptionalErrorCode ec=throws()) |
bool | seekable () const noexcept |
void | seek (const Timestamp ×tamp, OptionalErrorCode ec=throws()) |
void | seek (const Timestamp ×tamp, size_t streamIndex, OptionalErrorCode ec=throws()) |
void | seek (const Timestamp ×tamp, bool anyFrame, OptionalErrorCode ec=throws()) |
void | seek (const Timestamp ×tamp, size_t streamIndex, bool anyFrame, OptionalErrorCode ec=throws()) |
void | seek (int64_t position, int streamIndex, int flags, OptionalErrorCode ec=throws()) |
Timestamp | startTime () const noexcept |
Timestamp | duration () const noexcept |
void | substractStartTime (bool enable) |
int | eventFlags () const noexcept |
Flags to the user to detect events happening on the file. More... | |
bool | eventFlags (int flags) const noexcept |
void | eventFlagsClear (int flags) noexcept |
void | openInput (const std::string &uri, OptionalErrorCode ec=throws()) |
void | openInput (const std::string &uri, Dictionary &formatOptions, OptionalErrorCode ec=throws()) |
void | openInput (const std::string &uri, Dictionary &&formatOptions, OptionalErrorCode ec=throws()) |
void | openInput (const std::string &uri, InputFormat format, OptionalErrorCode ec=throws()) |
void | openInput (const std::string &uri, Dictionary &formatOptions, InputFormat format, OptionalErrorCode ec=throws()) |
void | openInput (const std::string &uri, Dictionary &&formatOptions, InputFormat format, OptionalErrorCode ec=throws()) |
void | openInput (CustomIO *io, OptionalErrorCode ec=throws(), size_t internalBufferSize=CUSTOM_IO_DEFAULT_BUFFER_SIZE) |
void | openInput (CustomIO *io, Dictionary &formatOptions, OptionalErrorCode ec=throws(), size_t internalBufferSize=CUSTOM_IO_DEFAULT_BUFFER_SIZE) |
void | openInput (CustomIO *io, Dictionary &&formatOptions, OptionalErrorCode ec=throws(), size_t internalBufferSize=CUSTOM_IO_DEFAULT_BUFFER_SIZE) |
void | openInput (CustomIO *io, InputFormat format, OptionalErrorCode ec=throws(), size_t internalBufferSize=CUSTOM_IO_DEFAULT_BUFFER_SIZE) |
void | openInput (CustomIO *io, Dictionary &formatOptions, InputFormat format, OptionalErrorCode ec=throws(), size_t internalBufferSize=CUSTOM_IO_DEFAULT_BUFFER_SIZE) |
void | openInput (CustomIO *io, Dictionary &&formatOptions, InputFormat format, OptionalErrorCode ec=throws(), size_t internalBufferSize=CUSTOM_IO_DEFAULT_BUFFER_SIZE) |
void | findStreamInfo (OptionalErrorCode ec=throws()) |
void | findStreamInfo (DictionaryArray &streamsOptions, OptionalErrorCode ec=throws()) |
void | findStreamInfo (DictionaryArray &&streamsOptions, OptionalErrorCode ec=throws()) |
Packet | readPacket (OptionalErrorCode ec=throws()) |
void | openOutput (const std::string &uri, OptionalErrorCode ec=throws()) |
void | openOutput (const std::string &uri, Dictionary &options, OptionalErrorCode ec=throws()) |
void | openOutput (const std::string &uri, Dictionary &&options, OptionalErrorCode ec=throws()) |
void | openOutput (CustomIO *io, OptionalErrorCode ec=throws(), size_t internalBufferSize=CUSTOM_IO_DEFAULT_BUFFER_SIZE) |
void | writeHeader (OptionalErrorCode ec=throws()) |
void | writeHeader (Dictionary &options, OptionalErrorCode ec=throws()) |
void | writeHeader (Dictionary &&options, OptionalErrorCode ec=throws()) |
void | writePacket (OptionalErrorCode ec=throws()) |
void | writePacket (const Packet &pkt, OptionalErrorCode ec=throws()) |
void | writePacketDirect (OptionalErrorCode ec=throws()) |
void | writePacketDirect (const Packet &pkt, OptionalErrorCode ec=throws()) |
bool | checkUncodedFrameWriting (size_t streamIndex, std::error_code &ec) noexcept |
bool | checkUncodedFrameWriting (size_t streamIndex) noexcept |
void | writeUncodedFrame (class VideoFrame &frame, size_t streamIndex, OptionalErrorCode ec=throws()) |
void | writeUncodedFrameDirect (class VideoFrame &frame, size_t streamIndex, OptionalErrorCode ec=throws()) |
void | writeUncodedFrame (class AudioSamples &frame, size_t streamIndex, OptionalErrorCode ec=throws()) |
void | writeUncodedFrameDirect (class AudioSamples &frame, size_t streamIndex, OptionalErrorCode ec=throws()) |
void | writeTrailer (OptionalErrorCode ec=throws()) |
Public Member Functions inherited from FFWrapperPtr< AVFormatContext > | |
FFWrapperPtr ()=default | |
FFWrapperPtr (AVFormatContext *raw) | |
const AVFormatContext * | raw () const |
AVFormatContext * | raw () |
void | reset (AVFormatContext *raw=nullptr) |
bool | isNull () const |
void | _log (int level, const char *fmt) const |
void | _log (int level, const char *fmt, const Args &... args) const |
Static Public Attributes | |
static constexpr size_t | CUSTOM_IO_DEFAULT_BUFFER_SIZE = 200000 |
Additional Inherited Members | |
Protected Member Functions inherited from av::noncopyable | |
noncopyable ()=default | |
noncopyable (const noncopyable &)=delete | |
void | operator= (const noncopyable &)=delete |
Protected Attributes inherited from FFWrapperPtr< AVFormatContext > | |
AVFormatContext * | m_raw |
av::FormatContext::FormatContext | ( | ) |
av::FormatContext::~FormatContext | ( | ) |
Stream av::FormatContext::addStream | ( | const class AudioEncoderContext & | encCtx, |
OptionalErrorCode | ec = throws() |
||
) |
Stream av::FormatContext::addStream | ( | const class VideoEncoderContext & | encCtx, |
OptionalErrorCode | ec = throws() |
||
) |
Stream av::FormatContext::addStream | ( | const Codec & | codec, |
OptionalErrorCode | ec = throws() |
||
) |
Stream av::FormatContext::addStream | ( | OptionalErrorCode | ec = throws() | ) |
|
noexcept |
|
noexcept |
void av::FormatContext::close | ( | ) |
void av::FormatContext::dump | ( | ) | const |
|
noexcept |
|
noexcept |
Flags to the user to detect events happening on the file.
A combination of AVFMT_EVENT_FLAG_*. Must be cleared by the user.
|
noexcept |
|
noexcept |
void av::FormatContext::findStreamInfo | ( | DictionaryArray && | streamsOptions, |
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::findStreamInfo | ( | DictionaryArray & | streamsOptions, |
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::findStreamInfo | ( | OptionalErrorCode | ec = throws() | ) |
void av::FormatContext::flush | ( | ) |
InputFormat av::FormatContext::inputFormat | ( | ) | const |
bool av::FormatContext::isOpened | ( | ) | const |
bool av::FormatContext::isOutput | ( | ) | const |
void av::FormatContext::openInput | ( | const std::string & | uri, |
Dictionary && | formatOptions, | ||
InputFormat | format, | ||
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::openInput | ( | const std::string & | uri, |
Dictionary && | formatOptions, | ||
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::openInput | ( | const std::string & | uri, |
Dictionary & | formatOptions, | ||
InputFormat | format, | ||
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::openInput | ( | const std::string & | uri, |
Dictionary & | formatOptions, | ||
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::openInput | ( | const std::string & | uri, |
InputFormat | format, | ||
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::openInput | ( | const std::string & | uri, |
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::openInput | ( | CustomIO * | io, |
Dictionary && | formatOptions, | ||
InputFormat | format, | ||
OptionalErrorCode | ec = throws() , |
||
size_t | internalBufferSize = CUSTOM_IO_DEFAULT_BUFFER_SIZE |
||
) |
|
inline |
void av::FormatContext::openInput | ( | CustomIO * | io, |
Dictionary & | formatOptions, | ||
InputFormat | format, | ||
OptionalErrorCode | ec = throws() , |
||
size_t | internalBufferSize = CUSTOM_IO_DEFAULT_BUFFER_SIZE |
||
) |
|
inline |
void av::FormatContext::openInput | ( | CustomIO * | io, |
InputFormat | format, | ||
OptionalErrorCode | ec = throws() , |
||
size_t | internalBufferSize = CUSTOM_IO_DEFAULT_BUFFER_SIZE |
||
) |
|
inline |
void av::FormatContext::openOutput | ( | const std::string & | uri, |
Dictionary && | options, | ||
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::openOutput | ( | const std::string & | uri, |
Dictionary & | options, | ||
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::openOutput | ( | const std::string & | uri, |
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::openOutput | ( | CustomIO * | io, |
OptionalErrorCode | ec = throws() , |
||
size_t | internalBufferSize = CUSTOM_IO_DEFAULT_BUFFER_SIZE |
||
) |
OutputFormat av::FormatContext::outputFormat | ( | ) | const |
Packet av::FormatContext::readPacket | ( | OptionalErrorCode | ec = throws() | ) |
void av::FormatContext::seek | ( | const Timestamp & | timestamp, |
bool | anyFrame, | ||
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::seek | ( | const Timestamp & | timestamp, |
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::seek | ( | const Timestamp & | timestamp, |
size_t | streamIndex, | ||
bool | anyFrame, | ||
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::seek | ( | const Timestamp & | timestamp, |
size_t | streamIndex, | ||
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::seek | ( | int64_t | position, |
int | streamIndex, | ||
int | flags, | ||
OptionalErrorCode | ec = throws() |
||
) |
|
noexcept |
void av::FormatContext::setFormat | ( | const InputFormat & | format | ) |
void av::FormatContext::setFormat | ( | const OutputFormat & | format | ) |
void av::FormatContext::setInterruptCallback | ( | const AvioInterruptCb & | cb | ) |
void av::FormatContext::setSocketTimeout | ( | int64_t | timeout | ) |
|
noexcept |
Stream av::FormatContext::stream | ( | size_t | idx | ) |
Stream av::FormatContext::stream | ( | size_t | idx, |
OptionalErrorCode | ec | ||
) |
size_t av::FormatContext::streamsCount | ( | ) | const |
void av::FormatContext::substractStartTime | ( | bool | enable | ) |
void av::FormatContext::writeHeader | ( | Dictionary && | options, |
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::writeHeader | ( | Dictionary & | options, |
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::writeHeader | ( | OptionalErrorCode | ec = throws() | ) |
void av::FormatContext::writePacket | ( | const Packet & | pkt, |
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::writePacket | ( | OptionalErrorCode | ec = throws() | ) |
void av::FormatContext::writePacketDirect | ( | const Packet & | pkt, |
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::writePacketDirect | ( | OptionalErrorCode | ec = throws() | ) |
void av::FormatContext::writeTrailer | ( | OptionalErrorCode | ec = throws() | ) |
void av::FormatContext::writeUncodedFrame | ( | class AudioSamples & | frame, |
size_t | streamIndex, | ||
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::writeUncodedFrame | ( | class VideoFrame & | frame, |
size_t | streamIndex, | ||
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::writeUncodedFrameDirect | ( | class AudioSamples & | frame, |
size_t | streamIndex, | ||
OptionalErrorCode | ec = throws() |
||
) |
void av::FormatContext::writeUncodedFrameDirect | ( | class VideoFrame & | frame, |
size_t | streamIndex, | ||
OptionalErrorCode | ec = throws() |
||
) |
|
staticconstexpr |