void FormatContext::setFormat(const OutputFormat &format) { if (isOpened()) { cerr << "Can't set format for opened container\n"; return; } m_raw->oformat = const_cast<AVOutputFormat*>(format.raw()); m_raw->iformat = nullptr; }
Codec guessEncodingCodec(OutputFormat format, const char *name, const char *url, const char *mime, AVMediaType mediaType) { auto id = av_guess_codec(format.raw(), name, url, mime, mediaType); return findEncodingCodec(id); }