# FFmpegKit Linux API: ffmpegkit Namespace Reference

Loading...
Searching...
No Matches
ffmpegkit Namespace Reference

## Data Structures

class | AbstractSession
class | ArchDetect
class | Chapter
class | FFmpegKit
class | FFmpegKitConfig
class | FFmpegSession
class | FFprobeKit
class | FFprobeSession
class | Log
class | MediaInformation
class | MediaInformationJsonParser
class | MediaInformationSession
class | Packages
class | ReturnCode
class | Session
class | Statistics
class | StreamInformation

## Typedefs

typedef std::function< void(const std::shared_ptr< ffmpegkit::FFmpegSession > session)> | FFmpegSessionCompleteCallback
typedef std::function< void(const std::shared_ptr< ffmpegkit::FFprobeSession > session)> | FFprobeSessionCompleteCallback
typedef std::function< void(const std::shared_ptr< ffmpegkit::Log > log)> | LogCallback
typedef std::function< void(const std::shared_ptr< ffmpegkit::MediaInformationSession > session)> | MediaInformationSessionCompleteCallback
typedef std::function< void(const std::shared_ptr< ffmpegkit::Statistics > statistics)> | StatisticsCallback

## Enumerations

enum | Level { LevelAVLogStdErr = -16 , LevelAVLogQuiet = -8 , LevelAVLogPanic = 0 , LevelAVLogFatal = 8 , LevelAVLogError = 16 , LevelAVLogWarning = 24 , LevelAVLogInfo = 32 , LevelAVLogVerbose = 40 , LevelAVLogDebug = 48 , LevelAVLogTrace = 56 }
enum | LogRedirectionStrategy { LogRedirectionStrategyAlwaysPrintLogs = 0 , LogRedirectionStrategyPrintLogsWhenNoCallbacksDefined = 1 , LogRedirectionStrategyPrintLogsWhenGlobalCallbackNotDefined = 2 , LogRedirectionStrategyPrintLogsWhenSessionCallbackNotDefined = 3 , LogRedirectionStrategyNeverPrintLogs = 4 }
enum | SessionState { SessionStateCreated = 0 , SessionStateRunning = 1 , SessionStateFailed = 2 , SessionStateCompleted = 3 }
enum | Signal { SignalInt = 2 , SignalQuit = 3 , SignalPipe = 13 , SignalTerm = 15 , SignalXcpu = 24 }

## Functions

std::ostream & | operator<< (std::ostream &out, const std::shared_ptr< ffmpegkit::ReturnCode > &o)

## Typedef Documentation

## FFmpegSessionCompleteCallback

typedef std::function<void(const std::shared_ptr<ffmpegkit::FFmpegSession> session)> ffmpegkit::FFmpegSessionCompleteCallback

Callback function that is invoked when an asynchronous `FFmpeg` session has ended.

Session has either SessionStateCompleted or SessionStateFailed state when the callback is invoked.

If it has SessionStateCompleted state, `ReturnCode` should be checked to see the execution result.

If `getState` returns SessionStateFailed then `getFailStackTrace` should be used to get the failure reason.

     switch (session->getState()) {
         case SessionStateCompleted:
             auto returnCode = session->getReturnCode();
             break;
         case SessionStateFailed:
             auto failStackTrace = session->getFailStackTrace();
             break;
     }

Parameters

  session | session of the completed execution

Definition at line 52 of file FFmpegSessionCompleteCallback.h.

## FFprobeSessionCompleteCallback

typedef std::function<void(const std::shared_ptr<ffmpegkit::FFprobeSession> session)> ffmpegkit::FFprobeSessionCompleteCallback

Callback function that is invoked when an asynchronous `FFprobe` session has ended.

Session has either SessionStateCompleted or SessionStateFailed state when the callback is invoked.

If it has SessionStateCompleted state, `ReturnCode` should be checked to see the execution result.

If `getState` returns SessionStateFailed then `getFailStackTrace` should be used to get the failure reason.

     switch (session->getState()) {
         case SessionStateCompleted:
             auto returnCode = session->getReturnCode();
             break;
         case SessionStateFailed:
             auto failStackTrace = session->getFailStackTrace();
             break;
     }

