Class VideoTool
- java.lang.Object
-
- org.nuxeo.ecm.platform.video.tools.VideoTool
-
- Direct Known Subclasses:
VideoClosedCaptionsExtractor,VideoConcat,VideoSlicer,VideoWatermarker
public abstract class VideoTool extends Object
Common interface to setup the video tools.- Since:
- 8.4
-
-
Field Summary
Fields Modifier and Type Field Description protected StringcommandLineNameprotected Stringnameprotected static StringOUTPUT_FILE_PATH_PARAMprotected static StringOUTPUT_MIMETYPE_PARAMprotected static StringSOURCE_FILE_PATH_PARAMprotected static StringVIDEO_TOOLS_DIRECTORY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BlobHolderbuildResult(String mimeType, Map<String,String> parameters)Returns aBlobHoldercontaining the result of the command.voidcleanupInputs(Map<String,String> parameters)Removes any temporary input files that were used for command execution.StringgetCommandLineName()StringgetName()static BlobgetTemporaryBlob(String path, String mimeType)Gets a temporary blob for the given temporary path.Map<String,String>setupParameters(BlobHolder input, Map<String,Object> parameters)
-
-
-
Field Detail
-
name
protected String name
-
commandLineName
protected String commandLineName
-
SOURCE_FILE_PATH_PARAM
protected static final String SOURCE_FILE_PATH_PARAM
- See Also:
- Constant Field Values
-
OUTPUT_FILE_PATH_PARAM
protected static final String OUTPUT_FILE_PATH_PARAM
- See Also:
- Constant Field Values
-
OUTPUT_MIMETYPE_PARAM
protected static final String OUTPUT_MIMETYPE_PARAM
- See Also:
- Constant Field Values
-
VIDEO_TOOLS_DIRECTORY
protected static final String VIDEO_TOOLS_DIRECTORY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
-
getCommandLineName
public String getCommandLineName()
-
setupParameters
public Map<String,String> setupParameters(BlobHolder input, Map<String,Object> parameters)
-
cleanupInputs
public void cleanupInputs(Map<String,String> parameters)
Removes any temporary input files that were used for command execution.
-
buildResult
public BlobHolder buildResult(String mimeType, Map<String,String> parameters)
Returns aBlobHoldercontaining the result of the command.- Parameters:
mimeType- the MIME typeparameters- the parameters- Returns:
- the blob holder
-
getTemporaryBlob
public static Blob getTemporaryBlob(String path, String mimeType)
Gets a temporary blob for the given temporary path.The temporary blob is backed by a temporary file in a new location. The old file is removed.
- Parameters:
path- the path to a temporary filemimeType- the blob MIME type- Returns:
- a temporary
Blob
-
-