Package com.arthenica.ffmpegkit
Class MediaInformationSession
- java.lang.Object
-
- com.arthenica.ffmpegkit.AbstractSession
-
- com.arthenica.ffmpegkit.FFprobeSession
-
- com.arthenica.ffmpegkit.MediaInformationSession
-
- All Implemented Interfaces:
Session
public class MediaInformationSession extends FFprobeSession implements Session
A custom FFprobe session, which produces a
MediaInformation
object using the FFprobe output.
-
-
Field Summary
-
Fields inherited from class com.arthenica.ffmpegkit.AbstractSession
arguments, createTime, DEFAULT_TIMEOUT_FOR_ASYNCHRONOUS_MESSAGES_IN_TRANSMIT, endTime, executeCallback, failStackTrace, future, logCallback, logRedirectionStrategy, logs, logsLock, returnCode, sessionId, sessionIdGenerator, startTime, state
-
-
Constructor Summary
Constructors Constructor Description MediaInformationSession(java.lang.String[] arguments)
Creates a new media information session.MediaInformationSession(java.lang.String[] arguments, ExecuteCallback executeCallback)
Creates a new media information session.MediaInformationSession(java.lang.String[] arguments, ExecuteCallback executeCallback, LogCallback logCallback)
Creates a new media information session.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MediaInformation
getMediaInformation()
Returns the media information extracted in this session.void
setMediaInformation(MediaInformation mediaInformation)
Sets the media information extracted in this session.java.lang.String
toString()
-
Methods inherited from class com.arthenica.ffmpegkit.FFprobeSession
isFFmpeg, isFFprobe
-
Methods inherited from class com.arthenica.ffmpegkit.AbstractSession
addLog, cancel, getAllLogs, getAllLogs, getAllLogsAsString, getAllLogsAsString, getArguments, getCommand, getCreateTime, getDuration, getEndTime, getExecuteCallback, 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, getExecuteCallback, getFailStackTrace, getFuture, getLogCallback, getLogRedirectionStrategy, getLogs, getLogsAsString, getOutput, getReturnCode, getSessionId, getStartTime, getState, isFFmpeg, isFFprobe, thereAreAsynchronousMessagesInTransmit
-
-
-
-
Constructor Detail
-
MediaInformationSession
public MediaInformationSession(java.lang.String[] arguments)
Creates a new media information session.- Parameters:
arguments
- command arguments
-
MediaInformationSession
public MediaInformationSession(java.lang.String[] arguments, ExecuteCallback executeCallback)
Creates a new media information session.- Parameters:
arguments
- command argumentsexecuteCallback
- session specific execute callback function
-
MediaInformationSession
public MediaInformationSession(java.lang.String[] arguments, ExecuteCallback executeCallback, LogCallback logCallback)
Creates a new media information session.- Parameters:
arguments
- command argumentsexecuteCallback
- session specific execute callback functionlogCallback
- session specific log callback function
-
-
Method Detail
-
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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classFFprobeSession
-
-