FFmpegKit Linux API 5.1
Static Public Member Functions
ffmpegkit::FFprobeKit Class Reference

#include <FFprobeKit.h>

Static Public Member Functions

static std::shared_ptr< ffmpegkit::FFprobeSessionexecuteWithArguments (const std::list< std::string > &arguments)
 
static std::shared_ptr< ffmpegkit::FFprobeSessionexecuteWithArgumentsAsync (const std::list< std::string > &arguments, FFprobeSessionCompleteCallback completeCallback)
 
static std::shared_ptr< ffmpegkit::FFprobeSessionexecuteWithArgumentsAsync (const std::list< std::string > &arguments, FFprobeSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback)
 
static std::shared_ptr< ffmpegkit::FFprobeSessionexecute (const std::string command)
 
static std::shared_ptr< ffmpegkit::FFprobeSessionexecuteAsync (const std::string command, FFprobeSessionCompleteCallback completeCallback)
 
static std::shared_ptr< ffmpegkit::FFprobeSessionexecuteAsync (const std::string command, FFprobeSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback)
 
static std::shared_ptr< ffmpegkit::MediaInformationSessiongetMediaInformation (const std::string path)
 
static std::shared_ptr< ffmpegkit::MediaInformationSessiongetMediaInformation (const std::string path, const int waitTimeout)
 
static std::shared_ptr< ffmpegkit::MediaInformationSessiongetMediaInformationAsync (const std::string path, MediaInformationSessionCompleteCallback completeCallback)
 
static std::shared_ptr< ffmpegkit::MediaInformationSessiongetMediaInformationAsync (const std::string path, MediaInformationSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, const int waitTimeout)
 
static std::shared_ptr< ffmpegkit::MediaInformationSessiongetMediaInformationFromCommand (const std::string command)
 
static std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::FFprobeSession > > > listFFprobeSessions ()
 
static std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::MediaInformationSession > > > listMediaInformationSessions ()
 

Detailed Description

Main class to run FFprobe commands. Supports executing commands both synchronously and asynchronously.

auto session = FFprobeKit::execute("-hide_banner -v error -show_entries format=size -of default=noprint_wrappers=1 file1.mp4");

auto asyncSession = FFprobeKit::executeAsync("-hide_banner -v error -show_entries format=size -of default=noprint_wrappers=1 file1.mp4", [](auto session){ ... });

Provides overloaded execute methods to define session specific callbacks.

auto session = FFprobeKit::executeAsync("-hide_banner -v error -show_entries format=size -of default=noprint_wrappers=1 file1.mp4", [](auto session){ ... }, [](auto log){ ... }];

It can extract media information for a file or a url, using getMediaInformation method.

auto session = FFprobeKit::getMediaInformation("file1.mp4");

Definition at line 48 of file FFprobeKit.h.

Member Function Documentation

◆ execute()

std::shared_ptr< ffmpegkit::FFprobeSession > ffmpegkit::FFprobeKit::execute ( const std::string  command)
static

Synchronously executes FFprobe command provided. Space character is used to split command into arguments. You can use single or double quote characters to specify arguments inside your command.

Parameters
commandFFprobe command
Returns
FFprobe session created for this execution

Definition at line 51 of file FFprobeKit.cpp.

◆ executeAsync() [1/2]

std::shared_ptr< ffmpegkit::FFprobeSession > ffmpegkit::FFprobeKit::executeAsync ( const std::string  command,
FFprobeSessionCompleteCallback  completeCallback 
)
static

Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command into arguments. You can use single or double quote characters to specify arguments inside your command.

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.

Parameters
commandFFprobe command
completeCallbackcallback that will be called when the execution has completed
Returns
FFprobe session created for this execution

Definition at line 57 of file FFprobeKit.cpp.

◆ executeAsync() [2/2]

std::shared_ptr< ffmpegkit::FFprobeSession > ffmpegkit::FFprobeKit::executeAsync ( const std::string  command,
FFprobeSessionCompleteCallback  completeCallback,
ffmpegkit::LogCallback  logCallback 
)
static

Starts an asynchronous FFprobe execution for the given command. Space character is used to split the command into arguments. You can use single or double quote characters to specify arguments inside your command.

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.

Parameters
commandFFprobe command
completeCallbackcallback that will be notified when execution has completed
logCallbackcallback that will receive logs
Returns
FFprobe session created for this execution

Definition at line 63 of file FFprobeKit.cpp.

◆ executeWithArguments()

std::shared_ptr< ffmpegkit::FFprobeSession > ffmpegkit::FFprobeKit::executeWithArguments ( const std::list< std::string > &  arguments)
static

