Class Mp4Watermarker
- java.lang.Object
-
- org.nuxeo.importer.stream.consumer.watermarker.AbstractWatermarker
-
- org.nuxeo.importer.stream.consumer.watermarker.Mp4Watermarker
-
- All Implemented Interfaces:
Watermarker
public class Mp4Watermarker extends AbstractWatermarker
Adds watermark to mp4 file by modifying its title. This is for testing purpose only.- Since:
- 10.2
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classMp4Watermarker.BetterByteArrayOutputStream
-
Field Summary
Fields Modifier and Type Field Description protected static StringBOX_MDATprotected static StringBOX_MOOVprotected static StringPATH_CHUNKSprotected static StringPATH_CHUNKS_BISprotected static StringPATH_ILSTprotected static StringPATH_METAprotected static StringPATH_MVEXprotected static StringPATH_NAMprotected static StringPATH_UDTA
-
Constructor Summary
Constructors Constructor Description Mp4Watermarker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PathaddWatermark(Path inputFile, Path outputDir, String watermark)Creates a new file based on the input file by adding a watermarkprotected voidcorrectChunkOffsets(org.mp4parser.boxes.iso14496.part12.MovieBox movieBox, long correction)protected org.mp4parser.boxes.iso14496.part12.FreeBoxfindFreeBox(org.mp4parser.Container c)protected booleanneedsOffsetCorrection(org.mp4parser.IsoFile isoFile)-
Methods inherited from class org.nuxeo.importer.stream.consumer.watermarker.AbstractWatermarker
getOutputPath
-
-
-
-
Field Detail
-
BOX_MOOV
protected static final String BOX_MOOV
- See Also:
- Constant Field Values
-
BOX_MDAT
protected static final String BOX_MDAT
- See Also:
- Constant Field Values
-
PATH_UDTA
protected static final String PATH_UDTA
- See Also:
- Constant Field Values
-
PATH_META
protected static final String PATH_META
- See Also:
- Constant Field Values
-
PATH_ILST
protected static final String PATH_ILST
- See Also:
- Constant Field Values
-
PATH_NAM
protected static final String PATH_NAM
- See Also:
- Constant Field Values
-
PATH_MVEX
protected static final String PATH_MVEX
- See Also:
- Constant Field Values
-
PATH_CHUNKS
protected static final String PATH_CHUNKS
- See Also:
- Constant Field Values
-
PATH_CHUNKS_BIS
protected static final String PATH_CHUNKS_BIS
- See Also:
- Constant Field Values
-
-
Method Detail
-
addWatermark
public Path addWatermark(Path inputFile, Path outputDir, String watermark)
Description copied from interface:WatermarkerCreates a new file based on the input file by adding a watermark- Parameters:
inputFile- the source fileoutputDir- the directory to write the output filewatermark- the watermark string to use- Returns:
- the path of the watermarked file
-
needsOffsetCorrection
protected boolean needsOffsetCorrection(org.mp4parser.IsoFile isoFile)
-
correctChunkOffsets
protected void correctChunkOffsets(org.mp4parser.boxes.iso14496.part12.MovieBox movieBox, long correction)
-
findFreeBox
protected org.mp4parser.boxes.iso14496.part12.FreeBox findFreeBox(org.mp4parser.Container c)
-
-