public interface Session
Common interface for all FFmpegKit
sessions.
Modifier and Type | Method and Description |
---|---|
void |
addLog(Log log)
Adds a new log entry for this session.
|
void |
cancel()
Cancels running the session.
|
java.util.List<Log> |
getAllLogs()
Returns all log entries generated for this session.
|
java.util.List<Log> |
getAllLogs(int waitTimeout)
Returns all log entries generated for this session.
|
java.lang.String |
getAllLogsAsString()
Returns all log entries generated for this session as a concatenated string.
|
java.lang.String |
getAllLogsAsString(int waitTimeout)
Returns all log entries generated for this session as a concatenated string.
|
java.lang.String[] |
getArguments()
Returns command arguments as an array.
|
java.lang.String |
getCommand()
Returns command arguments as a concatenated string.
|
java.util.Date |
getCreateTime()
Returns session create time.
|
long |
getDuration()
Returns the time taken to execute this session.
|
java.util.Date |
getEndTime()
Returns session end time.
|
ExecuteCallback |
getExecuteCallback()
Returns the session specific execute callback function.
|
java.lang.String |
getFailStackTrace()
Returns the stack trace of the exception received while executing this session.
|
java.util.concurrent.Future<?> |
getFuture()
Returns the future created for this session, if it is executed asynchronously.
|
LogCallback |
getLogCallback()
Returns the session specific log callback function.
|
LogRedirectionStrategy |
getLogRedirectionStrategy()
Returns session specific log redirection strategy.
|
java.util.List<Log> |
getLogs()
Returns all log entries delivered for this session.
|
java.lang.String |
getLogsAsString()
Returns all log entries delivered for this session as a concatenated string.
|
java.lang.String |
getOutput()
Returns the log output generated while running the session.
|
ReturnCode |
getReturnCode()
Returns the return code for this session.
|
long |
getSessionId()
Returns the session identifier.
|
java.util.Date |
getStartTime()
Returns session start time.
|
SessionState |
getState()
Returns the state of the session.
|
boolean |
isFFmpeg()
Returns whether it is an
FFmpeg session or not. |
boolean |
isFFprobe()
Returns whether it is an
FFprobe session or not. |
boolean |
thereAreAsynchronousMessagesInTransmit()
Returns whether there are still asynchronous messages being transmitted for this
session or not.
|
ExecuteCallback getExecuteCallback()
LogCallback getLogCallback()
long getSessionId()
java.util.Date getCreateTime()
java.util.Date getStartTime()
java.util.Date getEndTime()
long getDuration()
java.lang.String[] getArguments()
java.lang.String getCommand()
java.util.List<Log> getAllLogs(int waitTimeout)
waitTimeout
- wait timeout for asynchronous messages in millisecondsjava.util.List<Log> getAllLogs()
java.util.List<Log> getLogs()
java.lang.String getAllLogsAsString(int waitTimeout)
waitTimeout
- wait timeout for asynchronous messages in millisecondsjava.lang.String getAllLogsAsString()
java.lang.String getLogsAsString()
java.lang.String getOutput()
SessionState getState()
ReturnCode getReturnCode()
java.lang.String getFailStackTrace()
The stack trace is only set for sessions that end with FAILED state. For sessions that has COMPLETED state this method returns null.
LogRedirectionStrategy getLogRedirectionStrategy()
boolean thereAreAsynchronousMessagesInTransmit()
void addLog(Log log)
log
- log entryjava.util.concurrent.Future<?> getFuture()
boolean isFFmpeg()
FFmpeg
session or not.FFmpeg
session, false otherwiseboolean isFFprobe()
FFprobe
session or not.FFprobe
session, false otherwisevoid cancel()