FFmpegKitConfig Class Reference

## Class Methods

(void) | + enableRedirection
(void) | + disableRedirection
(int) | + setFontconfigConfigurationPath:
(void) | + setFontDirectory:with:
(void) | + setFontDirectoryList:with:
(NSString *) | + registerNewFFmpegPipe
(void) | + closeFFmpegPipe:
(NSString *) | + getFFmpegVersion
(NSString *) | + getVersion
(int) | + isLTSBuild
(NSString *) | + getBuildDate
(int) | + setEnvironmentVariable:value:
(void) | + ignoreSignal:
(void) | + ffmpegExecute:
(void) | + ffprobeExecute:
(void) | + getMediaInformationExecute:withTimeout:
(void) | + asyncFFmpegExecute:
(void) | + asyncFFmpegExecute:onDispatchQueue:
(void) | + asyncFFprobeExecute:
(void) | + asyncFFprobeExecute:onDispatchQueue:
(void) | + asyncGetMediaInformationExecute:withTimeout:
(void) | + asyncGetMediaInformationExecute:onDispatchQueue:withTimeout:
(void) | + enableLogCallback:
(void) | + enableStatisticsCallback:
(void) | + enableExecuteCallback:
(ExecuteCallback) | + getExecuteCallback
(int) | + getLogLevel
(void) | + setLogLevel:
(NSString *) | + logLevelToString:
(int) | + getSessionHistorySize
(void) | + setSessionHistorySize:
(id< Session >) | + getSession:
(id< Session >) | + getLastSession
(id< Session >) | + getLastCompletedSession
(NSArray *) | + getSessions
(NSArray *) | + getFFmpegSessions
(NSArray *) | + getFFprobeSessions
(NSArray *) | + getSessionsByState:
(LogRedirectionStrategy) | + getLogRedirectionStrategy
(void) | + setLogRedirectionStrategy:
(int) | + messagesInTransmit:
(NSString *) | + sessionStateToString:
(void) | + initialize `[implementation]`
(void) | + addSession: `[implementation]`

## Detailed Description

Configuration class of `FFmpegKit` library. Allows customizing the global library options. Provides helper methods to support additional resources.

Definition at line 49 of file FFmpegKitConfig.h.

## Method Documentation

## addSession:

+ (void) addSession: |  | (id<Session>) | session |

implementation

Definition at line 124 of file FFmpegKitConfig.m.

## asyncFFmpegExecute:

+ (void) asyncFFmpegExecute: |  | (FFmpegSession*) | ffmpegSession |

Asynchronously executes the FFmpeg session provided.

Parameters

  ffmpegSession | FFmpeg session which includes command options/arguments

Definition at line 124 of file FFmpegKitConfig.m.

## asyncFFmpegExecute:onDispatchQueue:

+ (void) asyncFFmpegExecute: |  | (FFmpegSession*) | ffmpegSession
onDispatchQueue: |  | (dispatch_queue_t) | queue

Asynchronously executes the FFmpeg session provided.

Parameters

  ffmpegSession | FFmpeg session which includes command options/arguments
  queue | dispatch queue that will be used to run this asynchronous operation

Definition at line 124 of file FFmpegKitConfig.m.

## asyncFFprobeExecute:

+ (void) asyncFFprobeExecute: |  | (FFprobeSession*) | ffprobeSession |

Asynchronously executes the FFprobe session provided.

Parameters

  ffprobeSession | FFprobe session which includes command options/arguments

Definition at line 124 of file FFmpegKitConfig.m.

## asyncFFprobeExecute:onDispatchQueue:

+ (void) asyncFFprobeExecute: |  | (FFprobeSession*) | ffprobeSession
onDispatchQueue: |  | (dispatch_queue_t) | queue

Asynchronously executes the FFprobe session provided.

Parameters

  ffprobeSession | FFprobe session which includes command options/arguments
  queue | dispatch queue that will be used to run this asynchronous operation

Definition at line 124 of file FFmpegKitConfig.m.

## asyncGetMediaInformationExecute:onDispatchQueue:withTimeout:

+ (void) asyncGetMediaInformationExecute: |  | (MediaInformationSession*) | mediaInformationSession
onDispatchQueue: |  | (dispatch_queue_t) | queue
withTimeout: |  | (int) | waitTimeout

Asynchronously executes the media information session provided.

Parameters

  mediaInformationSession | media information session which includes command options/arguments
  queue | dispatch queue that will be used to run this asynchronous operation
  waitTimeout | max time to wait until media information is transmitted

Definition at line 124 of file FFmpegKitConfig.m.

## asyncGetMediaInformationExecute:withTimeout:

+ (void) asyncGetMediaInformationExecute: |  | (MediaInformationSession*) | mediaInformationSession
withTimeout: |  | (int) | waitTimeout

Asynchronously executes the media information session provided.

