![]() |
FFmpegKit Linux API 5.1
|
#include <FFmpegKitConfig.h>
Static Public Member Functions | |
static void | enableRedirection () |
static void | disableRedirection () |
static int | setFontconfigConfigurationPath (const std::string &path) |
static void | setFontDirectory (const std::string &fontDirectoryPath, const std::map< std::string, std::string > &fontNameMapping) |
static void | setFontDirectoryList (const std::list< std::string > &fontDirectoryList, const std::map< std::string, std::string > &fontNameMapping) |
static std::shared_ptr< std::string > | registerNewFFmpegPipe () |
static void | closeFFmpegPipe (const std::string &ffmpegPipePath) |
static std::string | getFFmpegVersion () |
static std::string | getVersion () |
static bool | isLTSBuild () |
static std::string | getBuildDate () |
static int | setEnvironmentVariable (const std::string &variableName, const std::string &variableValue) |
static void | ignoreSignal (const ffmpegkit::Signal signal) |
static void | ffmpegExecute (const std::shared_ptr< ffmpegkit::FFmpegSession > ffmpegSession) |
static void | ffprobeExecute (const std::shared_ptr< ffmpegkit::FFprobeSession > ffprobeSession) |
static void | getMediaInformationExecute (const std::shared_ptr< ffmpegkit::MediaInformationSession > mediaInformationSession, const int waitTimeout) |
static void | asyncFFmpegExecute (const std::shared_ptr< ffmpegkit::FFmpegSession > ffmpegSession) |
static void | asyncFFprobeExecute (const std::shared_ptr< ffmpegkit::FFprobeSession > ffprobeSession) |
static void | asyncGetMediaInformationExecute (const std::shared_ptr< ffmpegkit::MediaInformationSession > mediaInformationSession, int waitTimeout) |
static void | enableLogCallback (const ffmpegkit::LogCallback logCallback) |
static void | enableStatisticsCallback (const ffmpegkit::StatisticsCallback statisticsCallback) |
static void | enableFFmpegSessionCompleteCallback (const FFmpegSessionCompleteCallback ffmpegSessionCompleteCallback) |
static FFmpegSessionCompleteCallback | getFFmpegSessionCompleteCallback () |
static void | enableFFprobeSessionCompleteCallback (const FFprobeSessionCompleteCallback ffprobeSessionCompleteCallback) |
static FFprobeSessionCompleteCallback | getFFprobeSessionCompleteCallback () |
static void | enableMediaInformationSessionCompleteCallback (const MediaInformationSessionCompleteCallback mediaInformationSessionCompleteCallback) |
static MediaInformationSessionCompleteCallback | getMediaInformationSessionCompleteCallback () |
static ffmpegkit::Level | getLogLevel () |
static void | setLogLevel (const ffmpegkit::Level level) |
static std::string | logLevelToString (const ffmpegkit::Level level) |
static int | getSessionHistorySize () |
static void | setSessionHistorySize (const int sessionHistorySize) |
static std::shared_ptr< ffmpegkit::Session > | getSession (const long sessionId) |
static std::shared_ptr< ffmpegkit::Session > | getLastSession () |
static std::shared_ptr< ffmpegkit::Session > | getLastCompletedSession () |
static std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Session > > > | getSessions () |
static void | clearSessions () |
static std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::FFmpegSession > > > | getFFmpegSessions () |
static std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::FFprobeSession > > > | getFFprobeSessions () |
static std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::MediaInformationSession > > > | getMediaInformationSessions () |
static std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Session > > > | getSessionsByState (const SessionState state) |
static LogRedirectionStrategy | getLogRedirectionStrategy () |
static void | setLogRedirectionStrategy (const LogRedirectionStrategy logRedirectionStrategy) |
static int | messagesInTransmit (const long sessionId) |
static std::string | sessionStateToString (SessionState state) |
static std::list< std::string > | parseArguments (const std::string &command) |
static std::string | argumentsToString (std::shared_ptr< std::list< std::string > > arguments) |
Static Public Attributes | |
static constexpr const char * | FFmpegKitVersion = "5.1" |
static constexpr const char * | FFmpegKitNamedPipePrefix = "fk_pipe_" |
Configuration class of FFmpegKit
library. Allows customizing the global library options. Provides helper methods to support additional resources.
Definition at line 41 of file FFmpegKitConfig.h.
|
static |
Concatenates arguments into a string adding a space character between two arguments.
arguments | arguments |
Definition at line 1412 of file FFmpegKitConfig.cpp.
|
static |
Starts an asynchronous FFmpeg execution for the given session.
Note that this method returns immediately and does not wait the execution to complete. You must use an FFmpegSessionCompleteCallback if you want to be notified about the result.
ffmpegSession | FFmpeg session which includes command options/arguments |
Definition at line 1055 of file FFmpegKitConfig.cpp.
|
static |
Starts an asynchronous FFprobe execution for the given session.
Note that this method returns immediately and does not wait the execution to complete. You must use an FFprobeSessionCompleteCallback if you want to be notified about the result.
ffprobeSession | FFprobe session which includes command options/arguments |
Definition at line 1083 of file FFmpegKitConfig.cpp.
|
static |
Starts an asynchronous FFprobe execution for the given media information session.
Note that this method returns immediately and does not wait the execution to complete. You must use an MediaInformationSessionCompleteCallback if you want to be notified about the result.
mediaInformationSession | media information session which includes command options/arguments |
waitTimeout | max time to wait until media information is transmitted |
Definition at line 1111 of file FFmpegKitConfig.cpp.
|
static |
Clears all, including ongoing, sessions in the session history.
Note that callbacks cannot be triggered for deleted sessions.
Definition at line 1257 of file FFmpegKitConfig.cpp.
|
static |
Closes a previously created FFmpeg
pipe.
ffmpegPipePath | full path of the FFmpeg pipe |
Definition at line 959 of file FFmpegKitConfig.cpp.
|
static |
Disables log and statistics redirection.
When redirection is disabled logs are printed to stderr, all logs and statistics callbacks are disabled and FFprobe
's getMediaInformation
methods do not work.
Definition at line 818 of file FFmpegKitConfig.cpp.
|
static |
Sets a global FFmpegSessionCompleteCallback to receive execution results for FFmpeg sessions.
ffmpegSessionCompleteCallback | complete callback or nullptr to disable a previously defined callback |
Definition at line 1147 of file FFmpegKitConfig.cpp.
|
static |
Sets a global FFprobeSessionCompleteCallback to receive execution results for FFprobe sessions.
ffprobeSessionCompleteCallback | complete callback or nullptr to disable a previously defined callback |
Definition at line 1155 of file FFmpegKitConfig.cpp.
|
static |
Sets a global log callback to redirect FFmpeg/FFprobe logs.
logCallback | log callback or nullptr to disable a previously defined log callback |
Definition at line 1139 of file FFmpegKitConfig.cpp.
|
static |
Sets a global MediaInformationSessionCompleteCallback to receive execution results for MediaInformation sessions.
mediaInformationSessionCompleteCallback | complete callback or nullptr to disable a previously defined callback |
Definition at line 1163 of file FFmpegKitConfig.cpp.
|
static |
Enables log and statistics redirection.
When redirection is enabled FFmpeg/FFprobe sessions collect log and statistics entries for the executions. It is possible to define global or session specific log/statistics callbacks as well.
Note that redirection is enabled by default. If you do not want to use its functionality please use disableRedirection method to disable it.
Definition at line 795 of file FFmpegKitConfig.cpp.
|
static |
Sets a global statistics callback to redirect FFmpeg statistics.
statisticsCallback | statistics callback or nullptr to disable a previously defined statistics callback |
Definition at line 1143 of file FFmpegKitConfig.cpp.
|
static |
Synchronously executes the FFmpeg session provided.
ffmpegSession | FFmpeg session which includes command options/arguments |
Definition at line 1007 of file FFmpegKitConfig.cpp.
|
static |
Synchronously executes the FFprobe session provided.
ffprobeSession | FFprobe session which includes command options/arguments |
Definition at line 1019 of file FFmpegKitConfig.cpp.
|
static |
Returns FFmpegKit library build date.
Definition at line 983 of file FFmpegKitConfig.cpp.
|
static |
Returns the global FFmpegSessionCompleteCallback set.
Definition at line 1151 of file FFmpegKitConfig.cpp.
|
static |
Returns all FFmpeg sessions in the session history.
Definition at line 1267 of file FFmpegKitConfig.cpp.
|
static |
Returns the version of FFmpeg bundled within FFmpegKit
library.
Definition at line 963 of file FFmpegKitConfig.cpp.
|
static |
Returns the global FFprobeSessionCompleteCallback set.
Definition at line 1159 of file FFmpegKitConfig.cpp.
|
static |
Returns all FFprobe sessions in the session history.
Definition at line 1285 of file FFmpegKitConfig.cpp.
|
static |
Returns the last session completed from the session history.
Definition at line 1231 of file FFmpegKitConfig.cpp.
|
static |
Returns the last session created from the session history.
Definition at line 1224 of file FFmpegKitConfig.cpp.
|
static |
Returns the current log level.
Definition at line 1171 of file FFmpegKitConfig.cpp.
|
static |
Returns the active log redirection strategy.
Definition at line 1339 of file FFmpegKitConfig.cpp.
|
static |
Synchronously executes the media information session provided.
mediaInformationSession | media information session which includes command options/arguments |
waitTimeout | max time to wait until media information is transmitted |
Definition at line 1031 of file FFmpegKitConfig.cpp.
|
static |
Returns the global MediaInformationSessionCompleteCallback set.
Definition at line 1167 of file FFmpegKitConfig.cpp.
|
static |
Returns all MediaInformation sessions in the session history.
Definition at line 1303 of file FFmpegKitConfig.cpp.
|
static |
Returns the session specified with sessionId
from the session history.
sessionId | session identifier |
Definition at line 1212 of file FFmpegKitConfig.cpp.
|
static |
Returns the session history size.
Definition at line 1195 of file FFmpegKitConfig.cpp.
|
static |
Returns all sessions in the session history.
Definition at line 1246 of file FFmpegKitConfig.cpp.
|
static |
Returns sessions that have the given state.
Definition at line 1321 of file FFmpegKitConfig.cpp.
|
static |
Returns FFmpegKit library version.
Definition at line 967 of file FFmpegKitConfig.cpp.
|
static |
Registers a new ignored signal. Ignored signals are not handled by FFmpegKit
library.
signal | signal to be ignored |
Definition at line 993 of file FFmpegKitConfig.cpp.
|
static |
Returns whether FFmpegKit release is a Long Term Release or not.
Definition at line 975 of file FFmpegKitConfig.cpp.
|
static |
Converts log level to string.
level | value |
Definition at line 1179 of file FFmpegKitConfig.cpp.
|
static |
Returns the number of async messages that are not transmitted to the callbacks for this session.
sessionId | id of the session |
Definition at line 1347 of file FFmpegKitConfig.cpp.
|
static |
Parses the given command into arguments. Uses space character to split the arguments. Supports single and double quote characters.
command | string command |
Definition at line 1361 of file FFmpegKitConfig.cpp.
|
static |
Creates a new named pipe to use in FFmpeg
operations.
Please note that creator is responsible of closing created pipes.
Definition at line 927 of file FFmpegKitConfig.cpp.
|
static |
Converts session state to string.
state | session state |
Definition at line 1351 of file FFmpegKitConfig.cpp.
|
static |
Sets an environment variable.
variableName | environment variable name |
variableValue | environment variable value |
Definition at line 989 of file FFmpegKitConfig.cpp.
|
static |
Sets and overrides fontconfig
configuration directory.
path | directory that contains fontconfig configuration (fonts.conf) |
Definition at line 839 of file FFmpegKitConfig.cpp.
|
static |
Registers the fonts inside the given path, so they become available to use in FFmpeg filters.
Note that you need to build FFmpegKit
with fontconfig
enabled or use a prebuilt package with fontconfig
inside to be able to use fonts in FFmpeg
.
fontDirectoryPath | directory that contains fonts (.ttf and .otf files) |
fontNameMapping | custom font name mappings, useful to access your fonts with more friendly names |
Definition at line 843 of file FFmpegKitConfig.cpp.
|
static |
Registers the fonts inside the given list of font directories, so they become available to use in FFmpeg filters.
Note that you need to build FFmpegKit
with fontconfig
enabled or use a prebuilt package with fontconfig
inside to be able to use fonts in FFmpeg
.
fontDirectoryList | list of directories that contain fonts (.ttf and .otf files) |
fontNameMapping | custom font name mappings, useful to access your fonts with more friendly names |
Definition at line 847 of file FFmpegKitConfig.cpp.
|
static |
Sets the log level.
level | new log level |
Definition at line 1175 of file FFmpegKitConfig.cpp.
|
static |
Sets the log redirection strategy
logRedirectionStrategy | log redirection strategy |
Definition at line 1343 of file FFmpegKitConfig.cpp.
|
static |
Sets the session history size.
sessionHistorySize | session history size, should be smaller than 1000 |
Definition at line 1199 of file FFmpegKitConfig.cpp.
|
staticconstexpr |
Prefix of named pipes created by ffmpeg-kit.
Definition at line 50 of file FFmpegKitConfig.h.
|
staticconstexpr |
Global library version
Definition at line 45 of file FFmpegKitConfig.h.