FFmpegKit iOS / macOS / tvOS API 6.0
Loading...
Searching...
No Matches
Instance Methods | Class Methods
AbstractSession Class Reference

#import <AbstractSession.h>

Instance Methods

(instancetype) - init:withLogCallback:withLogRedirectionStrategy:
 
(void) - waitForAsynchronousMessagesInTransmit:
 
(LogCallback- getLogCallback [implementation]
 
(long) - getSessionId [implementation]
 
(NSDate *) - getCreateTime [implementation]
 
(NSDate *) - getStartTime [implementation]
 
(NSDate *) - getEndTime [implementation]
 
(long) - getDuration [implementation]
 
(NSArray *) - getArguments [implementation]
 
(NSString *) - getCommand [implementation]
 
(NSArray *) - getAllLogsWithTimeout: [implementation]
 
(NSArray *) - getAllLogs [implementation]
 
(NSArray *) - getLogs [implementation]
 
(NSString *) - getAllLogsAsStringWithTimeout: [implementation]
 
(NSString *) - getAllLogsAsString [implementation]
 
(NSString *) - getLogsAsString [implementation]
 
(NSString *) - getOutput [implementation]
 
(SessionState) - getState [implementation]
 
(ReturnCode *) - getReturnCode [implementation]
 
(NSString *) - getFailStackTrace [implementation]
 
(LogRedirectionStrategy) - getLogRedirectionStrategy [implementation]
 
(BOOL) - thereAreAsynchronousMessagesInTransmit [implementation]
 
(void) - addLog: [implementation]
 
(void) - startRunning [implementation]
 
(void) - complete: [implementation]
 
(void) - fail: [implementation]
 
(BOOL) - isFFmpeg [implementation]
 
(BOOL) - isFFprobe [implementation]
 
(BOOL) - isMediaInformation [implementation]
 
(void) - cancel [implementation]
 
(LogCallback- getLogCallback
 
(long) - getSessionId
 
(NSDate *) - getCreateTime
 
(NSDate *) - getStartTime
 
(NSDate *) - getEndTime
 
(long) - getDuration
 
(NSArray *) - getArguments
 
(NSString *) - getCommand
 
(NSArray *) - getAllLogsWithTimeout:
 
(NSArray *) - getAllLogs
 
(NSArray *) - getLogs
 
(NSString *) - getAllLogsAsStringWithTimeout:
 
(NSString *) - getAllLogsAsString
 
(NSString *) - getLogsAsString
 
(NSString *) - getOutput
 
(SessionState) - getState
 
(ReturnCode *) - getReturnCode
 
(NSString *) - getFailStackTrace
 
(LogRedirectionStrategy) - getLogRedirectionStrategy
 
(BOOL) - thereAreAsynchronousMessagesInTransmit
 
(void) - addLog:
 
(void) - startRunning
 
(void) - complete:
 
(void) - fail:
 
(BOOL) - isFFmpeg
 
(BOOL) - isFFprobe
 
(BOOL) - isMediaInformation
 
(void) - cancel
 

Class Methods

(void) + initialize [implementation]
 

Detailed Description

Abstract session implementation which includes common features shared by FFmpeg, FFprobe and MediaInformation sessions.

Definition at line 35 of file AbstractSession.h.

Method Documentation

◆ addLog:

- (void) addLog: (Log *)  log
implementation

Adds a new log entry for this session.

It is invoked internally by FFmpegKit library methods. Must not be used by user applications.

Parameters
loglog entry

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ cancel

- (void) cancel
implementation

Cancels running the session.

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ complete:

- (void) complete: (ReturnCode *)  returnCode
implementation

Completes running the session with the provided return code.

Parameters
returnCodereturn code of the execution

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ fail:

- (void) fail: (NSException *)  exception
implementation

Ends running the session with a failure.

Parameters
exceptionexecution received

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getAllLogs

- (NSArray *) getAllLogs
implementation

Returns all log entries generated for this session. If there are asynchronous messages that are not delivered yet, this method waits for them.

Returns
list of log entries generated for this session

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getAllLogsAsString

- (NSString *) getAllLogsAsString
implementation

Returns all log entries generated for this session as a concatenated string. If there are asynchronous messages that are not delivered yet, this method waits for them.

Returns
all log entries generated for this session as a concatenated string

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getAllLogsAsStringWithTimeout:

- (NSString *) getAllLogsAsStringWithTimeout: (int waitTimeout
implementation

Returns all log entries generated for this session as a concatenated string. If there are asynchronous messages that are not delivered yet, this method waits for them until the given timeout.

Parameters
waitTimeoutwait timeout for asynchronous messages in milliseconds
Returns
all log entries generated for this session as a concatenated string

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getAllLogsWithTimeout:

- (NSArray *) getAllLogsWithTimeout: (int waitTimeout
implementation

Returns all log entries generated for this session. If there are asynchronous messages that are not delivered yet, this method waits for them until the given timeout.

Parameters
waitTimeoutwait timeout for asynchronous messages in milliseconds
Returns
list of log entries generated for this session

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getArguments

- (NSArray *) getArguments
implementation

Returns command arguments as an array.

Returns
command arguments as an array

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getCommand

- (NSString *) getCommand
implementation

Returns command arguments as a concatenated string.

Returns
command arguments as a concatenated string

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getCreateTime

- (NSDate *) getCreateTime
implementation

Returns session create time.

Returns
session create time

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getDuration

- (long) getDuration
implementation

Returns the time taken to execute this session.

Returns
time taken to execute this session in milliseconds or zero (0) if the session is not over yet

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getEndTime

- (NSDate *) getEndTime
implementation

Returns session end time.

Returns
session end time

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getFailStackTrace

- (NSString *) getFailStackTrace
implementation

Returns the stack trace of the exception received while executing this session.

The stack trace is only set for sessions that end with SessionStateFailed state. For sessions that has SessionStateCompleted state this method returns nil.

Returns
stack trace of the exception received while executing this session, nil if session is not started, still running or completed

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getLogCallback

- (LogCallback) getLogCallback
implementation

Returns the session specific log callback.

Returns
session specific log callback

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getLogRedirectionStrategy

- (LogRedirectionStrategy) getLogRedirectionStrategy
implementation

Returns session specific log redirection strategy.

Returns
session specific log redirection strategy

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getLogs

- (NSArray *) getLogs
implementation

Returns all log 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.

Returns
list of log entries received for this session

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getLogsAsString

- (NSString *) getLogsAsString
implementation

Returns all log entries delivered for this session as a concatenated string. Note that if there are asynchronous messages that are not delivered yet, this method will not wait for them and will return immediately.

Returns
list of log entries received for this session

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getOutput

- (NSString *) getOutput
implementation

Returns the log output generated while running the session.

Returns
log output generated

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getReturnCode

- (ReturnCode *) getReturnCode
implementation

Returns the return code for this session. Note that return code is only set for sessions that end with SessionStateCompleted state. If a session is not started, still running or failed then this method returns nil.

Returns
the return code for this session if the session has completed, nil if session is not started, still running or failed

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getSessionId

- (long) getSessionId
implementation

Returns the session identifier.

Returns
session identifier

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getStartTime

- (NSDate *) getStartTime
implementation

Returns session start time.

Returns
session start time

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ getState

- (SessionState) getState
implementation

Returns the state of the session.

Returns
state of the session

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ init:withLogCallback:withLogRedirectionStrategy:

- (instancetype) init: (NSArray*)  arguments
withLogCallback: (LogCallback logCallback
withLogRedirectionStrategy: (LogRedirectionStrategy)  logRedirectionStrategy 

Creates a new abstract session.

Parameters
argumentscommand arguments
logCallbacksession specific log callback
logRedirectionStrategysession specific log redirection strategy

Definition at line 45 of file AbstractSession.m.

◆ initialize

+ (void) initialize
implementation

Reimplemented in FFmpegSession, FFprobeSession, and MediaInformationSession.

Definition at line 45 of file AbstractSession.m.

◆ isFFmpeg

- (BOOL) isFFmpeg
implementation

Returns whether it is an FFmpeg session or not.

Returns
true if it is an FFmpeg session, false otherwise

Reimplemented from <Session>.

Reimplemented in FFmpegSession, FFprobeSession, and MediaInformationSession.

Definition at line 45 of file AbstractSession.m.

◆ isFFprobe

- (BOOL) isFFprobe
implementation

Returns whether it is an FFprobe session or not.

Returns
true if it is an FFprobe session, false otherwise

Reimplemented from <Session>.

Reimplemented in FFmpegSession, FFprobeSession, and MediaInformationSession.

Definition at line 45 of file AbstractSession.m.

◆ isMediaInformation

- (BOOL) isMediaInformation
implementation

Returns whether it is a MediaInformation session or not.

Returns
true if it is a MediaInformation session, false otherwise

Reimplemented from <Session>.

Reimplemented in FFmpegSession, FFprobeSession, and MediaInformationSession.

Definition at line 45 of file AbstractSession.m.

◆ startRunning

- (void) startRunning
implementation

Starts running the session.

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ thereAreAsynchronousMessagesInTransmit

- (BOOL) thereAreAsynchronousMessagesInTransmit
implementation

Returns whether there are still asynchronous messages being transmitted for this session or not.

Returns
true if there are still asynchronous messages being transmitted, false otherwise

Reimplemented from <Session>.

Definition at line 45 of file AbstractSession.m.

◆ waitForAsynchronousMessagesInTransmit:

- (void) waitForAsynchronousMessagesInTransmit: (int timeout

Waits for all asynchronous messages to be transmitted until the given timeout.

Parameters
timeoutwait timeout in milliseconds

Definition at line 45 of file AbstractSession.m.


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