接口 Session

    • 方法详细资料

      • getLogCallback

        LogCallback getLogCallback()
        Returns the session specific log callback.
        返回:
        session specific log callback
      • getSessionId

        long getSessionId()
        Returns the session identifier.
        返回:
        session identifier
      • getCreateTime

        Date getCreateTime()
        Returns session create time.
        返回:
        session create time
      • getStartTime

        Date getStartTime()
        Returns session start time.
        返回:
        session start time
      • getEndTime

        Date getEndTime()
        Returns session end time.
        返回:
        session end time
      • getDuration

        long getDuration()
        Returns the time taken to execute this session.
        返回:
        time taken to execute this session in milliseconds or zero (0) if the session is not over yet
      • getArguments

        String[] getArguments()
        Returns command arguments as an array.
        返回:
        command arguments as an array
      • getCommand

        String getCommand()
        Returns command arguments as a concatenated string.
        返回:
        command arguments as a concatenated string
      • getAllLogs

        List<Log> getAllLogs​(int waitTimeout)
        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.
        参数:
        waitTimeout - wait timeout for asynchronous messages in milliseconds
        返回:
        list of log entries generated for this session
      • getAllLogs

        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.
        返回:
        list of log entries generated for this session
      • getLogs

        List<Log> getLogs()
        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.
        返回:
        list of log entries received for this session
      • getAllLogsAsString

        String getAllLogsAsString​(int waitTimeout)
        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.
        参数:
        waitTimeout - wait timeout for asynchronous messages in milliseconds
        返回:
        all log entries generated for this session as a concatenated string
      • getAllLogsAsString

        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.
        返回:
        all log entries generated for this session as a concatenated string
      • getLogsAsString

        String getLogsAsString()
        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.
        返回:
        list of log entries received for this session
      • getOutput

        String getOutput()
        Returns the log output generated while running the session.
        返回:
        log output generated
      • getState

        SessionState getState()
        Returns the state of the session.
        返回:
        state of the session
      • getReturnCode

        ReturnCode getReturnCode()
        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.
        返回:
        the return code for this session if the session is COMPLETED, null if session is not started, still running or failed
      • getFailStackTrace

        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 has COMPLETED state this method returns null.

        返回:
        stack trace of the exception received while executing this session, null if session is not started, still running or completed
      • getLogRedirectionStrategy

        LogRedirectionStrategy getLogRedirectionStrategy()
        Returns session specific log redirection strategy.
        返回:
        session specific log redirection strategy
      • thereAreAsynchronousMessagesInTransmit

        boolean thereAreAsynchronousMessagesInTransmit()
        Returns whether there are still asynchronous messages being transmitted for this session or not.
        返回:
        true if there are still asynchronous messages being transmitted, false otherwise
      • addLog

        void addLog​(Log log)
        Adds a new log entry for this session.

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

        参数:
        log - log entry
      • getFuture

        Future<?> getFuture()
        Returns the future created for this session, if it is executed asynchronously.
        返回:
        future that runs this session asynchronously
      • isFFmpeg

        boolean isFFmpeg()
        Returns whether it is an FFmpeg session or not.
        返回:
        true if it is an FFmpeg session, false otherwise
      • isFFprobe

        boolean isFFprobe()
        Returns whether it is an FFprobe session or not.
        返回:
        true if it is an FFprobe session, false otherwise
      • isMediaInformation

        boolean isMediaInformation()
        Returns whether it is a MediaInformation session or not.
        返回:
        true if it is a MediaInformation session, false otherwise
      • cancel

        void cancel()
        Cancels running the session.