Parameters

  mediaInformationSession | media information session which includes command options/arguments
  waitTimeout | max time to wait until media information is transmitted

Definition at line 124 of file FFmpegKitConfig.m.

## closeFFmpegPipe:

+ (void) closeFFmpegPipe: |  | (NSString*) | ffmpegPipePath |

Closes a previously created `FFmpeg` pipe.

Parameters

  ffmpegPipePath | full path of the FFmpeg pipe

Definition at line 124 of file FFmpegKitConfig.m.

## disableRedirection

+ (void) disableRedirection |  |  |

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 124 of file FFmpegKitConfig.m.

## enableExecuteCallback:

+ (void) enableExecuteCallback: |  | (ExecuteCallback) | executeCallback |

Sets a global execute callback to receive execution results.

Parameters

  executeCallback | execute callback or nil to disable a previously execute callback

Definition at line 124 of file FFmpegKitConfig.m.

## enableLogCallback:

+ (void) enableLogCallback: |  | (LogCallback) | logCallback |

Sets a global log callback to redirect FFmpeg/FFprobe logs.

Parameters

  logCallback | log callback or nil to disable a previously defined log callback

Definition at line 124 of file FFmpegKitConfig.m.

## enableRedirection

+ (void) enableRedirection |  |  |

Enables log and statistics redirection.

When redirection is enabled FFmpeg/FFprobe logs are redirected to NSLog and 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 124 of file FFmpegKitConfig.m.

## enableStatisticsCallback:

+ (void) enableStatisticsCallback: |  | (StatisticsCallback) | statisticsCallback |

Sets a global statistics callback to redirect FFmpeg statistics.

Parameters

  statisticsCallback | statistics callback or nil to disable a previously defined statistics callback

Definition at line 124 of file FFmpegKitConfig.m.

## ffmpegExecute:

+ (void) ffmpegExecute: |  | (FFmpegSession*) | ffmpegSession |

Synchronously executes the FFmpeg session provided.

Parameters

  ffmpegSession | FFmpeg session which includes command options/arguments

Definition at line 124 of file FFmpegKitConfig.m.

## ffprobeExecute:

+ (void) ffprobeExecute: |  | (FFprobeSession*) | ffprobeSession |

Synchronously executes the FFprobe session provided.

Parameters

  ffprobeSession | FFprobe session which includes command options/arguments

Definition at line 124 of file FFmpegKitConfig.m.

## getBuildDate

+ (NSString *) getBuildDate |  |  |

Returns FFmpegKit library build date.

Returns
  FFmpegKit library build date

Definition at line 124 of file FFmpegKitConfig.m.

## getExecuteCallback

+ (ExecuteCallback) getExecuteCallback |  |  |

Returns the global execute callback.

Returns
  global execute callback

Definition at line 124 of file FFmpegKitConfig.m.

## getFFmpegSessions

+ (NSArray *) getFFmpegSessions |  |  |

Returns all FFmpeg sessions in the session history.

Returns
  all FFmpeg sessions in the session history

Definition at line 124 of file FFmpegKitConfig.m.

## getFFmpegVersion

+ (NSString *) getFFmpegVersion |  |  |

Returns the version of FFmpeg bundled within `FFmpegKit` library.

Returns
  the version of FFmpeg

Definition at line 124 of file FFmpegKitConfig.m.

## getFFprobeSessions

+ (NSArray *) getFFprobeSessions |  |  |

Returns all FFprobe sessions in the session history.

Returns
  all FFprobe sessions in the session history

Definition at line 124 of file FFmpegKitConfig.m.

## getLastCompletedSession

+ (id< Session >) getLastCompletedSession |  |  |

Returns the last session completed from the session history.

Returns
  the last session completed. If there are no completed sessions in the history this method will return nil

Definition at line 124 of file FFmpegKitConfig.m.

## getLastSession

+ (id< Session >) getLastSession |  |  |

Returns the last session created from the session history.

Returns
  the last session created or nil if session history is empty

Definition at line 124 of file FFmpegKitConfig.m.

## getLogLevel

+ (int) getLogLevel |  |  |

Returns the current log level.

Returns
  current log level

Definition at line 124 of file FFmpegKitConfig.m.

## getLogRedirectionStrategy

+ (LogRedirectionStrategy) getLogRedirectionStrategy |  |  |

Returns the active log redirection strategy.

Returns
  log redirection strategy

Definition at line 124 of file FFmpegKitConfig.m.

## getMediaInformationExecute:withTimeout:

+ (void) getMediaInformationExecute: |  | (MediaInformationSession*) | mediaInformationSession
withTimeout: |  | (int) | waitTimeout

Synchronously executes the media information session provided.

Parameters

  mediaInformationSession | media information session which includes command options/arguments
  waitTimeout | max time to wait until media information is transmitted

Definition at line 124 of file FFmpegKitConfig.m.

## getSession:

