Class FFmpegSession

    • Method Detail

      • create

        public static FFmpegSession create​(java.lang.String[] arguments)
        Builds a new FFmpeg session.
        Parameters:
        arguments - command arguments
        Returns:
        created session
      • create

        public static FFmpegSession create​(java.lang.String[] arguments,
                                           FFmpegSessionCompleteCallback completeCallback)
        Builds a new FFmpeg session.
        Parameters:
        arguments - command arguments
        completeCallback - session specific complete callback
        Returns:
        created session
      • create

        public static FFmpegSession create​(java.lang.String[] arguments,
                                           FFmpegSessionCompleteCallback completeCallback,
                                           LogCallback logCallback,
                                           StatisticsCallback statisticsCallback)
        Builds a new FFmpeg session.
        Parameters:
        arguments - command arguments
        completeCallback - session specific complete callback
        logCallback - session specific log callback
        statisticsCallback - session specific statistics callback
        Returns:
        created session
      • create

        public static FFmpegSession create​(java.lang.String[] arguments,
                                           FFmpegSessionCompleteCallback completeCallback,
                                           LogCallback logCallback,
                                           StatisticsCallback statisticsCallback,
                                           LogRedirectionStrategy logRedirectionStrategy)
        Builds a new FFmpeg session.
        Parameters:
        arguments - command arguments
        completeCallback - session specific complete callback
        logCallback - session specific log callback
        statisticsCallback - session specific statistics callback
        logRedirectionStrategy - session specific log redirection strategy
        Returns:
        created session
      • getStatisticsCallback

        public StatisticsCallback getStatisticsCallback()
        Returns the session specific statistics callback.
        Returns:
        session specific statistics callback
      • getCompleteCallback

        public FFmpegSessionCompleteCallback getCompleteCallback()
        Returns the session specific complete callback.
        Returns:
        session specific complete callback
      • getAllStatistics

        public java.util.List<Statistics> getAllStatistics​(int waitTimeout)
        Returns all statistics entries generated for this session. If there are asynchronous messages that are not delivered yet, this method waits for them until the given timeout.
        Parameters:
        waitTimeout - wait timeout for asynchronous messages in milliseconds
        Returns:
        list of statistics entries generated for this session
      • getStatistics

        public java.util.List<Statistics> getStatistics()
        Returns all statistics entries delivered for this session. Note that if there are asynchronous messages that are not delivered yet, this method will not wait for them and will return immediately.
        Returns:
        list of statistics entries received for this session
      • getLastReceivedStatistics

        public Statistics getLastReceivedStatistics()
        Returns the last received statistics entry.
        Returns:
        the last received statistics entry or null if there are not any statistics entries received
      • addStatistics

        public void addStatistics​(Statistics statistics)
        Adds a new statistics entry for this session. It is invoked internally by FFmpegKit library methods. Must not be used by user applications.
        Parameters:
        statistics - statistics entry
      • isFFmpeg

        public boolean isFFmpeg()
        Description copied from interface: Session
        Returns whether it is an FFmpeg session or not.
        Specified by:
        isFFmpeg in interface Session
        Returns:
        true if it is an FFmpeg session, false otherwise
      • isFFprobe

        public boolean isFFprobe()
        Description copied from interface: Session
        Returns whether it is an FFprobe session or not.
        Specified by:
        isFFprobe in interface Session
        Returns:
        true if it is an FFprobe session, false otherwise
      • isMediaInformation

        public boolean isMediaInformation()
        Description copied from interface: Session
        Returns whether it is a MediaInformation session or not.
        Specified by:
        isMediaInformation in interface Session
        Returns:
        true if it is a MediaInformation session, false otherwise
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object