类 AbstractSession
- java.lang.Object
-
- com.ts.lib.ffmpegkit.AbstractSession
-
-
字段概要
字段 修饰符和类型 字段 说明 static intDEFAULT_TIMEOUT_FOR_ASYNCHRONOUS_MESSAGES_IN_TRANSMITDefines how long default "getAll" methods wait, in milliseconds.
-
构造器概要
构造器 构造器 说明 AbstractSession(String[] arguments, LogCallback logCallback, LogRedirectionStrategy logRedirectionStrategy)Creates a new abstract session.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddLog(Log log)Adds a new log entry for this session.voidcancel()Cancels running the session.List<Log>getAllLogs()Returns all log entries generated for this session.List<Log>getAllLogs(int waitTimeout)Returns all log entries generated for this session.StringgetAllLogsAsString()Returns all log entries generated for this session as a concatenated string.StringgetAllLogsAsString(int waitTimeout)Returns all log entries generated for this session as a concatenated string.String[]getArguments()Returns command arguments as an array.StringgetCommand()Returns command arguments as a concatenated string.DategetCreateTime()Returns session create time.longgetDuration()Returns the time taken to execute this session.DategetEndTime()Returns session end time.StringgetFailStackTrace()Returns the stack trace of the exception received while executing this session.Future<?>getFuture()Returns the future created for this session, if it is executed asynchronously.LogCallbackgetLogCallback()Returns the session specific log callback.LogRedirectionStrategygetLogRedirectionStrategy()Returns session specific log redirection strategy.List<Log>getLogs()Returns all log entries delivered for this session.StringgetLogsAsString()Returns all log entries delivered for this session as a concatenated string.StringgetOutput()Returns the log output generated while running the session.ReturnCodegetReturnCode()Returns the return code for this session.longgetSessionId()Returns the session identifier.DategetStartTime()Returns session start time.SessionStategetState()Returns the state of the session.booleanthereAreAsynchronousMessagesInTransmit()Returns whether there are still asynchronous messages being transmitted for this session or not.-
从接口继承的方法 com.ts.lib.ffmpegkit.Session
isFFmpeg, isFFprobe, isMediaInformation
-
-
-
-
字段详细资料
-
DEFAULT_TIMEOUT_FOR_ASYNCHRONOUS_MESSAGES_IN_TRANSMIT
public static final int DEFAULT_TIMEOUT_FOR_ASYNCHRONOUS_MESSAGES_IN_TRANSMIT
Defines how long default "getAll" methods wait, in milliseconds.- 另请参阅:
- 常量字段值
-
-
构造器详细资料
-
AbstractSession
public AbstractSession(String[] arguments, LogCallback logCallback, LogRedirectionStrategy logRedirectionStrategy)
Creates a new abstract session.- 参数:
arguments- command argumentslogCallback- session specific log callbacklogRedirectionStrategy- session specific log redirection strategy
-
-
方法详细资料
-
getLogCallback
public LogCallback getLogCallback()
从接口复制的说明:SessionReturns the session specific log callback.- 指定者:
getLogCallback在接口中Session- 返回:
- session specific log callback
-
getSessionId
public long getSessionId()
从接口复制的说明:SessionReturns the session identifier.- 指定者:
getSessionId在接口中Session- 返回:
- session identifier
-
getCreateTime
public Date getCreateTime()
从接口复制的说明:SessionReturns session create time.- 指定者:
getCreateTime在接口中Session- 返回:
- session create time
-
getStartTime
public Date getStartTime()
从接口复制的说明:SessionReturns session start time.- 指定者:
getStartTime在接口中Session- 返回:
- session start time
-
getEndTime
public Date getEndTime()
从接口复制的说明:SessionReturns session end time.- 指定者:
getEndTime在接口中Session- 返回:
- session end time
-
getDuration
public long getDuration()
从接口复制的说明:SessionReturns the time taken to execute this session.- 指定者:
getDuration在接口中Session- 返回:
- time taken to execute this session in milliseconds or zero (0) if the session is not over yet
-
getArguments
public String[] getArguments()
从接口复制的说明:SessionReturns command arguments as an array.- 指定者:
getArguments在接口中Session- 返回:
- command arguments as an array
-
getCommand
public String getCommand()
从接口复制的说明:SessionReturns command arguments as a concatenated string.- 指定者:
getCommand在接口中Session- 返回:
- command arguments as a concatenated string
-
getAllLogs
public List<Log> getAllLogs(int waitTimeout)
从接口复制的说明:SessionReturns 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.- 指定者:
getAllLogs在接口中Session- 参数:
waitTimeout- wait timeout for asynchronous messages in milliseconds- 返回:
- list of log entries generated for this session
-
getAllLogs
public List<Log> getAllLogs()
Returns all log entries generated for this session. If there are asynchronous messages that are not delivered yet, this method waits for them untilDEFAULT_TIMEOUT_FOR_ASYNCHRONOUS_MESSAGES_IN_TRANSMITexpires.- 指定者:
getAllLogs在接口中Session- 返回:
- list of log entries generated for this session
-
getLogs
public List<Log> getLogs()
从接口复制的说明:SessionReturns all log entries delivered for this session. Note that if there are asynchronous log messages that are not delivered yet, this method will not wait for them and will return immediately.
-
getAllLogsAsString
public String getAllLogsAsString(int waitTimeout)
从接口复制的说明:SessionReturns 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.- 指定者:
getAllLogsAsString在接口中Session- 参数:
waitTimeout- wait timeout for asynchronous messages in milliseconds- 返回:
- all log entries generated for this session as a concatenated string
-
getAllLogsAsString
public String getAllLogsAsString()
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 untilDEFAULT_TIMEOUT_FOR_ASYNCHRONOUS_MESSAGES_IN_TRANSMITexpires.- 指定者:
getAllLogsAsString在接口中Session- 返回:
- all log entries generated for this session as a concatenated string
-
getLogsAsString
public String getLogsAsString()
从接口复制的说明:SessionReturns all log entries delivered for this session as a concatenated string. Note that if there are asynchronous log messages that are not delivered yet, this method will not wait for them and will return immediately.- 指定者:
getLogsAsString在接口中Session- 返回:
- list of log entries received for this session
-
getOutput
public String getOutput()
从接口复制的说明:SessionReturns the log output generated while running the session.
-
getState
public SessionState getState()
从接口复制的说明:SessionReturns the state of the session.
-
getReturnCode
public ReturnCode getReturnCode()
从接口复制的说明:SessionReturns the return code for this session. Note that return code is only set for sessions that end with COMPLETED state. If a session is not started, still running or failed then this method returns null.- 指定者:
getReturnCode在接口中Session- 返回:
- the return code for this session if the session is COMPLETED, null if session is not started, still running or failed
-
getFailStackTrace
public String getFailStackTrace()
从接口复制的说明:SessionReturns 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 has COMPLETED state this method returns null.
- 指定者:
getFailStackTrace在接口中Session- 返回:
- stack trace of the exception received while executing this session, null if session is not started, still running or completed
-
getLogRedirectionStrategy
public LogRedirectionStrategy getLogRedirectionStrategy()
从接口复制的说明:SessionReturns session specific log redirection strategy.- 指定者:
getLogRedirectionStrategy在接口中Session- 返回:
- session specific log redirection strategy
-
thereAreAsynchronousMessagesInTransmit
public boolean thereAreAsynchronousMessagesInTransmit()
从接口复制的说明:SessionReturns whether there are still asynchronous messages being transmitted for this session or not.- 指定者:
thereAreAsynchronousMessagesInTransmit在接口中Session- 返回:
- true if there are still asynchronous messages being transmitted, false otherwise
-
addLog
public void addLog(Log log)
从接口复制的说明:SessionAdds a new log entry for this session.It is invoked internally by
FFmpegKitlibrary methods. Must not be used by user applications.
-
getFuture
public Future<?> getFuture()
从接口复制的说明:SessionReturns the future created for this session, if it is executed asynchronously.
-
-