4 #include <libavutil/version.h>
5 #include <libavcodec/version.h>
6 #include <libswscale/version.h>
7 #include <libswscale/swscale.h>
8 #include <libavfilter/version.h>
9 #ifdef AVTRANSCODER_LIBAV_DEPENDENCY
10 #include <libavresample/version.h>
12 #include <libswresample/version.h>
14 #include <libavformat/avformat.h>
15 #include <libavfilter/avfilter.h>
25 Library::Library(
const std::string& name,
const std::string& license,
const size_t major,
const size_t minor,
42 std::vector<size_t> version;
51 std::stringstream version;
85 Library(
"avutil", avutil_license(), LIBAVUTIL_VERSION_MAJOR, LIBAVUTIL_VERSION_MINOR, LIBAVUTIL_VERSION_MICRO));
86 libs.push_back(
Library(
"avformat", avformat_license(), LIBAVFORMAT_VERSION_MAJOR, LIBAVFORMAT_VERSION_MINOR,
87 LIBAVFORMAT_VERSION_MICRO));
89 Library(
"avcodec", avcodec_license(), LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO));
90 #ifdef AVTRANSCODER_LIBAV_DEPENDENCY
91 libs.push_back(
Library(
"avresample", avutil_license(), LIBAVRESAMPLE_VERSION_MAJOR, LIBAVRESAMPLE_VERSION_MINOR,
92 LIBAVRESAMPLE_VERSION_MICRO));
94 libs.push_back(
Library(
"swresample", avutil_license(), LIBSWRESAMPLE_VERSION_MAJOR, LIBSWRESAMPLE_VERSION_MINOR,
95 LIBSWRESAMPLE_VERSION_MICRO));
98 Library(
"swscale", swscale_license(), LIBSWSCALE_VERSION_MAJOR, LIBSWSCALE_VERSION_MINOR, LIBSWSCALE_VERSION_MICRO));
99 libs.push_back(
Library(
"avfilter", avfilter_license(), LIBAVFILTER_VERSION_MAJOR, LIBAVFILTER_VERSION_MINOR,
100 LIBAVFILTER_VERSION_MICRO));
107 std::vector<std::string> extensions;
108 AVInputFormat* iFormat = NULL;
110 while((iFormat = av_iformat_next(iFormat)))
112 if(iFormat->extensions != NULL)
115 std::string exts = std::string(iFormat->extensions);
116 char* ext = strtok(const_cast<char*>(exts.c_str()),
",");
119 extensions.push_back(std::string(ext));
120 ext = strtok(NULL,
",");
125 exts = std::string(iFormat->name);
126 ext = strtok(const_cast<char*>(exts.c_str()),
",");
129 extensions.push_back(std::string(ext));
130 ext = strtok(NULL,
",");
135 std::sort(extensions.begin(), extensions.end());
137 std::vector<std::string>::iterator last = std::unique(extensions.begin(), extensions.end());
138 extensions.erase(last, extensions.end());
145 std::vector<std::string> extensions;
146 AVOutputFormat* oFormat = NULL;
148 while((oFormat = av_oformat_next(oFormat)))
150 if(oFormat->extensions != NULL)
153 std::string exts = std::string(oFormat->extensions);
154 char* ext = strtok(const_cast<char*>(exts.c_str()),
",");
157 extensions.push_back(std::string(ext));
158 ext = strtok(NULL,
",");
163 exts = std::string(oFormat->name);
164 ext = strtok(const_cast<char*>(exts.c_str()),
",");
167 extensions.push_back(std::string(ext));
168 ext = strtok(NULL,
",");
173 std::sort(extensions.begin(), extensions.end());
175 std::vector<std::string>::iterator last = std::unique(extensions.begin(), extensions.end());
176 extensions.erase(last, extensions.end());
std::vector< size_t > getVersion()
#define AVTRANSCODER_VERSION_MICRO
#define AVTRANSCODER_VERSION_MINOR
size_t getReleaseVersion()
std::vector< std::string > getOutputExtensions()
std::vector< Library > Libraries
#define AVTRANSCODER_VERSION_MAJOR
std::string getStringVersion()
Library(const std::string &name, const std::string &license, const size_t major, const size_t minor, const size_t release)
std::vector< std::string > getInputExtensions()