use of org.fagu.fmv.ffmpeg.operation.MediaInput in project fmv by f-agu.
the class FFMPEGExecutorBuilderTestCase method mockInput.
/**
* @param location
* @return
*/
private MediaInput mockInput(String location) {
MediaInput input = mock(MediaInput.class);
doReturn(location).when(input).toString();
return input;
}
use of org.fagu.fmv.ffmpeg.operation.MediaInput in project fmv by f-agu.
the class FFMPEGExecutorBuilderTestCase method testInput.
/**
*/
@Test
public void testInput() {
MediaInput input = mockInput("/path/file");
ffmpegExecutorBuilder.addMediaInput(input);
assertArgs("-i", "/path/file");
}
use of org.fagu.fmv.ffmpeg.operation.MediaInput in project fmv by f-agu.
the class FFMPEGExecutorBuilderTestCase method testInputProcessor_format.
/**
*/
@Test
public void testInputProcessor_format() {
MediaInput input = mockInput("/path/file");
InputProcessor inputProcessor = ffmpegExecutorBuilder.addMediaInput(input);
inputProcessor.format("forMAT");
assertArgs("-f", "forMAT", "-i", "/path/file");
}
use of org.fagu.fmv.ffmpeg.operation.MediaInput in project fmv by f-agu.
the class FFHelper method videoMetadatas.
/**
* @param inFile
* @return
* @throws IOException
*/
public static MovieMetadatas videoMetadatas(File inFile) throws IOException {
MediaInput input = new FileMediaInput(inFile);
InfoOperation infoOperation = new InfoOperation(input);
FFExecutor<MovieMetadatas> executor = new FFExecutor<>(infoOperation);
Executed<MovieMetadatas> execute = executor.execute();
return execute.getResult();
}
use of org.fagu.fmv.ffmpeg.operation.MediaInput in project fmv by f-agu.
the class FFMPEGExecutorBuilder method demux.
/**
* @param muxer
* @return
*/
public InputProcessor demux(Demuxer<?> demuxer) {
MediaInput mediaInput = demuxer.getMediaInput();
InputProcessor inputProcessor = addMediaInput(mediaInput);
demuxer.eventAdded(inputProcessor, mediaInput);
inputProcessor.format(demuxer.name());
return inputProcessor;
}
Aggregations