| FFmpegKit Linux API 6.0

Loading...
Searching...
No Matches
Data Structures | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
ffmpegkit::MediaInformationSession Class Reference

`#include <MediaInformationSession.h>`

## Data Structures
struct | PublicMediaInformationSession

## Public Member Functions
std::shared_ptr< ffmpegkit::MediaInformation > | getMediaInformation ()
void | setMediaInformation (const std::shared_ptr< ffmpegkit::MediaInformation > mediaInformation)
ffmpegkit::MediaInformationSessionCompleteCallback | getCompleteCallback ()
bool | isFFmpeg () const override
bool | isFFprobe () const override
bool | isMediaInformation () const override
Public Member Functions inherited from ffmpegkit::AbstractSession
| AbstractSession (const std::list< std::string > &arguments, const ffmpegkit::LogCallback logCallback, const LogRedirectionStrategy logRedirectionStrategy)
void | waitForAsynchronousMessagesInTransmit (const int timeout) const
ffmpegkit::LogCallback | getLogCallback () const override
long | getSessionId () const override
std::chrono::time_point< std::chrono::system_clock > | getCreateTime () const override
std::chrono::time_point< std::chrono::system_clock > | getStartTime () const override
std::chrono::time_point< std::chrono::system_clock > | getEndTime () const override
long | getDuration () const override
std::shared_ptr< std::list< std::string > > | getArguments () const override
std::string | getCommand () const override
std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Log > > > | getAllLogsWithTimeout (const int waitTimeout) const override
std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Log > > > | getAllLogs () const override
std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Log > > > | getLogs () const override
std::string | getAllLogsAsStringWithTimeout (const int waitTimeout) const override
std::string | getAllLogsAsString () const override
std::string | getLogsAsString () const override
std::string | getOutput () const override
ffmpegkit::SessionState | getState () const override
std::shared_ptr< ffmpegkit::ReturnCode > | getReturnCode () const override
std::string | getFailStackTrace () const override
ffmpegkit::LogRedirectionStrategy | getLogRedirectionStrategy () const override
bool | thereAreAsynchronousMessagesInTransmit () const override
void | addLog (const std::shared_ptr< ffmpegkit::Log > log) override
void | startRunning () override
void | complete (const std::shared_ptr< ffmpegkit::ReturnCode > returnCode) override
void | fail (const char *error) override
virtual bool | isFFmpeg () const override
virtual bool | isFFprobe () const override
virtual bool | isMediaInformation () const override
void | cancel () override
virtual ffmpegkit::LogCallback | getLogCallback () const =0
virtual long | getSessionId () const =0
virtual std::chrono::time_point< std::chrono::system_clock > | getCreateTime () const =0
virtual std::chrono::time_point< std::chrono::system_clock > | getStartTime () const =0
virtual std::chrono::time_point< std::chrono::system_clock > | getEndTime () const =0
virtual long | getDuration () const =0
virtual std::shared_ptr< std::list< std::string > > | getArguments () const =0
virtual std::string | getCommand () const =0
virtual std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Log > > > | getAllLogsWithTimeout (const int waitTimeout) const =0
virtual std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Log > > > | getAllLogs () const =0
virtual std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Log > > > | getLogs () const =0
virtual std::string | getAllLogsAsStringWithTimeout (const int waitTimeout) const =0
virtual std::string | getAllLogsAsString () const =0
virtual std::string | getLogsAsString () const =0
virtual std::string | getOutput () const =0
virtual ffmpegkit::SessionState | getState () const =0
virtual std::shared_ptr< ffmpegkit::ReturnCode > | getReturnCode () const =0
virtual std::string | getFailStackTrace () const =0
virtual LogRedirectionStrategy | getLogRedirectionStrategy () const =0
virtual bool | thereAreAsynchronousMessagesInTransmit () const =0
virtual void | addLog (const std::shared_ptr< ffmpegkit::Log > log)=0
virtual void | startRunning ()=0
virtual void | complete (const std::shared_ptr< ffmpegkit::ReturnCode > returnCode)=0
virtual void | fail (const char *error)=0
virtual bool | isFFmpeg () const =0
virtual bool | isFFprobe () const =0
virtual bool | isMediaInformation () const =0
virtual void | cancel ()=0

## Static Public Member Functions
static std::shared_ptr< ffmpegkit::MediaInformationSession > | create (const std::list< std::string > &arguments)
static std::shared_ptr< ffmpegkit::MediaInformationSession > | create (const std::list< std::string > &arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback)
static std::shared_ptr< ffmpegkit::MediaInformationSession > | create (const std::list< std::string > &arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback)

## Private Member Functions
| MediaInformationSession (const std::list< std::string > &arguments, ffmpegkit::MediaInformationSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback)

## Private Attributes
ffmpegkit::MediaInformationSessionCompleteCallback | _completeCallback
std::shared_ptr< ffmpegkit::MediaInformation > | _mediaInformation

