use of org.fagu.fmv.ffmpeg.operation.MediaOutput in project fmv by f-agu.
the class FFMPEGExecutorBuilderTestCase method testOutput.
/**
*/
@Test
public void testOutput() {
MediaOutput output = mockOutput("/path/file");
ffmpegExecutorBuilder.addMediaOutput(output);
assertArgs("/path/file");
}
use of org.fagu.fmv.ffmpeg.operation.MediaOutput in project fmv by f-agu.
the class FFMPEGExecutorBuilder method mux.
/**
* @param muxer
* @return
*/
public OutputProcessor mux(Muxer<?> muxer) {
MediaOutput mediaOutput = muxer.getMediaOutput();
OutputProcessor outputProcessor = addMediaOutput(mediaOutput);
muxer.eventAdded(outputProcessor, mediaOutput);
outputProcessor.format(muxer.name());
return outputProcessor;
}
use of org.fagu.fmv.ffmpeg.operation.MediaOutput 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.MediaOutput in project fmv by f-agu.
the class FFMPEGExecutorBuilderTestCase method mockOutput.
/**
* @param location
* @return
*/
private MediaOutput mockOutput(String location) {
MediaOutput output = mock(MediaOutput.class);
doReturn(location).when(output).toString();
return output;
}
use of org.fagu.fmv.ffmpeg.operation.MediaOutput 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