update argument list types in linux api
This commit is contained in:
parent
ae01db54bc
commit
b7eba6d709
|
@ -33,8 +33,8 @@ static std::atomic<long> sessionIdGenerator(1);
|
|||
|
||||
extern void addSessionToSessionHistory(const std::shared_ptr<ffmpegkit::Session> session);
|
||||
|
||||
ffmpegkit::AbstractSession::AbstractSession(const std::shared_ptr<std::list<std::string>> arguments, const ffmpegkit::LogCallback logCallback, const LogRedirectionStrategy logRedirectionStrategy) :
|
||||
_arguments{arguments},
|
||||
ffmpegkit::AbstractSession::AbstractSession(const std::list<std::string>& arguments, const ffmpegkit::LogCallback logCallback, const LogRedirectionStrategy logRedirectionStrategy) :
|
||||
_arguments{std::make_shared<std::list<std::string>>(arguments)},
|
||||
_sessionId{sessionIdGenerator++},
|
||||
_logCallback{logCallback},
|
||||
_createTime{std::chrono::system_clock::now()},
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace ffmpegkit {
|
|||
* @param logCallback session specific log callback
|
||||
* @param logRedirectionStrategy session specific log redirection strategy
|
||||
*/
|
||||
AbstractSession(const std::shared_ptr<std::list<std::string>> arguments, const ffmpegkit::LogCallback logCallback, const LogRedirectionStrategy logRedirectionStrategy);
|
||||
AbstractSession(const std::list<std::string>& arguments, const ffmpegkit::LogCallback logCallback, const LogRedirectionStrategy logRedirectionStrategy);
|
||||
|
||||
/**
|
||||
* Waits for all asynchronous messages to be transmitted until the given timeout.
|
||||
|
|
|
@ -29,19 +29,19 @@ extern void* ffmpegKitInitialize();
|
|||
|
||||
const void* _ffmpegKitInitializeri{ffmpegKitInitialize()};
|
||||
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> ffmpegkit::FFmpegKit::executeWithArguments(const std::shared_ptr<std::list<std::string>> arguments) {
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> ffmpegkit::FFmpegKit::executeWithArguments(const std::list<std::string>& arguments) {
|
||||
auto session = ffmpegkit::FFmpegSession::create(arguments);
|
||||
ffmpegkit::FFmpegKitConfig::ffmpegExecute(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> ffmpegkit::FFmpegKit::executeWithArgumentsAsync(const std::shared_ptr<std::list<std::string>> arguments, FFmpegSessionCompleteCallback completeCallback) {
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> ffmpegkit::FFmpegKit::executeWithArgumentsAsync(const std::list<std::string>& arguments, FFmpegSessionCompleteCallback completeCallback) {
|
||||
auto session = ffmpegkit::FFmpegSession::create(arguments, completeCallback);
|
||||
ffmpegkit::FFmpegKitConfig::asyncFFmpegExecute(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> ffmpegkit::FFmpegKit::executeWithArgumentsAsync(const std::shared_ptr<std::list<std::string>> arguments, FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback) {
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> ffmpegkit::FFmpegKit::executeWithArgumentsAsync(const std::list<std::string>& arguments, FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback) {
|
||||
auto session = ffmpegkit::FFmpegSession::create(arguments, completeCallback, logCallback, statisticsCallback);
|
||||
ffmpegkit::FFmpegKitConfig::asyncFFmpegExecute(session);
|
||||
return session;
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace ffmpegkit {
|
|||
* @param arguments FFmpeg command options/arguments as string list
|
||||
* @return FFmpeg session created for this execution
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::FFmpegSession> executeWithArguments(const std::shared_ptr<std::list<std::string>> arguments);
|
||||
static std::shared_ptr<ffmpegkit::FFmpegSession> executeWithArguments(const std::list<std::string>& arguments);
|
||||
|
||||
/**
|
||||
* <p>Starts an asynchronous FFmpeg execution with arguments provided.
|
||||
|
@ -62,7 +62,7 @@ namespace ffmpegkit {
|
|||
* @param completeCallback callback that will be called when the execution has completed
|
||||
* @return FFmpeg session created for this execution
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::FFmpegSession> executeWithArgumentsAsync(const std::shared_ptr<std::list<std::string>> arguments, FFmpegSessionCompleteCallback completeCallback);
|
||||
static std::shared_ptr<ffmpegkit::FFmpegSession> executeWithArgumentsAsync(const std::list<std::string>& arguments, FFmpegSessionCompleteCallback completeCallback);
|
||||
|
||||
/**
|
||||
* <p>Starts an asynchronous FFmpeg execution with arguments provided.
|
||||
|
@ -76,7 +76,7 @@ namespace ffmpegkit {
|
|||
* @param statisticsCallback callback that will receive statistics
|
||||
* @return FFmpeg session created for this execution
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::FFmpegSession> executeWithArgumentsAsync(const std::shared_ptr<std::list<std::string>> arguments, FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback);
|
||||
static std::shared_ptr<ffmpegkit::FFmpegSession> executeWithArgumentsAsync(const std::list<std::string>& arguments, FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback);
|
||||
|
||||
/**
|
||||
* <p>Synchronously executes FFmpeg command provided. Space character is used to split command
|
||||
|
|
|
@ -1350,8 +1350,8 @@ std::string ffmpegkit::FFmpegKitConfig::sessionStateToString(SessionState state)
|
|||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<std::list<std::string>> ffmpegkit::FFmpegKitConfig::parseArguments(const std::string& command) {
|
||||
auto argumentList = std::make_shared<std::list<std::string>>();
|
||||
std::list<std::string> ffmpegkit::FFmpegKitConfig::parseArguments(const std::string& command) {
|
||||
std::list<std::string> argumentList;
|
||||
std::string currentArgument;
|
||||
|
||||
bool singleQuoteStarted = false;
|
||||
|
@ -1370,7 +1370,7 @@ std::shared_ptr<std::list<std::string>> ffmpegkit::FFmpegKitConfig::parseArgumen
|
|||
if (singleQuoteStarted || doubleQuoteStarted) {
|
||||
currentArgument += currentChar;
|
||||
} else if (currentArgument.size() > 0) {
|
||||
argumentList->push_back(currentArgument);
|
||||
argumentList.push_back(currentArgument);
|
||||
currentArgument = "";
|
||||
}
|
||||
} else if (currentChar == '\'' && (previousChar == 0 || previousChar != '\\')) {
|
||||
|
@ -1395,7 +1395,7 @@ std::shared_ptr<std::list<std::string>> ffmpegkit::FFmpegKitConfig::parseArgumen
|
|||
}
|
||||
|
||||
if (currentArgument.size() > 0) {
|
||||
argumentList->push_back(currentArgument);
|
||||
argumentList.push_back(currentArgument);
|
||||
}
|
||||
|
||||
return argumentList;
|
||||
|
|
|
@ -414,7 +414,7 @@ namespace ffmpegkit {
|
|||
* @param command string command
|
||||
* @return list of arguments
|
||||
*/
|
||||
static std::shared_ptr<std::list<std::string>> parseArguments(const std::string& command);
|
||||
static std::list<std::string> parseArguments(const std::string& command);
|
||||
|
||||
/**
|
||||
* <p>Concatenates arguments into a string adding a space character between two arguments.
|
||||
|
|
|
@ -24,37 +24,37 @@
|
|||
|
||||
extern void addSessionToSessionHistory(const std::shared_ptr<ffmpegkit::Session> session);
|
||||
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> ffmpegkit::FFmpegSession::create(const std::shared_ptr<std::list<std::string>> arguments) {
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> ffmpegkit::FFmpegSession::create(const std::list<std::string>& arguments) {
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> session = std::static_pointer_cast<ffmpegkit::FFmpegSession>(std::make_shared<ffmpegkit::FFmpegSession::PublicFFmpegSession>(arguments, nullptr, nullptr, nullptr, ffmpegkit::FFmpegKitConfig::getLogRedirectionStrategy()));
|
||||
addSessionToSessionHistory(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> ffmpegkit::FFmpegSession::create(const std::shared_ptr<std::list<std::string>> arguments, FFmpegSessionCompleteCallback completeCallback) {
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> ffmpegkit::FFmpegSession::create(const std::list<std::string>& arguments, FFmpegSessionCompleteCallback completeCallback) {
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> session = std::static_pointer_cast<ffmpegkit::FFmpegSession>(std::make_shared<ffmpegkit::FFmpegSession::PublicFFmpegSession>(arguments, completeCallback, nullptr, nullptr, ffmpegkit::FFmpegKitConfig::getLogRedirectionStrategy()));
|
||||
addSessionToSessionHistory(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> ffmpegkit::FFmpegSession::create(const std::shared_ptr<std::list<std::string>> arguments, FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback) {
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> ffmpegkit::FFmpegSession::create(const std::list<std::string>& arguments, FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback) {
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> session = std::static_pointer_cast<ffmpegkit::FFmpegSession>(std::make_shared<ffmpegkit::FFmpegSession::PublicFFmpegSession>(arguments, completeCallback, logCallback, statisticsCallback, ffmpegkit::FFmpegKitConfig::getLogRedirectionStrategy()));
|
||||
addSessionToSessionHistory(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> ffmpegkit::FFmpegSession::create(const std::shared_ptr<std::list<std::string>> arguments, FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback, LogRedirectionStrategy logRedirectionStrategy) {
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> ffmpegkit::FFmpegSession::create(const std::list<std::string>& arguments, FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback, LogRedirectionStrategy logRedirectionStrategy) {
|
||||
std::shared_ptr<ffmpegkit::FFmpegSession> session = std::static_pointer_cast<ffmpegkit::FFmpegSession>(std::make_shared<ffmpegkit::FFmpegSession::PublicFFmpegSession>(arguments, completeCallback, logCallback, statisticsCallback, logRedirectionStrategy));
|
||||
addSessionToSessionHistory(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
struct ffmpegkit::FFmpegSession::PublicFFmpegSession : public ffmpegkit::FFmpegSession {
|
||||
PublicFFmpegSession(const std::shared_ptr<std::list<std::string>> arguments, FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback, LogRedirectionStrategy logRedirectionStrategy) :
|
||||
PublicFFmpegSession(const std::list<std::string>& arguments, FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback, LogRedirectionStrategy logRedirectionStrategy) :
|
||||
FFmpegSession(arguments, completeCallback, logCallback, statisticsCallback, logRedirectionStrategy) {
|
||||
}
|
||||
};
|
||||
|
||||
ffmpegkit::FFmpegSession::FFmpegSession(const std::shared_ptr<std::list<std::string>> arguments, FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback, LogRedirectionStrategy logRedirectionStrategy) :
|
||||
ffmpegkit::FFmpegSession::FFmpegSession(const std::list<std::string>& arguments, FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback, LogRedirectionStrategy logRedirectionStrategy) :
|
||||
ffmpegkit::AbstractSession(arguments, logCallback, logRedirectionStrategy), _completeCallback{completeCallback}, _statisticsCallback{statisticsCallback}, _statistics{std::make_shared<std::list<std::shared_ptr<ffmpegkit::Statistics>>>()} {
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace ffmpegkit {
|
|||
*
|
||||
* @param arguments command arguments
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::FFmpegSession> create(const std::shared_ptr<std::list<std::string>> arguments);
|
||||
static std::shared_ptr<ffmpegkit::FFmpegSession> create(const std::list<std::string>& arguments);
|
||||
|
||||
/**
|
||||
* Builds a new FFmpeg session.
|
||||
|
@ -45,7 +45,7 @@ namespace ffmpegkit {
|
|||
* @param arguments command arguments
|
||||
* @param completeCallback session specific complete callback
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::FFmpegSession> create(const std::shared_ptr<std::list<std::string>> arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback);
|
||||
static std::shared_ptr<ffmpegkit::FFmpegSession> create(const std::list<std::string>& arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback);
|
||||
|
||||
/**
|
||||
* Builds a new FFmpeg session.
|
||||
|
@ -55,7 +55,7 @@ namespace ffmpegkit {
|
|||
* @param logCallback session specific log callback
|
||||
* @param statisticsCallback session specific statistics callback
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::FFmpegSession> create(const std::shared_ptr<std::list<std::string>> arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback);
|
||||
static std::shared_ptr<ffmpegkit::FFmpegSession> create(const std::list<std::string>& arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback);
|
||||
|
||||
/**
|
||||
* Builds a new FFmpeg session.
|
||||
|
@ -66,7 +66,7 @@ namespace ffmpegkit {
|
|||
* @param statisticsCallback session specific statistics callback
|
||||
* @param logRedirectionStrategy session specific log redirection strategy
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::FFmpegSession> create(const std::shared_ptr<std::list<std::string>> arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback, ffmpegkit::LogRedirectionStrategy logRedirectionStrategy);
|
||||
static std::shared_ptr<ffmpegkit::FFmpegSession> create(const std::list<std::string>& arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback, ffmpegkit::LogRedirectionStrategy logRedirectionStrategy);
|
||||
|
||||
/**
|
||||
* Returns the session specific statistics callback.
|
||||
|
@ -159,7 +159,7 @@ namespace ffmpegkit {
|
|||
* @param statisticsCallback session specific statistics callback
|
||||
* @param logRedirectionStrategy session specific log redirection strategy
|
||||
*/
|
||||
FFmpegSession(const std::shared_ptr<std::list<std::string>> arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback, ffmpegkit::LogRedirectionStrategy logRedirectionStrategy);
|
||||
FFmpegSession(const std::list<std::string>& arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback, ffmpegkit::LogRedirectionStrategy logRedirectionStrategy);
|
||||
|
||||
ffmpegkit::StatisticsCallback _statisticsCallback;
|
||||
FFmpegSessionCompleteCallback _completeCallback;
|
||||
|
|
|
@ -26,34 +26,23 @@ extern void* ffmpegKitInitialize();
|
|||
|
||||
const void* _ffprobeKitInitializer{ffmpegKitInitialize()};
|
||||
|
||||
static std::shared_ptr<std::list<std::string>> defaultGetMediaInformationCommandArguments(const std::string& path) {
|
||||
std::shared_ptr<std::list<std::string>> arguments = std::make_shared<std::list<std::string>>();
|
||||
arguments->push_back(std::string("-v"));
|
||||
arguments->push_back(std::string("error"));
|
||||
arguments->push_back(std::string("-hide_banner"));
|
||||
arguments->push_back(std::string("-print_format"));
|
||||
arguments->push_back(std::string("json"));
|
||||
arguments->push_back(std::string("-show_format"));
|
||||
arguments->push_back(std::string("-show_streams"));
|
||||
arguments->push_back(std::string("-show_chapters"));
|
||||
arguments->push_back(std::string("-i"));
|
||||
arguments->push_back(path);
|
||||
return arguments;
|
||||
static std::list<std::string> defaultGetMediaInformationCommandArguments(const std::string& path) {
|
||||
return std::list<std::string>{"-v", "error", "-hide_banner", "-print_format", "json", "-show_format", "-show_streams", "-show_chapters", "-i", path};
|
||||
}
|
||||
|
||||
std::shared_ptr<ffmpegkit::FFprobeSession> ffmpegkit::FFprobeKit::executeWithArguments(const std::shared_ptr<std::list<std::string>> arguments) {
|
||||
std::shared_ptr<ffmpegkit::FFprobeSession> ffmpegkit::FFprobeKit::executeWithArguments(const std::list<std::string>& arguments) {
|
||||
auto session = ffmpegkit::FFprobeSession::create(arguments);
|
||||
ffmpegkit::FFmpegKitConfig::ffprobeExecute(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
std::shared_ptr<ffmpegkit::FFprobeSession> ffmpegkit::FFprobeKit::executeWithArgumentsAsync(const std::shared_ptr<std::list<std::string>> arguments, FFprobeSessionCompleteCallback completeCallback) {
|
||||
std::shared_ptr<ffmpegkit::FFprobeSession> ffmpegkit::FFprobeKit::executeWithArgumentsAsync(const std::list<std::string>& arguments, FFprobeSessionCompleteCallback completeCallback) {
|
||||
auto session = ffmpegkit::FFprobeSession::create(arguments, completeCallback);
|
||||
ffmpegkit::FFmpegKitConfig::asyncFFprobeExecute(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
std::shared_ptr<ffmpegkit::FFprobeSession> ffmpegkit::FFprobeKit::executeWithArgumentsAsync(const std::shared_ptr<std::list<std::string>> arguments, FFprobeSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback) {
|
||||
std::shared_ptr<ffmpegkit::FFprobeSession> ffmpegkit::FFprobeKit::executeWithArgumentsAsync(const std::list<std::string>& arguments, FFprobeSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback) {
|
||||
auto session = ffmpegkit::FFprobeSession::create(arguments, completeCallback, logCallback);
|
||||
ffmpegkit::FFmpegKitConfig::asyncFFprobeExecute(session);
|
||||
return session;
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace ffmpegkit {
|
|||
* @param arguments FFprobe command options/arguments as string array
|
||||
* @return FFprobe session created for this execution
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::FFprobeSession> executeWithArguments(const std::shared_ptr<std::list<std::string>> arguments);
|
||||
static std::shared_ptr<ffmpegkit::FFprobeSession> executeWithArguments(const std::list<std::string>& arguments);
|
||||
|
||||
/**
|
||||
* <p>Starts an asynchronous FFprobe execution with arguments provided.
|
||||
|
@ -66,7 +66,7 @@ namespace ffmpegkit {
|
|||
* @param completeCallback callback that will be called when the execution has completed
|
||||
* @return FFprobe session created for this execution
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::FFprobeSession> executeWithArgumentsAsync(const std::shared_ptr<std::list<std::string>> arguments, FFprobeSessionCompleteCallback completeCallback);
|
||||
static std::shared_ptr<ffmpegkit::FFprobeSession> executeWithArgumentsAsync(const std::list<std::string>& arguments, FFprobeSessionCompleteCallback completeCallback);
|
||||
|
||||
/**
|
||||
* <p>Starts an asynchronous FFprobe execution with arguments provided.
|
||||
|
@ -79,7 +79,7 @@ namespace ffmpegkit {
|
|||
* @param logCallback callback that will receive logs
|
||||
* @return FFprobe session created for this execution
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::FFprobeSession> executeWithArgumentsAsync(const std::shared_ptr<std::list<std::string>> arguments, FFprobeSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback);
|
||||
static std::shared_ptr<ffmpegkit::FFprobeSession> executeWithArgumentsAsync(const std::list<std::string>& arguments, FFprobeSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback);
|
||||
|
||||
/**
|
||||
* <p>Synchronously executes FFprobe command provided. Space character is used to split command
|
||||
|
|
|
@ -23,37 +23,37 @@
|
|||
|
||||
extern void addSessionToSessionHistory(const std::shared_ptr<ffmpegkit::Session> session);
|
||||
|
||||
std::shared_ptr<ffmpegkit::FFprobeSession> ffmpegkit::FFprobeSession::create(const std::shared_ptr<std::list<std::string>> arguments) {
|
||||
std::shared_ptr<ffmpegkit::FFprobeSession> ffmpegkit::FFprobeSession::create(const std::list<std::string>& arguments) {
|
||||
auto session = std::static_pointer_cast<ffmpegkit::FFprobeSession>(std::make_shared<ffmpegkit::FFprobeSession::PublicFFprobeSession>(arguments, nullptr, nullptr, ffmpegkit::FFmpegKitConfig::getLogRedirectionStrategy()));
|
||||
addSessionToSessionHistory(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
std::shared_ptr<ffmpegkit::FFprobeSession> ffmpegkit::FFprobeSession::create(const std::shared_ptr<std::list<std::string>> arguments, const FFprobeSessionCompleteCallback completeCallback) {
|
||||
std::shared_ptr<ffmpegkit::FFprobeSession> ffmpegkit::FFprobeSession::create(const std::list<std::string>& arguments, const FFprobeSessionCompleteCallback completeCallback) {
|
||||
auto session = std::static_pointer_cast<ffmpegkit::FFprobeSession>(std::make_shared<ffmpegkit::FFprobeSession::PublicFFprobeSession>(arguments, completeCallback, nullptr, ffmpegkit::FFmpegKitConfig::getLogRedirectionStrategy()));
|
||||
addSessionToSessionHistory(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
std::shared_ptr<ffmpegkit::FFprobeSession> ffmpegkit::FFprobeSession::create(const std::shared_ptr<std::list<std::string>> arguments, const FFprobeSessionCompleteCallback completeCallback, const ffmpegkit::LogCallback logCallback) {
|
||||
std::shared_ptr<ffmpegkit::FFprobeSession> ffmpegkit::FFprobeSession::create(const std::list<std::string>& arguments, const FFprobeSessionCompleteCallback completeCallback, const ffmpegkit::LogCallback logCallback) {
|
||||
auto session = std::static_pointer_cast<ffmpegkit::FFprobeSession>(std::make_shared<ffmpegkit::FFprobeSession::PublicFFprobeSession>(arguments, completeCallback, logCallback, ffmpegkit::FFmpegKitConfig::getLogRedirectionStrategy()));
|
||||
addSessionToSessionHistory(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
std::shared_ptr<ffmpegkit::FFprobeSession> ffmpegkit::FFprobeSession::create(const std::shared_ptr<std::list<std::string>> arguments, const FFprobeSessionCompleteCallback completeCallback, const ffmpegkit::LogCallback logCallback, const LogRedirectionStrategy logRedirectionStrategy) {
|
||||
std::shared_ptr<ffmpegkit::FFprobeSession> ffmpegkit::FFprobeSession::create(const std::list<std::string>& arguments, const FFprobeSessionCompleteCallback completeCallback, const ffmpegkit::LogCallback logCallback, const LogRedirectionStrategy logRedirectionStrategy) {
|
||||
auto session = std::static_pointer_cast<ffmpegkit::FFprobeSession>(std::make_shared<ffmpegkit::FFprobeSession::PublicFFprobeSession>(arguments, completeCallback, logCallback, logRedirectionStrategy));
|
||||
addSessionToSessionHistory(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
struct ffmpegkit::FFprobeSession::PublicFFprobeSession : public ffmpegkit::FFprobeSession {
|
||||
PublicFFprobeSession(const std::shared_ptr<std::list<std::string>> arguments, const FFprobeSessionCompleteCallback completeCallback, const ffmpegkit::LogCallback logCallback, const LogRedirectionStrategy logRedirectionStrategy) :
|
||||
PublicFFprobeSession(const std::list<std::string>& arguments, const FFprobeSessionCompleteCallback completeCallback, const ffmpegkit::LogCallback logCallback, const LogRedirectionStrategy logRedirectionStrategy) :
|
||||
FFprobeSession(arguments, completeCallback, logCallback, logRedirectionStrategy) {
|
||||
}
|
||||
};
|
||||
|
||||
ffmpegkit::FFprobeSession::FFprobeSession(const std::shared_ptr<std::list<std::string>> arguments, const FFprobeSessionCompleteCallback completeCallback, const ffmpegkit::LogCallback logCallback, const LogRedirectionStrategy logRedirectionStrategy) :
|
||||
ffmpegkit::FFprobeSession::FFprobeSession(const std::list<std::string>& arguments, const FFprobeSessionCompleteCallback completeCallback, const ffmpegkit::LogCallback logCallback, const LogRedirectionStrategy logRedirectionStrategy) :
|
||||
ffmpegkit::AbstractSession(arguments, logCallback, logRedirectionStrategy), _completeCallback{completeCallback} {
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace ffmpegkit {
|
|||
*
|
||||
* @param arguments command arguments
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::FFprobeSession> create(const std::shared_ptr<std::list<std::string>> arguments);
|
||||
static std::shared_ptr<ffmpegkit::FFprobeSession> create(const std::list<std::string>& arguments);
|
||||
|
||||
/**
|
||||
* Builds a new FFprobe session.
|
||||
|
@ -44,7 +44,7 @@ namespace ffmpegkit {
|
|||
* @param arguments command arguments
|
||||
* @param completeCallback session specific complete callback
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::FFprobeSession> create(const std::shared_ptr<std::list<std::string>> arguments, const FFprobeSessionCompleteCallback completeCallback);
|
||||
static std::shared_ptr<ffmpegkit::FFprobeSession> create(const std::list<std::string>& arguments, const FFprobeSessionCompleteCallback completeCallback);
|
||||
|
||||
/**
|
||||
* Builds a new FFprobe session.
|
||||
|
@ -53,7 +53,7 @@ namespace ffmpegkit {
|
|||
* @param completeCallback session specific complete callback
|
||||
* @param logCallback session specific log callback
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::FFprobeSession> create(const std::shared_ptr<std::list<std::string>> arguments, const FFprobeSessionCompleteCallback completeCallback, const ffmpegkit::LogCallback logCallback);
|
||||
static std::shared_ptr<ffmpegkit::FFprobeSession> create(const std::list<std::string>& arguments, const FFprobeSessionCompleteCallback completeCallback, const ffmpegkit::LogCallback logCallback);
|
||||
|
||||
/**
|
||||
* Builds a new FFprobe session.
|
||||
|
@ -63,7 +63,7 @@ namespace ffmpegkit {
|
|||
* @param logCallback session specific log callback
|
||||
* @param logRedirectionStrategy session specific log redirection strategy
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::FFprobeSession> create(const std::shared_ptr<std::list<std::string>> arguments, const FFprobeSessionCompleteCallback completeCallback, const ffmpegkit::LogCallback logCallback, const LogRedirectionStrategy logRedirectionStrategy);
|
||||
static std::shared_ptr<ffmpegkit::FFprobeSession> create(const std::list<std::string>& arguments, const FFprobeSessionCompleteCallback completeCallback, const ffmpegkit::LogCallback logCallback, const LogRedirectionStrategy logRedirectionStrategy);
|
||||
|
||||
/**
|
||||
* Returns the session specific complete callback.
|
||||
|
@ -105,7 +105,7 @@ namespace ffmpegkit {
|
|||
* @param logCallback session specific log callback
|
||||
* @param logRedirectionStrategy session specific log redirection strategy
|
||||
*/
|
||||
FFprobeSession(const std::shared_ptr<std::list<std::string>> arguments, const FFprobeSessionCompleteCallback completeCallback, const ffmpegkit::LogCallback logCallback, const LogRedirectionStrategy logRedirectionStrategy);
|
||||
FFprobeSession(const std::list<std::string>& arguments, const FFprobeSessionCompleteCallback completeCallback, const ffmpegkit::LogCallback logCallback, const LogRedirectionStrategy logRedirectionStrategy);
|
||||
|
||||
FFprobeSessionCompleteCallback _completeCallback;
|
||||
};
|
||||
|
|
|
@ -23,31 +23,31 @@
|
|||
|
||||
extern void addSessionToSessionHistory(const std::shared_ptr<ffmpegkit::Session> session);
|
||||
|
||||
std::shared_ptr<ffmpegkit::MediaInformationSession> ffmpegkit::MediaInformationSession::create(const std::shared_ptr<std::list<std::string>> arguments) {
|
||||
std::shared_ptr<ffmpegkit::MediaInformationSession> ffmpegkit::MediaInformationSession::create(const std::list<std::string>& arguments) {
|
||||
auto session = std::static_pointer_cast<ffmpegkit::MediaInformationSession>(std::make_shared<ffmpegkit::MediaInformationSession::PublicMediaInformationSession>(arguments, nullptr, nullptr));
|
||||
addSessionToSessionHistory(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
std::shared_ptr<ffmpegkit::MediaInformationSession> ffmpegkit::MediaInformationSession::create(const std::shared_ptr<std::list<std::string>> arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback) {
|
||||
std::shared_ptr<ffmpegkit::MediaInformationSession> ffmpegkit::MediaInformationSession::create(const std::list<std::string>& arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback) {
|
||||
auto session = std::static_pointer_cast<ffmpegkit::MediaInformationSession>(std::make_shared<ffmpegkit::MediaInformationSession::PublicMediaInformationSession>(arguments, completeCallback, nullptr));
|
||||
addSessionToSessionHistory(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
std::shared_ptr<ffmpegkit::MediaInformationSession> ffmpegkit::MediaInformationSession::create(const std::shared_ptr<std::list<std::string>> arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback) {
|
||||
std::shared_ptr<ffmpegkit::MediaInformationSession> ffmpegkit::MediaInformationSession::create(const std::list<std::string>& arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback) {
|
||||
auto session = std::static_pointer_cast<ffmpegkit::MediaInformationSession>(std::make_shared<ffmpegkit::MediaInformationSession::PublicMediaInformationSession>(arguments, completeCallback, logCallback));
|
||||
addSessionToSessionHistory(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
struct ffmpegkit::MediaInformationSession::PublicMediaInformationSession : public ffmpegkit::MediaInformationSession {
|
||||
PublicMediaInformationSession(const std::shared_ptr<std::list<std::string>> arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback) :
|
||||
PublicMediaInformationSession(const std::list<std::string>& arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback) :
|
||||
MediaInformationSession(arguments, completeCallback, logCallback) {
|
||||
}
|
||||
};
|
||||
|
||||
ffmpegkit::MediaInformationSession::MediaInformationSession(const std::shared_ptr<std::list<std::string>> arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback) :
|
||||
ffmpegkit::MediaInformationSession::MediaInformationSession(const std::list<std::string>& arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback) :
|
||||
ffmpegkit::AbstractSession(arguments, logCallback, ffmpegkit::LogRedirectionStrategyNeverPrintLogs), _completeCallback{completeCallback}, _mediaInformation{nullptr} {
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace ffmpegkit {
|
|||
*
|
||||
* @param arguments command arguments
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::MediaInformationSession> create(const std::shared_ptr<std::list<std::string>> arguments);
|
||||
static std::shared_ptr<ffmpegkit::MediaInformationSession> create(const std::list<std::string>& arguments);
|
||||
|
||||
/**
|
||||
* Creates a new media information session.
|
||||
|
@ -46,7 +46,7 @@ namespace ffmpegkit {
|
|||
* @param arguments command arguments
|
||||
* @param completeCallback session specific complete callback
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::MediaInformationSession> create(const std::shared_ptr<std::list<std::string>> arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback);
|
||||
static std::shared_ptr<ffmpegkit::MediaInformationSession> create(const std::list<std::string>& arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback);
|
||||
|
||||
/**
|
||||
* Creates a new media information session.
|
||||
|
@ -55,7 +55,7 @@ namespace ffmpegkit {
|
|||
* @param completeCallback session specific complete callback
|
||||
* @param logCallback session specific log callback
|
||||
*/
|
||||
static std::shared_ptr<ffmpegkit::MediaInformationSession> create(const std::shared_ptr<std::list<std::string>> arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback);
|
||||
static std::shared_ptr<ffmpegkit::MediaInformationSession> create(const std::list<std::string>& arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback);
|
||||
|
||||
/**
|
||||
* Returns the media information extracted in this session.
|
||||
|
@ -111,7 +111,7 @@ namespace ffmpegkit {
|
|||
* @param completeCallback session specific complete callback
|
||||
* @param logCallback session specific log callback
|
||||
*/
|
||||
MediaInformationSession(const std::shared_ptr<std::list<std::string>> arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback);
|
||||
MediaInformationSession(const std::list<std::string>& arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback);
|
||||
|
||||
ffmpegkit::MediaInformationSessionCompleteCallback _completeCallback;
|
||||
std::shared_ptr<ffmpegkit::MediaInformation> _mediaInformation;
|
||||
|
|
Loading…
Reference in New Issue
Block a user