## Additional Inherited Members
Static Public Attributes inherited from ffmpegkit::AbstractSession
static constexpr int | DefaultTimeoutForAsynchronousMessagesInTransmit = 5000

## Detailed Description

A custom FFprobe session, which produces a `MediaInformation` object using the FFprobe output.

Definition at line 33 of file MediaInformationSession.h.

## Constructor & Destructor Documentation

## ◆ MediaInformationSession()

ffmpegkit::MediaInformationSession::MediaInformationSession | ( | const std::list< std::string > & | arguments,
|  | ffmpegkit::MediaInformationSessionCompleteCallback | completeCallback,
|  | ffmpegkit::LogCallback | logCallback
| ) |  |
| private

Creates a new media information session.

Parameters

  arguments | command arguments
  completeCallback | session specific complete callback
  logCallback | session specific log callback

Definition at line 50 of file MediaInformationSession.cpp.

## Member Function Documentation

## ◆ create() [1/3]

std::shared_ptr< ffmpegkit::MediaInformationSession > ffmpegkit::MediaInformationSession::create | ( | const std::list< std::string > & | arguments | ) |
| static

Creates a new media information session.

Parameters

  arguments | command arguments

Returns
  created session

Definition at line 26 of file MediaInformationSession.cpp.

## ◆ create() [2/3]

std::shared_ptr< ffmpegkit::MediaInformationSession > ffmpegkit::MediaInformationSession::create | ( | const std::list< std::string > & | arguments,
|  | ffmpegkit::MediaInformationSessionCompleteCallback | completeCallback
| ) |  |
| static

Creates a new media information session.

Parameters

  arguments | command arguments
  completeCallback | session specific complete callback

Returns
  created session

Definition at line 32 of file MediaInformationSession.cpp.

## ◆ create() [3/3]

std::shared_ptr< ffmpegkit::MediaInformationSession > ffmpegkit::MediaInformationSession::create | ( | const std::list< std::string > & | arguments,
|  | ffmpegkit::MediaInformationSessionCompleteCallback | completeCallback,
|  | ffmpegkit::LogCallback | logCallback
| ) |  |
| static

Creates a new media information session.

Parameters

  arguments | command arguments
  completeCallback | session specific complete callback
  logCallback | session specific log callback

Returns
  created session

Definition at line 38 of file MediaInformationSession.cpp.

## ◆ getCompleteCallback()

ffmpegkit::MediaInformationSessionCompleteCallback ffmpegkit::MediaInformationSession::getCompleteCallback | ( |  | ) |

Returns the session specific complete callback.

Returns
  session specific complete callback

Definition at line 62 of file MediaInformationSession.cpp.

## ◆ getMediaInformation()

std::shared_ptr< ffmpegkit::MediaInformation > ffmpegkit::MediaInformationSession::getMediaInformation | ( |  | ) |

Returns the media information extracted in this session.

Returns
  media information extracted or nullptr if the command failed or the output can not be parsed

Definition at line 54 of file MediaInformationSession.cpp.

## ◆ isFFmpeg()

bool ffmpegkit::MediaInformationSession::isFFmpeg | ( |  | ) | const
| override virtual

Returns whether it is an `FFmpeg` session or not.

Returns
  true if it is an `FFmpeg` session, false otherwise

Reimplemented from ffmpegkit::AbstractSession.

Definition at line 66 of file MediaInformationSession.cpp.

## ◆ isFFprobe()

bool ffmpegkit::MediaInformationSession::isFFprobe | ( |  | ) | const
| override virtual

Returns whether it is an `FFprobe` session or not.

Returns
  true if it is an `FFprobe` session, false otherwise

Reimplemented from ffmpegkit::AbstractSession.

Definition at line 70 of file MediaInformationSession.cpp.

## ◆ isMediaInformation()

bool ffmpegkit::MediaInformationSession::isMediaInformation | ( |  | ) | const
| override virtual

Returns whether it is a `MediaInformation` session or not.

Returns
  true if it is a `MediaInformation` session, false otherwise

Reimplemented from ffmpegkit::AbstractSession.

Definition at line 74 of file MediaInformationSession.cpp.

## ◆ setMediaInformation()

void ffmpegkit::MediaInformationSession::setMediaInformation | ( | const std::shared_ptr< ffmpegkit::MediaInformation > | mediaInformation | ) |

Sets the media information extracted in this session.

Parameters

  mediaInformation | media information extracted

Definition at line 58 of file MediaInformationSession.cpp.

## Field Documentation

## ◆ _completeCallback

ffmpegkit::MediaInformationSessionCompleteCallback ffmpegkit::MediaInformationSession::_completeCallback
| private

Definition at line 119 of file MediaInformationSession.h.

## ◆ _mediaInformation

std::shared_ptr<ffmpegkit::MediaInformation> ffmpegkit::MediaInformationSession::_mediaInformation
| private

Definition at line 120 of file MediaInformationSession.h.

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

- MediaInformationSession.h
- MediaInformationSession.cpp