+ (id< Session >) getSession: |  | (long) | sessionId |

Returns the session specified with `sessionId` from the session history.

Parameters

  sessionId | session identifier

Returns
  session specified with sessionId or nil if it is not found in the history

Definition at line 124 of file FFmpegKitConfig.m.

## getSessionHistorySize

+ (int) getSessionHistorySize |  |  |

Returns the session history size.

Returns
  session history size

Definition at line 124 of file FFmpegKitConfig.m.

## getSessions

+ (NSArray *) getSessions |  |  |

Returns all sessions in the session history.

Returns
  all sessions in the session history

Definition at line 124 of file FFmpegKitConfig.m.

## getSessionsByState:

+ (NSArray *) getSessionsByState: |  | (SessionState) | state |

Returns sessions that have the given state.

Returns
  sessions that have the given state from the session history

Definition at line 124 of file FFmpegKitConfig.m.

## getVersion

+ (NSString *) getVersion |  |  |

Returns FFmpegKit library version.

Returns
  FFmpegKit version

Definition at line 124 of file FFmpegKitConfig.m.

## ignoreSignal:

+ (void) ignoreSignal: |  | (Signal) | signal |

Registers a new ignored signal. Ignored signals are not handled by `FFmpegKit` library.

Parameters

  signal | signal to be ignored

Definition at line 124 of file FFmpegKitConfig.m.

## initialize

+ (void) initialize |  |  |

implementation

Definition at line 124 of file FFmpegKitConfig.m.

## isLTSBuild

+ (int) isLTSBuild |  |  |

Returns whether FFmpegKit release is a Long Term Release or not.

Returns
  true/yes or false/no

Definition at line 124 of file FFmpegKitConfig.m.

## logLevelToString:

+ (NSString *) logLevelToString: |  | (int) | level |

Converts int log level to string.

Parameters

  level | value

Returns
  string value

Definition at line 124 of file FFmpegKitConfig.m.

## messagesInTransmit:

+ (int) messagesInTransmit: |  | (long) | sessionId |

Returns the number of async messages that are not transmitted to the callbacks for this session.

Parameters

  sessionId | id of the session

Returns
  number of async messages that are not transmitted to the callbacks for this session

Definition at line 124 of file FFmpegKitConfig.m.

## registerNewFFmpegPipe

+ (NSString *) registerNewFFmpegPipe |  |  |

Creates a new named pipe to use in `FFmpeg` operations.

Please note that creator is responsible of closing created pipes.

Returns
  the full path of the named pipe

Definition at line 124 of file FFmpegKitConfig.m.

## sessionStateToString:

+ (NSString *) sessionStateToString: |  | (SessionState) | state |

Converts session state to string.

Parameters

  state | session state

Returns
  string value

Definition at line 124 of file FFmpegKitConfig.m.

## setEnvironmentVariable:value:

+ (int) setEnvironmentVariable: |  | (NSString*) | variableName
value: |  | (NSString*) | variableValue

Sets an environment variable.

Parameters

  variableName | environment variable name
  variableValue | environment variable value

Returns
  zero on success, non-zero on error

Definition at line 124 of file FFmpegKitConfig.m.

## setFontconfigConfigurationPath:

+ (int) setFontconfigConfigurationPath: |  | (NSString*) | path |

Sets and overrides `fontconfig` configuration directory.

Parameters

  path | directory that contains fontconfig configuration (fonts.conf)

Returns
  zero on success, non-zero on error

Definition at line 124 of file FFmpegKitConfig.m.

## setFontDirectory:with:

+ (void) setFontDirectory: |  | (NSString*) | fontDirectoryPath
with: |  | (NSDictionary*) | fontNameMapping

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`.

Parameters

  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 124 of file FFmpegKitConfig.m.

## setFontDirectoryList:with:

+ (void) setFontDirectoryList: |  | (NSArray*) | fontDirectoryList
with: |  | (NSDictionary*) | fontNameMapping

Registers the fonts inside the given array 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`.

Parameters

  fontDirectoryList | array 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 124 of file FFmpegKitConfig.m.

## setLogLevel:

+ (void) setLogLevel: |  | (int) | level |

Sets the log level.

Parameters

  level | new log level

Definition at line 124 of file FFmpegKitConfig.m.

## setLogRedirectionStrategy:

+ (void) setLogRedirectionStrategy: |  | (LogRedirectionStrategy) | logRedirectionStrategy |

Sets the log redirection strategy

Parameters

  logRedirectionStrategy | log redirection strategy

Definition at line 124 of file FFmpegKitConfig.m.

## setSessionHistorySize:

+ (void) setSessionHistorySize: |  | (int) | sessionHistorySize |

Sets the session history size.

Parameters

  sessionHistorySize | session history size, should be smaller than 1000

Definition at line 124 of file FFmpegKitConfig.m.

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

- FFmpegKitConfig.h
- FFmpegKitConfig.m