| FFmpegKit Linux API 6.0

Loading...
Searching...
No Matches
Static Public Member Functions
ffmpegkit::FFprobeKit Class Reference

`#include <FFprobeKit.h>`

## Static Public Member Functions
static std::shared_ptr< ffmpegkit::FFprobeSession > | executeWithArguments (const std::list< std::string > &arguments)
static std::shared_ptr< ffmpegkit::FFprobeSession > | executeWithArgumentsAsync (const std::list< std::string > &arguments, FFprobeSessionCompleteCallback completeCallback)
static std::shared_ptr< ffmpegkit::FFprobeSession > | executeWithArgumentsAsync (const std::list< std::string > &arguments, FFprobeSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback)
static std::shared_ptr< ffmpegkit::FFprobeSession > | execute (const std::string command)
static std::shared_ptr< ffmpegkit::FFprobeSession > | executeAsync (const std::string command, FFprobeSessionCompleteCallback completeCallback)
static std::shared_ptr< ffmpegkit::FFprobeSession > | executeAsync (const std::string command, FFprobeSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback)
static std::shared_ptr< ffmpegkit::MediaInformationSession > | getMediaInformation (const std::string path)
static std::shared_ptr< ffmpegkit::MediaInformationSession > | getMediaInformation (const std::string path, const int waitTimeout)
static std::shared_ptr< ffmpegkit::MediaInformationSession > | getMediaInformationAsync (const std::string path, MediaInformationSessionCompleteCallback completeCallback)
static std::shared_ptr< ffmpegkit::MediaInformationSession > | getMediaInformationAsync (const std::string path, MediaInformationSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, const int waitTimeout)
static std::shared_ptr< ffmpegkit::MediaInformationSession > | getMediaInformationFromCommand (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

  command | FFprobe command

Returns
  FFprobe session created for this execution

Definition at line 50 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

  command | FFprobe command
  completeCallback | callback that will be called when the execution has completed

Returns
  FFprobe session created for this execution

Definition at line 56 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

  command | FFprobe command
  completeCallback | callback that will be notified when execution has completed
  logCallback | callback that will receive logs

Returns
  FFprobe session created for this execution

Definition at line 62 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

  arguments | FFprobe command options/arguments as string array

Returns
  FFprobe session created for this execution

Definition at line 32 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

  arguments | FFprobe command options/arguments as string array
  completeCallback | callback that will be called when the execution has completed

Returns
  FFprobe session created for this execution

Definition at line 38 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

  arguments | FFprobe command options/arguments as string array
  completeCallback | callback that will be notified when execution has completed
  logCallback | callback that will receive logs

Returns
  FFprobe session created for this execution

Definition at line 44 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

  path | path or uri of a media file

Returns
  media information session created for this execution

Definition at line 68 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

  path | path or uri of a media file
  waitTimeout | max time to wait until media information is transmitted

Returns
  media information session created for this execution

Definition at line 75 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

  path | path or uri of a media file
  completeCallback | callback that will be called when the execution has completed

Returns
  media information session created for this execution

Definition at line 82 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

  path | path or uri of a media file
  completeCallback | callback that will be notified when execution has completed
  logCallback | callback that will receive logs
  waitTimeout | max time to wait until media information is transmitted

Returns
  media information session created for this execution

Definition at line 89 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

  command | FFprobe command that prints media information for a file in JSON format

Returns
  media information session created for this execution

Definition at line 96 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 102 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 106 of file FFprobeKit.cpp.

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

- FFprobeKit.h
- FFprobeKit.cpp