![]() |
FFmpegKit Linux API 5.1
|
#include <FFmpegSession.h>
Data Structures | |
struct | PublicFFmpegSession |
Public Member Functions | |
ffmpegkit::StatisticsCallback | getStatisticsCallback () |
ffmpegkit::FFmpegSessionCompleteCallback | getCompleteCallback () |
std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Statistics > > > | getAllStatisticsWithTimeout (const int waitTimeout) |
std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Statistics > > > | getAllStatistics () |
std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Statistics > > > | getStatistics () |
std::shared_ptr< ffmpegkit::Statistics > | getLastReceivedStatistics () |
void | addStatistics (const std::shared_ptr< ffmpegkit::Statistics > statistics) |
bool | isFFmpeg () const override |
bool | isFFprobe () const override |
bool | isMediaInformation () const override |
![]() | |
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::FFmpegSession > | create (const std::list< std::string > &arguments) |
static std::shared_ptr< ffmpegkit::FFmpegSession > | create (const std::list< std::string > &arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback) |
static std::shared_ptr< ffmpegkit::FFmpegSession > | create (const std::list< std::string > &arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback) |
static std::shared_ptr< ffmpegkit::FFmpegSession > | create (const std::list< std::string > &arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback, ffmpegkit::LogRedirectionStrategy logRedirectionStrategy) |
Private Member Functions | |
FFmpegSession (const std::list< std::string > &arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback, ffmpegkit::LogRedirectionStrategy logRedirectionStrategy) | |
Private Attributes | |
ffmpegkit::StatisticsCallback | _statisticsCallback |
FFmpegSessionCompleteCallback | _completeCallback |
std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Statistics > > > | _statistics |
Additional Inherited Members | |
![]() | |
static constexpr int | DefaultTimeoutForAsynchronousMessagesInTransmit = 5000 |
An FFmpeg session.
Definition at line 32 of file FFmpegSession.h.
|
private |
Builds a new FFmpeg session.
arguments | command arguments |
completeCallback | session specific complete callback |
logCallback | session specific log callback |
statisticsCallback | session specific statistics callback |
logRedirectionStrategy | session specific log redirection strategy |
Definition at line 57 of file FFmpegSession.cpp.
void ffmpegkit::FFmpegSession::addStatistics | ( | const std::shared_ptr< ffmpegkit::Statistics > | statistics | ) |
Adds a new statistics entry for this session. It is invoked internally by FFmpegKit
library methods. Must not be used by user applications.
statistics | statistics entry |
Definition at line 95 of file FFmpegSession.cpp.
|
static |
Builds a new FFmpeg session.
arguments | command arguments |
Definition at line 27 of file FFmpegSession.cpp.
|
static |
Builds a new FFmpeg session.
arguments | command arguments |
completeCallback | session specific complete callback |
Definition at line 33 of file FFmpegSession.cpp.
|
static |
Builds a new FFmpeg session.
arguments | command arguments |
completeCallback | session specific complete callback |
logCallback | session specific log callback |
statisticsCallback | session specific statistics callback |
Definition at line 39 of file FFmpegSession.cpp.
|
static |
Builds a new FFmpeg session.
arguments | command arguments |
completeCallback | session specific complete callback |
logCallback | session specific log callback |
statisticsCallback | session specific statistics callback |
logRedirectionStrategy | session specific log redirection strategy |
Definition at line 45 of file FFmpegSession.cpp.
std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Statistics > > > ffmpegkit::FFmpegSession::getAllStatistics | ( | ) |
Returns all statistics entries generated for this session. If there are asynchronous messages that are not delivered yet, this method waits for them until AbstractSessionDefaultTimeoutForAsynchronousMessagesInTransmit expires.
Definition at line 79 of file FFmpegSession.cpp.
std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Statistics > > > ffmpegkit::FFmpegSession::getAllStatisticsWithTimeout | ( | const int | waitTimeout | ) |
Returns all statistics entries generated for this session. If there are asynchronous messages that are not delivered yet, this method waits for them until the given timeout.
waitTimeout | wait timeout for asynchronous messages in milliseconds |
Definition at line 69 of file FFmpegSession.cpp.
ffmpegkit::FFmpegSessionCompleteCallback ffmpegkit::FFmpegSession::getCompleteCallback | ( | ) |
Returns the session specific complete callback.
Definition at line 65 of file FFmpegSession.cpp.
std::shared_ptr< ffmpegkit::Statistics > ffmpegkit::FFmpegSession::getLastReceivedStatistics | ( | ) |
Returns the last received statistics entry.
Definition at line 87 of file FFmpegSession.cpp.
std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Statistics > > > ffmpegkit::FFmpegSession::getStatistics | ( | ) |
Returns all statistics entries delivered for this session. Note that if there are asynchronous messages that are not delivered yet, this method will not wait for them and will return immediately.
Definition at line 83 of file FFmpegSession.cpp.
ffmpegkit::StatisticsCallback ffmpegkit::FFmpegSession::getStatisticsCallback | ( | ) |
Returns the session specific statistics callback.
Definition at line 61 of file FFmpegSession.cpp.
|
overridevirtual |
Returns whether it is an FFmpeg
session or not.
FFmpeg
session, false otherwise Reimplemented from ffmpegkit::AbstractSession.
Definition at line 99 of file FFmpegSession.cpp.
|
overridevirtual |
Returns whether it is an FFprobe
session or not.
FFprobe
session, false otherwise Reimplemented from ffmpegkit::AbstractSession.
Definition at line 103 of file FFmpegSession.cpp.
|
overridevirtual |
Returns whether it is a MediaInformation
session or not.
MediaInformation
session, false otherwise Reimplemented from ffmpegkit::AbstractSession.
Definition at line 107 of file FFmpegSession.cpp.
|
private |
Definition at line 165 of file FFmpegSession.h.
|
private |
Definition at line 166 of file FFmpegSession.h.
|
private |
Definition at line 164 of file FFmpegSession.h.