Package com.arthenica.ffmpegkit
Class MediaInformationSession
- java.lang.Object
-
- com.arthenica.ffmpegkit.AbstractSession
-
- com.arthenica.ffmpegkit.MediaInformationSession
-
- All Implemented Interfaces:
Session
public class MediaInformationSession extends AbstractSession implements Session
A custom FFprobe session, which produces a
MediaInformationobject using the FFprobe output.
-
-
Field Summary
-
Fields inherited from class com.arthenica.ffmpegkit.AbstractSession
arguments, createTime, DEFAULT_TIMEOUT_FOR_ASYNCHRONOUS_MESSAGES_IN_TRANSMIT, endTime, failStackTrace, future, logCallback, logRedirectionStrategy, logs, logsLock, returnCode, sessionId, sessionIdGenerator, startTime, state
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MediaInformationSessioncreate(java.lang.String[] arguments)Creates a new media information session.static MediaInformationSessioncreate(java.lang.String[] arguments, MediaInformationSessionCompleteCallback completeCallback)Creates a new media information session.static MediaInformationSessioncreate(java.lang.String[] arguments, MediaInformationSessionCompleteCallback completeCallback, LogCallback logCallback)Creates a new media information session.MediaInformationSessionCompleteCallbackgetCompleteCallback()Returns the session specific complete callback.MediaInformationgetMediaInformation()Returns the media information extracted in this session.booleanisFFmpeg()Returns whether it is anFFmpegsession or not.booleanisFFprobe()Returns whether it is anFFprobesession or not.booleanisMediaInformation()Returns whether it is aMediaInformationsession or not.voidsetMediaInformation(MediaInformation mediaInformation)Sets the media information extracted in this session.java.lang.StringtoString()-
Methods inherited from class com.arthenica.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, waitForAsynchronousMessagesInTransmit
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.arthenica.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
-
-
-
-
Method Detail
-
create
public static MediaInformationSession create(java.lang.String[] arguments)
Creates a new media information session.- Parameters:
arguments- command arguments- Returns:
- created session
-
create
public static MediaInformationSession create(java.lang.String[] arguments, MediaInformationSessionCompleteCallback completeCallback)
Creates a new media information session.- Parameters:
arguments- command argumentscompleteCallback- session specific complete callback- Returns:
- created session
-
create
public static MediaInformationSession create(java.lang.String[] arguments, MediaInformationSessionCompleteCallback completeCallback, LogCallback logCallback)
Creates a new media information session.- Parameters:
arguments- command argumentscompleteCallback- session specific complete callbacklogCallback- session specific log callback- Returns:
- created session
-
getMediaInformation
public MediaInformation getMediaInformation()
Returns the media information extracted in this session.- Returns:
- media information extracted or null if the command failed or the output can not be parsed
-
setMediaInformation
public void setMediaInformation(MediaInformation mediaInformation)
Sets the media information extracted in this session.- Parameters:
mediaInformation- media information extracted
-
getCompleteCallback
public MediaInformationSessionCompleteCallback getCompleteCallback()
Returns the session specific complete callback.- Returns:
- session specific complete callback
-
isFFmpeg
public boolean isFFmpeg()
Description copied from interface:SessionReturns whether it is anFFmpegsession or not.
-
isFFprobe
public boolean isFFprobe()
Description copied from interface:SessionReturns whether it is anFFprobesession or not.
-
isMediaInformation
public boolean isMediaInformation()
Description copied from interface:SessionReturns whether it is aMediaInformationsession or not.- Specified by:
isMediaInformationin interfaceSession- Returns:
- true if it is a
MediaInformationsession, false otherwise
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-