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 class
Mp4Watermarker.BetterByteArrayOutputStream
-
Field Summary
Fields Modifier and Type Field Description protected static String
BOX_MDAT
protected static String
BOX_MOOV
protected static String
PATH_CHUNKS
protected static String
PATH_CHUNKS_BIS
protected static String
PATH_ILST
protected static String
PATH_META
protected static String
PATH_MVEX
protected static String
PATH_NAM
protected static String
PATH_UDTA
-
Constructor Summary
Constructors Constructor Description Mp4Watermarker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Path
addWatermark(Path inputFile, Path outputDir, String watermark)
Creates a new file based on the input file by adding a watermarkprotected void
correctChunkOffsets(org.mp4parser.boxes.iso14496.part12.MovieBox movieBox, long correction)
protected org.mp4parser.boxes.iso14496.part12.FreeBox
findFreeBox(org.mp4parser.Container c)
protected boolean
needsOffsetCorrection(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:Watermarker
Creates 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)
-
-