use of org.fagu.fmv.ffmpeg.ioe.FileMediaOutput in project fmv by f-agu.
the class MetadataVersion method add.
/**
* @param outputProcessor
*/
public static void add(OutputProcessor outputProcessor) {
String tagName = null;
MediaOutput mediaOutput = outputProcessor.getMediaOutput();
if (mediaOutput instanceof FileMediaOutput) {
String extension = FilenameUtils.getExtension(((FileMediaOutput) mediaOutput).getFile().getName());
tagName = tagForFormat(extension);
}
if (tagName != null) {
outputProcessor.metadataStream(Type.VIDEO, tagName, "fmvversion:" + getVersion());
}
}
use of org.fagu.fmv.ffmpeg.ioe.FileMediaOutput in project fmv by f-agu.
the class MetadataVersionTestCase method test.
/**
*/
@Test
public void test() {
OutputProcessor outputProcessor = mock(OutputProcessor.class);
FileMediaOutput fileMediaOutput = mock(FileMediaOutput.class);
doReturn(fileMediaOutput).when(outputProcessor).getMediaOutput();
doReturn(new File("x.mp4")).when(fileMediaOutput).getFile();
MetadataVersion.add(outputProcessor);
verify(outputProcessor).metadataStream(eq(Type.VIDEO), eq("comment"), anyString());
}
Aggregations