-
public interface SessionCommon interface for all
FFmpegKitsessions.
-
-
Method Summary
Modifier and Type Method Description abstract LogCallbackgetLogCallback()Returns the session specific log callback. abstract longgetSessionId()Returns the session identifier. abstract DategetCreateTime()Returns session create time. abstract DategetStartTime()Returns session start time. abstract DategetEndTime()Returns session end time. abstract longgetDuration()Returns the time taken to execute this session. abstract Array<String>getArguments()Returns command arguments as an array. abstract StringgetCommand()Returns command arguments as a concatenated string. abstract List<Log>getAllLogs(int waitTimeout)Returns all log entries generated for this session. abstract List<Log>getAllLogs()Returns all log entries generated for this session. abstract List<Log>getLogs()Returns all log entries delivered for this session. abstract StringgetAllLogsAsString(int waitTimeout)Returns all log entries generated for this session as a concatenated string. abstract StringgetAllLogsAsString()Returns all log entries generated for this session as a concatenated string. abstract StringgetLogsAsString()Returns all log entries delivered for this session as a concatenated string. abstract StringgetOutput()Returns the log output generated while running the session. abstract SessionStategetState()Returns the state of the session. abstract ReturnCodegetReturnCode()Returns the return code for this session. abstract StringgetFailStackTrace()Returns the stack trace of the exception received while executing this session. abstract LogRedirectionStrategygetLogRedirectionStrategy()Returns session specific log redirection strategy. abstract booleanthereAreAsynchronousMessagesInTransmit()Returns whether there are still asynchronous messages being transmitted for thissession or not. abstract voidaddLog(Log log)Adds a new log entry for this session. abstract Future<out Object>getFuture()Returns the future created for this session, if it is executed asynchronously. abstract booleanisFFmpeg()Returns whether it is an FFmpegsession or not.abstract booleanisFFprobe()Returns whether it is an FFprobesession or not.abstract booleanisMediaInformation()Returns whether it is a MediaInformationsession or not.abstract voidcancel()Cancels running the session. -
-
Method Detail
-
getLogCallback
abstract LogCallback getLogCallback()
Returns the session specific log callback.
-
getSessionId
abstract long getSessionId()
Returns the session identifier.
-
getCreateTime
abstract Date getCreateTime()
Returns session create time.
-
getStartTime
abstract Date getStartTime()
Returns session start time.
-
getEndTime
abstract Date getEndTime()
Returns session end time.
-
getDuration
abstract long getDuration()
Returns the time taken to execute this session.
-
getArguments
abstract Array<String> getArguments()
Returns command arguments as an array.
-
getCommand
abstract String getCommand()
Returns command arguments as a concatenated string.
-
getAllLogs
abstract List<Log> getAllLogs(int waitTimeout)
Returns all log entries generated for this session. If there are asynchronousmessages that are not delivered yet, this method waits for them until the given timeout.
- Parameters:
waitTimeout- wait timeout for asynchronous messages in milliseconds
-
getAllLogs
abstract List<Log> getAllLogs()
Returns all log entries generated for this session. If there are asynchronousmessages that are not delivered yet, this method waits for them.
-
getLogs
abstract List<Log> getLogs()
Returns all log entries delivered for this session. Note that if there are asynchronous logmessages that are not delivered yet, this method will not wait for them and will returnimmediately.
-
getAllLogsAsString
abstract String getAllLogsAsString(int waitTimeout)
Returns all log entries generated for this session as a concatenated string. If there areasynchronous messages that are not delivered yet, this method waits for them untilthe given timeout.
- Parameters:
waitTimeout- wait timeout for asynchronous messages in milliseconds
-
getAllLogsAsString
abstract String getAllLogsAsString()
Returns all log entries generated for this session as a concatenated string. If there areasynchronous messages that are not delivered yet, this method waits for them.
-
getLogsAsString
abstract String getLogsAsString()
Returns all log entries delivered for this session as a concatenated string. Note that ifthere are asynchronous log messages that are not delivered yet, this method will not waitfor them and will return immediately.
-
getState
abstract SessionState getState()
Returns the state of the session.
-
getReturnCode
abstract ReturnCode getReturnCode()
Returns the return code for this session. Note that return code is only set for sessionsthat end with COMPLETED state. If a session is not started, still running or failed thenthis method returns null.
-
getFailStackTrace
abstract String getFailStackTrace()
Returns the stack trace of the exception received while executing this session.
The stack trace is only set for sessions that end with FAILED state. For sessions that hasCOMPLETED state this method returns null.
-
getLogRedirectionStrategy
abstract LogRedirectionStrategy getLogRedirectionStrategy()
Returns session specific log redirection strategy.
-
thereAreAsynchronousMessagesInTransmit
abstract boolean thereAreAsynchronousMessagesInTransmit()
Returns whether there are still asynchronous messages being transmitted for thissession or not.
-
addLog
abstract void addLog(Log log)
Adds a new log entry for this session.
It is invoked internally by
FFmpegKitlibrary methods. Must not be used by userapplications.- Parameters:
log- log entry
-
getFuture
abstract Future<out Object> getFuture()
Returns the future created for this session, if it is executed asynchronously.
-
isFFmpeg
abstract boolean isFFmpeg()
Returns whether it is an
FFmpegsession or not.
-
isFFprobe
abstract boolean isFFprobe()
Returns whether it is an
FFprobesession or not.
-
isMediaInformation
abstract boolean isMediaInformation()
Returns whether it is a
MediaInformationsession or not.
-
cancel
abstract void cancel()
Cancels running the session.
-
-
-
-