use of org.fagu.fmv.ffmpeg.operation.OutputProcessor in project fmv by f-agu.
the class RipperTestCase method ffMPEGExecutorBuilder.
/**
* @return
* @throws IOException
*/
private FFMPEGExecutorBuilder ffMPEGExecutorBuilder() throws IOException {
FFMPEGExecutorBuilder builder = mock(FFMPEGExecutorBuilder.class);
doReturn(builder).when(builder).hideBanner();
doReturn(builder).when(builder).noStats();
InputProcessor inputProcessor = mock(InputProcessor.class);
doReturn(inputProcessor).when(builder).addMediaInputFile(any(File.class));
MovieMetadatas movieMetadatas = mock(MovieMetadatas.class);
doReturn(movieMetadatas).when(inputProcessor).getMovieMetadatas();
OutputProcessor outputProcessor = mock(OutputProcessor.class);
doReturn(outputProcessor).when(builder).addMediaOutputFile(any(File.class));
doReturn(outputProcessor).when(outputProcessor).codec(any(Coder.class));
return builder;
}
use of org.fagu.fmv.ffmpeg.operation.OutputProcessor in project fmv by f-agu.
the class FFMPEGExecutorBuilderTestCase method testOutputProcessor_duration.
// ======================== OUTPUT PROCESSOR ========================
/**
*/
@Test
public void testOutputProcessor_duration() {
MediaOutput output = mockOutput("/path/file");
OutputProcessor outputProcessor = ffmpegExecutorBuilder.addMediaOutput(output);
outputProcessor.duration(new Duration(1, 2, 3.4));
assertArgs("-t", "01:02:03.400", "/path/file");
}
use of org.fagu.fmv.ffmpeg.operation.OutputProcessor in project fmv by f-agu.
the class FFMPEGExecutorBuilderTestCase method testOutputProcessor_format.
/**
*/
@Test
public void testOutputProcessor_format() {
MediaOutput output = mockOutput("/path/file");
OutputProcessor outputProcessor = ffmpegExecutorBuilder.addMediaOutput(output);
outputProcessor.format("forMAT");
assertArgs("-f", "forMAT", "/path/file");
}
Aggregations