类 AbstractSession

    • 字段详细资料

      • 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 arguments
        logCallback - session specific log callback
        logRedirectionStrategy - session specific log redirection strategy
    • 方法详细资料

      • getLogCallback

        public LogCallback getLogCallback()
        从接口复制的说明: Session
        Returns the session specific log callback.
        指定者:
        getLogCallback 在接口中 Session
        返回:
        session specific log callback
      • getSessionId

        public long getSessionId()
        从接口复制的说明: Session
        Returns the session identifier.
        指定者:
        getSessionId 在接口中 Session
        返回:
        session identifier
      • getCreateTime

        public Date getCreateTime()
        从接口复制的说明: Session
        Returns session create time.
        指定者:
        getCreateTime 在接口中 Session
        返回:
        session create time
      • getStartTime

        public Date getStartTime()
        从接口复制的说明: Session
        Returns session start time.
        指定者:
        getStartTime 在接口中 Session
        返回:
        session start time
      • getEndTime

        public Date getEndTime()
        从接口复制的说明: Session
        Returns session end time.
        指定者:
        getEndTime 在接口中 Session
        返回:
        session end time
      • getDuration

        public long getDuration()
        从接口复制的说明: Session
        Returns 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()
        从接口复制的说明: Session
        Returns command arguments as an array.
        指定者:
        getArguments 在接口中 Session
        返回:
        command arguments as an array
      • getCommand

        public String getCommand()
        从接口复制的说明: Session
        Returns command arguments as a concatenated string.
        指定者:
        getCommand 在接口中 Session
        返回:
        command arguments as a concatenated string
      • getAllLogs

        public List<Log> getAllLogs​(int waitTimeout)
        从接口复制的说明: Session
        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.
        指定者:
        getAllLogs 在接口中 Session
        参数:
        waitTimeout - wait timeout for asynchronous messages in milliseconds
        返回:
        list of log entries generated for this session
      • getLogs

        public List<Log> getLogs()
        从接口复制的说明: Session
        Returns 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.
        指定者:
        getLogs 在接口中 Session
        返回:
        list of log entries received for this session
      • getAllLogsAsString

        public String getAllLogsAsString​(int waitTimeout)
        从接口复制的说明: Session
        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.
        指定者:
        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 until DEFAULT_TIMEOUT_FOR_ASYNCHRONOUS_MESSAGES_IN_TRANSMIT expires.
        指定者:
        getAllLogsAsString 在接口中 Session
        返回:
        all log entries generated for this session as a concatenated string
      • getLogsAsString

        public String getLogsAsString()
        从接口复制的说明: Session
        Returns 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()
        从接口复制的说明: Session
        Returns the log output generated while running the session.
        指定者:
        getOutput 在接口中 Session
        返回:
        log output generated
      • getState

        public SessionState getState()
        从接口复制的说明: Session
        Returns the state of the session.
        指定者:
        getState 在接口中 Session
        返回:
        state of the session
      • getReturnCode

        public ReturnCode getReturnCode()
        从接口复制的说明: Session
        Returns 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()
        从接口复制的说明: Session
        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 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
      • thereAreAsynchronousMessagesInTransmit

        public boolean thereAreAsynchronousMessagesInTransmit()
        从接口复制的说明: Session
        Returns 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)
        从接口复制的说明: Session
        Adds a new log entry for this session.

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

        指定者:
        addLog 在接口中 Session
        参数:
        log - log entry
      • getFuture

        public Future<?> getFuture()
        从接口复制的说明: Session
        Returns the future created for this session, if it is executed asynchronously.
        指定者:
        getFuture 在接口中 Session
        返回:
        future that runs this session asynchronously
      • cancel

        public void cancel()
        从接口复制的说明: Session
        Cancels running the session.
        指定者:
        cancel 在接口中 Session