AvTranscoder
0.9.4
C++APIforLibav/FFmpeg
|
Namespaces | |
constants | |
detail | |
json | |
Data Structures | |
class | AttachementProperties |
class | AudioCodec |
class | AudioDecoder |
class | AudioEncoder |
class | AudioFrame |
This class describes decoded audio data. More... | |
struct | AudioFrameDesc |
Description to create an audio frame. This corresponds to the number of samples, which corresponds to one video frame. More... | |
class | AudioGenerator |
class | AudioProperties |
class | AudioReader |
class | AudioStat |
Statistics related to an audio stream. More... | |
class | AudioTransform |
struct | Channel |
class | CodedData |
This class describes coded data. More... | |
class | ConsoleProgress |
Implementation of IProgress, to display a progress bar in console. More... | |
class | DataCodec |
class | DataProperties |
class | FileProperties |
class | Filter |
Describe a filter and its options. More... | |
class | FilterGraph |
Manager of filters. More... | |
class | FormatContext |
Wrapper of an AVFormatContext. More... | |
class | Frame |
This class describes decoded (raw) audio or video data. More... | |
class | ICodec |
class | IDecoder |
class | IEncoder |
class | IInputStream |
class | InputFile |
class | InputStream |
class | IOutputFile |
IOutputfile is the interface to wrap and write medias. It can be overloaded to integrate custom wrapper. More... | |
class | IOutputStream |
class | IProgress |
Base class of Progress. Inherit this class to have your own way to manage a progress bar. You can inherit this class in C++, but also in python / Java binding. More... | |
class | IReader |
Based class to read a stream. More... | |
class | ITransform |
class | Library |
class | Logger |
Logger class which contains static functions to use ffmpeg/libav log system. More... | |
class | NoDisplayProgress |
Implementation of IProgress, to manage cases when we need an IProgress but don't care of a progress bar. More... | |
class | Option |
Wrapper of AVOption. Get its type to know what the option is about: Int, Double, Ratio, Choice... Parse its array of options to get the potential childs (Choice and Group). More... | |
class | OutputFile |
Outputfile is the default implentation of wrapper which uses LibAV/FFMpeg. More... | |
class | OutputStream |
class | PixelProperties |
class | ProcessStat |
ProcessStat contains statistics given after the process. More... | |
class | ProfileLoader |
class | StreamProperties |
Virtual based class of properties for all types of stream. More... | |
class | StreamTranscoder |
class | SubtitleProperties |
class | Transcoder |
A Transcoder manages a list of streams, and process a transcode to create an output media file. More... | |
class | UnknownProperties |
class | VideoCodec |
class | VideoDecoder |
class | VideoEncoder |
class | VideoFrame |
This class describes decoded video data. More... | |
struct | VideoFrameDesc |
Description to create a video frame. More... | |
class | VideoGenerator |
class | VideoProperties |
class | VideoReader |
class | VideoStat |
Statistics related to a video stream. More... | |
class | VideoTransform |
Typedefs | |
typedef AVRational | Rational |
typedef std::vector< Library > | Libraries |
typedef std::vector< Option > | OptionArray |
typedef std::map< std::string, Option > | OptionMap |
Key: option name / value: option. More... | |
typedef std::vector< std::pair < std::string, std::string > > | PropertyVector |
PropertyVector is a vector of pair, because the order of properties matters to us. More... | |
typedef std::map< std::string, std::string > | PropertyMap |
typedef std::map< std::string, OptionArray > | OptionArrayMap |
typedef std::map< std::string, std::string > | NamesMap |
Functions | |
void | preloadCodecsAndFormats () |
Register all the codecs and formats which are enabled at configuration time. More... | |
std::string | getDescriptionFromErrorCode (const int code) |
Get the string description corresponding to the error code provided by ffmpeg/libav. More... | |
std::ostream & | operator<< (std::ostream &flux, const InputFile &input) |
Libraries | getLibraries () |
std::vector< std::string > | getInputExtensions () |
std::vector< std::string > | getOutputExtensions () |
void | callbackToWriteInFile (void *ptr, int level, const char *fmt, va_list vl) |
void | loadOptions (OptionMap &outOptions, void *av_class, int req_flags) |
void | loadOptions (OptionArray &outOptions, void *av_class, int req_flags) |
std::ostream & | operator<< (std::ostream &os, const ProfileLoader::Profile &profile) |
void | split (std::vector< std::string > &splitString, const std::string &inputString, const std::string &splitChars) |
int | getFilesInDir (const std::string &dir, std::vector< std::string > &files) |
std::ostream & | operator<< (std::ostream &flux, const AttachementProperties &attachementProperties) |
std::ostream & | operator<< (std::ostream &flux, const AudioProperties &audioProperties) |
std::ostream & | operator<< (std::ostream &flux, const DataProperties &dataProperties) |
std::ostream & | operator<< (std::ostream &flux, const FileProperties &fileProperties) |
std::ostream & | operator<< (std::ostream &flux, const StreamProperties &streamProperties) |
std::ostream & | operator<< (std::ostream &flux, const SubtitleProperties &subtitleProperties) |
std::ostream & | operator<< (std::ostream &flux, const UnknownProperties &unknownProperties) |
std::ostream & | operator<< (std::ostream &flux, const VideoProperties &videoProperties) |
std::vector< std::string > | getSupportedPixelFormats (const std::string &videoCodecName="") |
Get pixel format supported by a video codec. More... | |
std::vector< std::string > | getSupportedSampleFormats (const std::string &audioCodecName="") |
Get sample format supported by an audio codec. More... | |
AVPixelFormat | getAVPixelFormat (const std::string &pixelFormat) |
Get the corresponding AVPixelFormat from the pixel format name. More... | |
AVSampleFormat | getAVSampleFormat (const std::string &sampleFormat) |
Get the corresponding AVSampleFormat from the sample format name. More... | |
std::string | getPixelFormatName (const AVPixelFormat pixelFormat) |
std::string | getSampleFormatName (const AVSampleFormat sampleFormat) |
std::vector< AVOutputFormat * > | getAvailableFormats () |
NamesMap | getAvailableFormatsNames () |
Get a map of short/long names of all formats available in FFmpeg / libav. More... | |
NamesMap | getAvailableVideoFormatsNames () |
Get a map of short/long names of all formats dedicate for video available in FFmpeg / libav. More... | |
NamesMap | getAvailableAudioFormatsNames () |
Get a map of short/long names of all formats dedicate for video available in FFmpeg / libav. More... | |
std::vector< AVCodec * > | getAvailableCodecs () |
NamesMap | getAvailableVideoCodecsNames () |
Get a map of short/long names of all video codecs available in FFmpeg / libav. More... | |
NamesMap | getAvailableAudioCodecsNames () |
Get a map of short/long names of all audio codecs available in FFmpeg / libav. More... | |
OptionArrayMap | getAvailableOptionsPerOutputFormat () |
Get the list of options for each output format. More... | |
OptionArrayMap | getAvailableOptionsPerVideoCodec () |
Get the list of options for each video codec. More... | |
OptionArrayMap | getAvailableOptionsPerAudioCodec () |
Get the list of options for each audio codec. More... | |
typedef std::vector<Library> avtranscoder::Libraries |
Definition at line 36 of file Library.hpp.
typedef std::map<std::string, std::string> avtranscoder::NamesMap |
typedef std::vector<Option> avtranscoder::OptionArray |
Definition at line 118 of file Option.hpp.
typedef std::map<std::string, OptionArray> avtranscoder::OptionArrayMap |
typedef std::map<std::string, Option> avtranscoder::OptionMap |
Key: option name / value: option.
Definition at line 119 of file Option.hpp.
typedef std::map<std::string, std::string> avtranscoder::PropertyMap |
typedef std::vector<std::pair<std::string, std::string> > avtranscoder::PropertyVector |
typedef AVRational avtranscoder::Rational |
Definition at line 55 of file common.hpp.
Define if a codec is for encoding or decoding.
Enumerator | |
---|---|
eCodecTypeEncoder | |
eCodecTypeDecoder |
Definition at line 19 of file ICodec.hpp.
Definition at line 20 of file PixelProperties.hpp.
Indicate the state of a process.
Enumerator | |
---|---|
eJobStatusContinue | |
eJobStatusCancel |
Definition at line 12 of file IProgress.hpp.
Definition at line 18 of file Option.hpp.
Enum to set a policy of how we manage the process in case of several streams. eProcessMethodShortest: stop the process at the end of the shortest stream. eProcessMethodLongest: stop the process at the end of the longest stream. eProcessMethodBasedOnStream: stop the process at the end of an indicated stream (.
Enumerator | |
---|---|
eProcessMethodShortest | |
eProcessMethodLongest | |
eProcessMethodBasedOnStream | |
eProcessMethodBasedOnDuration | |
eProcessMethodInfinity |
Definition at line 29 of file Transcoder.hpp.
Enumerator | |
---|---|
eSubsamplingNone | |
eSubsampling440 | |
eSubsampling422 | |
eSubsampling420 | |
eSubsampling411 | |
eSubsampling410 |
Definition at line 29 of file PixelProperties.hpp.
void avtranscoder::callbackToWriteInFile | ( | void * | ptr, |
int | level, | ||
const char * | fmt, | ||
va_list | vl | ||
) |
Definition at line 8 of file log.cpp.
References LOG_FILE.
Referenced by avtranscoder::Logger::logInFile().
NamesMap AvExport avtranscoder::getAvailableAudioCodecsNames | ( | ) |
Get a map of short/long names of all audio codecs available in FFmpeg / libav.
Definition at line 199 of file util.cpp.
References getAvailableCodecs().
NamesMap AvExport avtranscoder::getAvailableAudioFormatsNames | ( | ) |
Get a map of short/long names of all formats dedicate for video available in FFmpeg / libav.
Definition at line 154 of file util.cpp.
References AV_CODEC_ID_NONE, and getAvailableFormats().
std::vector< AVCodec * > avtranscoder::getAvailableCodecs | ( | ) |
Definition at line 169 of file util.cpp.
Referenced by getAvailableAudioCodecsNames(), and getAvailableVideoCodecsNames().
std::vector< AVOutputFormat * > avtranscoder::getAvailableFormats | ( | ) |
Definition at line 112 of file util.cpp.
Referenced by getAvailableAudioFormatsNames(), getAvailableFormatsNames(), and getAvailableVideoFormatsNames().
NamesMap AvExport avtranscoder::getAvailableFormatsNames | ( | ) |
Get a map of short/long names of all formats available in FFmpeg / libav.
Definition at line 127 of file util.cpp.
References getAvailableFormats().
OptionArrayMap AvExport avtranscoder::getAvailableOptionsPerAudioCodec | ( | ) |
Get the list of options for each audio codec.
Definition at line 266 of file util.cpp.
References loadOptions().
OptionArrayMap AvExport avtranscoder::getAvailableOptionsPerOutputFormat | ( | ) |
Get the list of options for each output format.
Definition at line 214 of file util.cpp.
References loadOptions().
OptionArrayMap AvExport avtranscoder::getAvailableOptionsPerVideoCodec | ( | ) |
Get the list of options for each video codec.
Definition at line 238 of file util.cpp.
References loadOptions().
NamesMap AvExport avtranscoder::getAvailableVideoCodecsNames | ( | ) |
Get a map of short/long names of all video codecs available in FFmpeg / libav.
Definition at line 184 of file util.cpp.
References getAvailableCodecs().
NamesMap AvExport avtranscoder::getAvailableVideoFormatsNames | ( | ) |
Get a map of short/long names of all formats dedicate for video available in FFmpeg / libav.
Definition at line 139 of file util.cpp.
References AV_CODEC_ID_NONE, and getAvailableFormats().
AVPixelFormat AvExport avtranscoder::getAVPixelFormat | ( | const std::string & | pixelFormat | ) |
Get the corresponding AVPixelFormat from the pixel format name.
pixelFormat | the name of the pixel format |
Definition at line 90 of file util.cpp.
Referenced by avtranscoder::VideoGenerator::decodeNextFrame(), and avtranscoder::VideoFrameDesc::setParameters().
AVSampleFormat AvExport avtranscoder::getAVSampleFormat | ( | const std::string & | sampleFormat | ) |
Get the corresponding AVSampleFormat from the sample format name.
sampleFormat | the name of the sample format |
Definition at line 95 of file util.cpp.
Referenced by avtranscoder::AudioFrameDesc::setParameters(), and avtranscoder::AudioReader::updateOutput().
std::string AvExport avtranscoder::getDescriptionFromErrorCode | ( | const int | code | ) |
Get the string description corresponding to the error code provided by ffmpeg/libav.
Definition at line 22 of file common.cpp.
References AV_ERROR_MAX_STRING_SIZE.
Referenced by avtranscoder::FormatContext::addMetaData(), avtranscoder::AudioFrame::assign(), avtranscoder::VideoFrame::assign(), avtranscoder::Option::checkFFmpegGetOption(), avtranscoder::Option::checkFFmpegSetOption(), avtranscoder::FormatContext::closeRessource(), avtranscoder::Frame::copyData(), avtranscoder::AudioDecoder::decodeNextFrame(), avtranscoder::VideoDecoder::decodeNextFrame(), avtranscoder::AudioEncoder::encode(), avtranscoder::VideoEncoder::encode(), avtranscoder::FormatContext::findStreamInfo(), avtranscoder::FormatContext::FormatContext(), avtranscoder::FilterGraph::init(), avtranscoder::ICodec::openCodec(), avtranscoder::FormatContext::openRessource(), avtranscoder::FilterGraph::process(), avtranscoder::FilterGraph::pushFilter(), avtranscoder::InputFile::readNextPacket(), avtranscoder::Frame::refFrame(), avtranscoder::FormatContext::seek(), avtranscoder::FormatContext::writeFrame(), avtranscoder::FormatContext::writeHeader(), and avtranscoder::FormatContext::writeTrailer().
int avtranscoder::getFilesInDir | ( | const std::string & | dir, |
std::vector< std::string > & | files | ||
) |
Definition at line 47 of file util.hpp.
Referenced by avtranscoder::ProfileLoader::loadProfiles().
std::vector< std::string > AvExport avtranscoder::getInputExtensions | ( | ) |
Definition at line 105 of file Library.cpp.
Referenced by main().
Libraries AvExport avtranscoder::getLibraries | ( | ) |
Definition at line 78 of file Library.cpp.
References AVTRANSCODER_VERSION_MAJOR, AVTRANSCODER_VERSION_MICRO, and AVTRANSCODER_VERSION_MINOR.
Referenced by main().
std::vector< std::string > AvExport avtranscoder::getOutputExtensions | ( | ) |
Definition at line 143 of file Library.cpp.
Referenced by main().
std::string AvExport avtranscoder::getPixelFormatName | ( | const AVPixelFormat | pixelFormat | ) |
Definition at line 100 of file util.cpp.
Referenced by avtranscoder::FilterGraph::pushInBuffer().
std::string AvExport avtranscoder::getSampleFormatName | ( | const AVSampleFormat | sampleFormat | ) |
Definition at line 106 of file util.cpp.
Referenced by avtranscoder::AudioFrame::allocateAVSample(), avtranscoder::AudioGenerator::decodeNextFrame(), avtranscoder::AudioTransform::init(), and avtranscoder::FilterGraph::pushInBuffer().
std::vector< std::string > AvExport avtranscoder::getSupportedPixelFormats | ( | const std::string & | videoCodecName = "" | ) |
std::vector< std::string > AvExport avtranscoder::getSupportedSampleFormats | ( | const std::string & | audioCodecName = "" | ) |
void AvExport avtranscoder::loadOptions | ( | OptionMap & | outOptions, |
void * | av_class, | ||
int | req_flags = 0 |
||
) |
outOptions | map or array of options |
av_class | a libav context (could be an AVFormatContext or an AVCodecContext). |
req_flags | libav flag (AV_OPT_FLAG_XXX), which is a filter for AVOption loaded by the Context (default = 0: no flag restriction). |
Definition at line 227 of file Option.cpp.
References avtranscoder::Option::appendChild(), eOptionBaseTypeChild, eOptionBaseTypeChoice, avtranscoder::Option::getChilds(), avtranscoder::Option::getDefaultInt(), avtranscoder::Option::getName(), avtranscoder::Option::getType(), avtranscoder::Option::getUnit(), LOG_WARN, and avtranscoder::Option::setDefaultChildIndex().
Referenced by avtranscoder::FormatContext::FormatContext(), getAvailableOptionsPerAudioCodec(), getAvailableOptionsPerOutputFormat(), getAvailableOptionsPerVideoCodec(), avtranscoder::ICodec::loadCodecOptions(), loadOptions(), and avtranscoder::FormatContext::writeHeader().
void AvExport avtranscoder::loadOptions | ( | OptionArray & | outOptions, |
void * | av_class, | ||
int | req_flags | ||
) |
Definition at line 295 of file Option.cpp.
References loadOptions().
AvExport std::ostream & avtranscoder::operator<< | ( | std::ostream & | flux, |
const SubtitleProperties & | subtitleProperties | ||
) |
Definition at line 8 of file SubtitleProperties.cpp.
References avtranscoder::StreamProperties::asVector(), avtranscoder::detail::keyWidth, and avtranscoder::detail::separator.
AvExport std::ostream & avtranscoder::operator<< | ( | std::ostream & | flux, |
const AttachementProperties & | attachementProperties | ||
) |
Definition at line 8 of file AttachementProperties.cpp.
References avtranscoder::StreamProperties::asVector(), avtranscoder::detail::keyWidth, and avtranscoder::detail::separator.
AvExport std::ostream & avtranscoder::operator<< | ( | std::ostream & | flux, |
const UnknownProperties & | unknownProperties | ||
) |
Definition at line 8 of file UnknownProperties.cpp.
References avtranscoder::StreamProperties::asVector(), avtranscoder::detail::keyWidth, and avtranscoder::detail::separator.
AvExport std::ostream & avtranscoder::operator<< | ( | std::ostream & | flux, |
const DataProperties & | dataProperties | ||
) |
Definition at line 83 of file DataProperties.cpp.
References avtranscoder::StreamProperties::asVector(), avtranscoder::detail::keyWidth, and avtranscoder::detail::separator.
AvExport std::ostream & avtranscoder::operator<< | ( | std::ostream & | flux, |
const StreamProperties & | streamProperties | ||
) |
Definition at line 147 of file StreamProperties.cpp.
References avtranscoder::StreamProperties::asVector(), avtranscoder::detail::keyWidth, and avtranscoder::detail::separator.
AvExport std::ostream & avtranscoder::operator<< | ( | std::ostream & | flux, |
const InputFile & | input | ||
) |
Definition at line 171 of file InputFile.cpp.
References avtranscoder::FileProperties::getAttachementProperties(), avtranscoder::FileProperties::getAudioProperties(), avtranscoder::FileProperties::getDataProperties(), avtranscoder::FileProperties::getNbAttachementStreams(), avtranscoder::FileProperties::getNbAudioStreams(), avtranscoder::FileProperties::getNbDataStreams(), avtranscoder::FileProperties::getNbSubtitleStreams(), avtranscoder::FileProperties::getNbUnknownStreams(), avtranscoder::FileProperties::getNbVideoStreams(), avtranscoder::InputFile::getProperties(), avtranscoder::FileProperties::getSubtitleProperties(), avtranscoder::FileProperties::getUnknownProperties(), and avtranscoder::FileProperties::getVideoProperties().
AvExport std::ostream & avtranscoder::operator<< | ( | std::ostream & | flux, |
const AudioProperties & | audioProperties | ||
) |
Definition at line 173 of file AudioProperties.cpp.
References avtranscoder::StreamProperties::asVector(), avtranscoder::detail::keyWidth, and avtranscoder::detail::separator.
std::ostream & avtranscoder::operator<< | ( | std::ostream & | os, |
const ProfileLoader::Profile & | profile | ||
) |
Definition at line 222 of file ProfileLoader.cpp.
AvExport std::ostream & avtranscoder::operator<< | ( | std::ostream & | flux, |
const FileProperties & | fileProperties | ||
) |
Definition at line 374 of file FileProperties.cpp.
References avtranscoder::FileProperties::asVector(), avtranscoder::detail::keyWidth, and avtranscoder::detail::separator.
std::ostream& avtranscoder::operator<< | ( | std::ostream & | flux, |
const VideoProperties & | videoProperties | ||
) |
Definition at line 602 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::asVector(), avtranscoder::detail::keyWidth, and avtranscoder::detail::separator.
void AvExport avtranscoder::preloadCodecsAndFormats | ( | ) |
Register all the codecs and formats which are enabled at configuration time.
Definition at line 16 of file common.cpp.
Referenced by main().
void avtranscoder::split | ( | std::vector< std::string > & | splitString, |
const std::string & | inputString, | ||
const std::string & | splitChars | ||
) |
Definition at line 37 of file util.hpp.
Referenced by avtranscoder::ProfileLoader::loadProfile(), and avtranscoder::ProfileLoader::loadProfiles().