类 FFmpegSession
- java.lang.Object
-
- com.ts.lib.ffmpegkit.AbstractSession
-
- com.ts.lib.ffmpegkit.FFmpegSession
-
- 所有已实现的接口:
Session
public class FFmpegSession extends AbstractSession implements Session
An FFmpeg session.
-
-
字段概要
-
从类继承的字段 com.ts.lib.ffmpegkit.AbstractSession
DEFAULT_TIMEOUT_FOR_ASYNCHRONOUS_MESSAGES_IN_TRANSMIT
-
-
构造器概要
构造器 构造器 说明 FFmpegSession(String[] arguments)Builds a new FFmpeg session.FFmpegSession(String[] arguments, FFmpegSessionCompleteCallback completeCallback)Builds a new FFmpeg session.FFmpegSession(String[] arguments, FFmpegSessionCompleteCallback completeCallback, LogCallback logCallback, StatisticsCallback statisticsCallback)Builds a new FFmpeg session.FFmpegSession(String[] arguments, FFmpegSessionCompleteCallback completeCallback, LogCallback logCallback, StatisticsCallback statisticsCallback, LogRedirectionStrategy logRedirectionStrategy)Builds a new FFmpeg session.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddStatistics(Statistics statistics)Adds a new statistics entry for this session.List<Statistics>getAllStatistics()Returns all statistics entries generated for this session.List<Statistics>getAllStatistics(int waitTimeout)Returns all statistics entries generated for this session.FFmpegSessionCompleteCallbackgetCompleteCallback()Returns the session specific complete callback.StatisticsgetLastReceivedStatistics()Returns the last received statistics entry.List<Statistics>getStatistics()Returns all statistics entries delivered for this session.StatisticsCallbackgetStatisticsCallback()Returns the session specific statistics callback.booleanisFFmpeg()Returns whether it is anFFmpegsession or not.booleanisFFprobe()Returns whether it is anFFprobesession or not.booleanisMediaInformation()Returns whether it is aMediaInformationsession or not.StringtoString()-
从类继承的方法 com.ts.lib.ffmpegkit.AbstractSession
addLog, cancel, getAllLogs, getAllLogs, getAllLogsAsString, getAllLogsAsString, getArguments, getCommand, getCreateTime, getDuration, getEndTime, getFailStackTrace, getFuture, getLogCallback, getLogRedirectionStrategy, getLogs, getLogsAsString, getOutput, getReturnCode, getSessionId, getStartTime, getState, thereAreAsynchronousMessagesInTransmit
-
从接口继承的方法 com.ts.lib.ffmpegkit.Session
addLog, cancel, getAllLogs, getAllLogs, getAllLogsAsString, getAllLogsAsString, getArguments, getCommand, getCreateTime, getDuration, getEndTime, getFailStackTrace, getFuture, getLogCallback, getLogRedirectionStrategy, getLogs, getLogsAsString, getOutput, getReturnCode, getSessionId, getStartTime, getState, thereAreAsynchronousMessagesInTransmit
-
-
-
-
构造器详细资料
-
FFmpegSession
public FFmpegSession(String[] arguments)
Builds a new FFmpeg session.- 参数:
arguments- command arguments
-
FFmpegSession
public FFmpegSession(String[] arguments, FFmpegSessionCompleteCallback completeCallback)
Builds a new FFmpeg session.- 参数:
arguments- command argumentscompleteCallback- session specific complete callback
-
FFmpegSession
public FFmpegSession(String[] arguments, FFmpegSessionCompleteCallback completeCallback, LogCallback logCallback, StatisticsCallback statisticsCallback)
Builds a new FFmpeg session.- 参数:
arguments- command argumentscompleteCallback- session specific complete callbacklogCallback- session specific log callbackstatisticsCallback- session specific statistics callback
-
FFmpegSession
public FFmpegSession(String[] arguments, FFmpegSessionCompleteCallback completeCallback, LogCallback logCallback, StatisticsCallback statisticsCallback, LogRedirectionStrategy logRedirectionStrategy)
Builds a new FFmpeg session.- 参数:
arguments- command argumentscompleteCallback- session specific complete callbacklogCallback- session specific log callbackstatisticsCallback- session specific statistics callbacklogRedirectionStrategy- session specific log redirection strategy
-
-
方法详细资料
-
getStatisticsCallback
public StatisticsCallback getStatisticsCallback()
Returns the session specific statistics callback.- 返回:
- session specific statistics callback
-
getCompleteCallback
public FFmpegSessionCompleteCallback getCompleteCallback()
Returns the session specific complete callback.- 返回:
- session specific complete callback
-
getAllStatistics
public 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.- 参数:
waitTimeout- wait timeout for asynchronous messages in milliseconds- 返回:
- list of statistics entries generated for this session
-
getAllStatistics
public List<Statistics> getAllStatistics()
Returns all statistics entries generated for this session. If there are asynchronous messages that are not delivered yet, this method waits for them untilAbstractSession.DEFAULT_TIMEOUT_FOR_ASYNCHRONOUS_MESSAGES_IN_TRANSMITexpires.- 返回:
- list of statistics entries generated for this session
-
getStatistics
public 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.- 返回:
- list of statistics entries received for this session
-
getLastReceivedStatistics
public Statistics getLastReceivedStatistics()
Returns the last received statistics entry.- 返回:
- 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 byFFmpegKitlibrary methods. Must not be used by user applications.- 参数:
statistics- statistics entry
-
isFFmpeg
public boolean isFFmpeg()
从接口复制的说明:SessionReturns whether it is anFFmpegsession or not.
-
isFFprobe
public boolean isFFprobe()
从接口复制的说明:SessionReturns whether it is anFFprobesession or not.
-
isMediaInformation
public boolean isMediaInformation()
从接口复制的说明:SessionReturns whether it is aMediaInformationsession or not.- 指定者:
isMediaInformation在接口中Session- 返回:
- true if it is a
MediaInformationsession, false otherwise
-
-