Parameters

  session | session of the completed execution

Definition at line 52 of file FFprobeSessionCompleteCallback.h.

## LogCallback

typedef std::function<void(const std::shared_ptr<ffmpegkit::Log> log)> ffmpegkit::LogCallback

Callback that receives logs generated for `FFmpegKit` sessions.

Parameters

  log | log entry

Definition at line 35 of file LogCallback.h.

## MediaInformationSessionCompleteCallback

typedef std::function<void(const std::shared_ptr<ffmpegkit::MediaInformationSession> session)> ffmpegkit::MediaInformationSessionCompleteCallback

Callback function that is invoked when an asynchronous `MediaInformation` session has ended.

Session has either SessionStateCompleted or SessionStateFailed state when the callback is invoked.

If it has SessionStateCompleted state, `ReturnCode` should be checked to see the execution result.

If `getState` returns SessionStateFailed then `getFailStackTrace` should be used to get the failure reason.

     switch (session->getState()) {
         case SessionStateCompleted:
             auto returnCode = session->getReturnCode();
             break;
         case SessionStateFailed:
             auto failStackTrace = session->getFailStackTrace();
             break;
     }

Parameters

  session | session of the completed execution

Definition at line 53 of file MediaInformationSessionCompleteCallback.h.

## StatisticsCallback

typedef std::function<void(const std::shared_ptr<ffmpegkit::Statistics> statistics)> ffmpegkit::StatisticsCallback

Callback that receives statistics generated for `FFmpegKit` sessions.

Parameters

  statistics | statistics entry

Definition at line 35 of file StatisticsCallback.h.

## Enumeration Type Documentation

## Level

enum ffmpegkit::Level

Enumeration type for log levels.

Enumerator
LevelAVLogStdErr | This log level is defined by FFmpegKit. It is used to specify logs printed to stderr by FFmpeg. Logs that has this level are not filtered and always redirected.
LevelAVLogQuiet | Print no output.
LevelAVLogPanic | Something went really wrong and we will crash now.
LevelAVLogFatal | Something went wrong and recovery is not possible. For example, no header was found for a format which depends on headers or an illegal combination of parameters is used.
LevelAVLogError | Something went wrong and cannot losslessly be recovered. However, not all future data is affected.
LevelAVLogWarning | Something somehow does not look correct. This may or may not lead to problems. An example would be the use of '-vstrict -2'.
LevelAVLogInfo | Standard information.
LevelAVLogVerbose | Detailed information.
LevelAVLogDebug | Stuff which is only useful for libav* developers.
LevelAVLogTrace | Extremely verbose debugging, useful for libav* development.

Definition at line 28 of file Level.h.

## LogRedirectionStrategy

enum ffmpegkit::LogRedirectionStrategy

Enumerator
LogRedirectionStrategyAlwaysPrintLogs |
LogRedirectionStrategyPrintLogsWhenNoCallbacksDefined |
LogRedirectionStrategyPrintLogsWhenGlobalCallbackNotDefined |
LogRedirectionStrategyPrintLogsWhenSessionCallbackNotDefined |
LogRedirectionStrategyNeverPrintLogs |

Definition at line 25 of file LogRedirectionStrategy.h.

## SessionState

enum ffmpegkit::SessionState

Enumerator
SessionStateCreated |
SessionStateRunning |
SessionStateFailed |
SessionStateCompleted |

Definition at line 25 of file SessionState.h.

## Signal

enum ffmpegkit::Signal

Enumerator
SignalInt |
SignalQuit |
SignalPipe |
SignalTerm |
SignalXcpu |

Definition at line 25 of file Signal.h.

## Function Documentation

## operator<<()

std::ostream & ffmpegkit::operator<< | ( | std::ostream & | out,
|  | const std::shared_ptr< ffmpegkit::ReturnCode > & | o
| ) |  |

Definition at line 51 of file ReturnCode.cpp.