Synchronously executes FFprobe with arguments provided.

Parameters
argumentsFFprobe command options/arguments as string array
Returns
FFprobe session created for this execution

Definition at line 33 of file FFprobeKit.cpp.

◆ executeWithArgumentsAsync() [1/2]

std::shared_ptr< ffmpegkit::FFprobeSession > ffmpegkit::FFprobeKit::executeWithArgumentsAsync ( const std::list< std::string > &  arguments,
FFprobeSessionCompleteCallback  completeCallback 
)
static

Starts an asynchronous FFprobe execution with arguments provided.

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.

Parameters
argumentsFFprobe command options/arguments as string array
completeCallbackcallback that will be called when the execution has completed
Returns
FFprobe session created for this execution

Definition at line 39 of file FFprobeKit.cpp.

◆ executeWithArgumentsAsync() [2/2]

std::shared_ptr< ffmpegkit::FFprobeSession > ffmpegkit::FFprobeKit::executeWithArgumentsAsync ( const std::list< std::string > &  arguments,
FFprobeSessionCompleteCallback  completeCallback,
ffmpegkit::LogCallback  logCallback 
)
static

Starts an asynchronous FFprobe execution with arguments provided.

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.

Parameters
argumentsFFprobe command options/arguments as string array
completeCallbackcallback that will be notified when execution has completed
logCallbackcallback that will receive logs
Returns
FFprobe session created for this execution

Definition at line 45 of file FFprobeKit.cpp.

◆ getMediaInformation() [1/2]

std::shared_ptr< ffmpegkit::MediaInformationSession > ffmpegkit::FFprobeKit::getMediaInformation ( const std::string  path)
static

Extracts media information for the file specified with path.

Parameters
pathpath or uri of a media file
Returns
media information session created for this execution

Definition at line 69 of file FFprobeKit.cpp.

◆ getMediaInformation() [2/2]

std::shared_ptr< ffmpegkit::MediaInformationSession > ffmpegkit::FFprobeKit::getMediaInformation ( const std::string  path,
const int  waitTimeout 
)
static

Extracts media information for the file specified with path.

Parameters
pathpath or uri of a media file
waitTimeoutmax time to wait until media information is transmitted
Returns
media information session created for this execution

Definition at line 76 of file FFprobeKit.cpp.

◆ getMediaInformationAsync() [1/2]

std::shared_ptr< ffmpegkit::MediaInformationSession > ffmpegkit::FFprobeKit::getMediaInformationAsync ( const std::string  path,
MediaInformationSessionCompleteCallback  completeCallback 
)
static

Starts an asynchronous FFprobe execution to extract the media information for the specified file.

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.

Parameters
pathpath or uri of a media file
completeCallbackcallback that will be called when the execution has completed
Returns
media information session created for this execution

Definition at line 83 of file FFprobeKit.cpp.

◆ getMediaInformationAsync() [2/2]

std::shared_ptr< ffmpegkit::MediaInformationSession > ffmpegkit::FFprobeKit::getMediaInformationAsync ( const std::string  path,
MediaInformationSessionCompleteCallback  completeCallback,
ffmpegkit::LogCallback  logCallback,
const int  waitTimeout 
)
static

Starts an asynchronous FFprobe execution to extract the media information for the specified file.

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.

Parameters
pathpath or uri of a media file
completeCallbackcallback that will be notified when execution has completed
logCallbackcallback that will receive logs
waitTimeoutmax time to wait until media information is transmitted
Returns
media information session created for this execution

Definition at line 90 of file FFprobeKit.cpp.

◆ getMediaInformationFromCommand()

std::shared_ptr< ffmpegkit::MediaInformationSession > ffmpegkit::FFprobeKit::getMediaInformationFromCommand ( const std::string  command)
static

Extracts media information using the command provided asynchronously.

Parameters
commandFFprobe command that prints media information for a file in JSON format
Returns
media information session created for this execution

Definition at line 97 of file FFprobeKit.cpp.

◆ listFFprobeSessions()

std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::FFprobeSession > > > ffmpegkit::FFprobeKit::listFFprobeSessions ( )
static

Lists all FFprobe sessions in the session history.

Returns
all FFprobe sessions in the session history

Definition at line 103 of file FFprobeKit.cpp.

◆ listMediaInformationSessions()

std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::MediaInformationSession > > > ffmpegkit::FFprobeKit::listMediaInformationSessions ( )
static

Lists all MediaInformation sessions in the session history.

Returns
all MediaInformation sessions in the session history

Definition at line 107 of file FFprobeKit.cpp.


The documentation for this class was generated from the following files: